forked from wolfSSL/wolfssl
reverse order that certificates are compared with private key when parsing PKCS12
This commit is contained in:
@@ -768,6 +768,7 @@ int wc_PKCS12_parse(WC_PKCS12* pkcs12, const char* psw,
|
|||||||
{
|
{
|
||||||
ContentInfo* ci = NULL;
|
ContentInfo* ci = NULL;
|
||||||
WC_DerCertList* certList = NULL;
|
WC_DerCertList* certList = NULL;
|
||||||
|
WC_DerCertList* tailList = NULL;
|
||||||
byte* buf = NULL;
|
byte* buf = NULL;
|
||||||
word32 i, oid;
|
word32 i, oid;
|
||||||
int ret, pswSz;
|
int ret, pswSz;
|
||||||
@@ -1067,12 +1068,13 @@ int wc_PKCS12_parse(WC_PKCS12* pkcs12, const char* psw,
|
|||||||
|
|
||||||
/* put the new node into the list */
|
/* put the new node into the list */
|
||||||
if (certList != NULL) {
|
if (certList != NULL) {
|
||||||
WOLFSSL_MSG("Pushing new cert onto stack");
|
WOLFSSL_MSG("Pushing new cert onto queue");
|
||||||
node->next = certList;
|
tailList->next = node;
|
||||||
certList = node;
|
tailList = node;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
certList = node;
|
certList = node;
|
||||||
|
tailList = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* on to next */
|
/* on to next */
|
||||||
|
Reference in New Issue
Block a user