Fix a probable typo in Apple's code?

Maybe they changed `DERParseSequenceContent` after making libDER closed-source, and therefore this would be an issue with us using the last released libDER sources.

This fixes certificate parsing and it was just a simple reversion to the old function call, which is why I think it was a typo in their updated code.
This commit is contained in:
Ariel Abreu 2021-01-04 12:09:50 -05:00
parent af59a6bc86
commit c188d1f130
No known key found for this signature in database
GPG Key ID: BB20848279B910AC

View File

@ -1742,7 +1742,11 @@ static bool SecCertificateParse(SecCertificateRef certificate)
/* sequence we're given: encoded DERSubjPubKeyInfo */
DERSubjPubKeyInfo pubKeyInfo;
#ifdef DARLING
drtn = DERParseSequence(&tbsCert.subjectPubKey,
#else
drtn = DERParseSequenceContent(&tbsCert.subjectPubKey,
#endif
DERNumSubjPubKeyInfoItemSpecs, DERSubjPubKeyInfoItemSpecs,
&pubKeyInfo, sizeof(pubKeyInfo));
require_noerr_quiet(drtn, badCert);