X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fpkcs12%2Fp12_crt.c;h=ee8aed54c77e1cfbf48308fc940c3ed3efef32d9;hp=56d88b07596cd553568ae821f3d2d87e325c3b57;hb=e77066ea0a1a339a22bd5226eb08f139f67e96fe;hpb=d12cd419009ed7b57245ac9ba65df06705aa259f diff --git a/crypto/pkcs12/p12_crt.c b/crypto/pkcs12/p12_crt.c index 56d88b0759..ee8aed54c7 100644 --- a/crypto/pkcs12/p12_crt.c +++ b/crypto/pkcs12/p12_crt.c @@ -61,7 +61,7 @@ #include PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, - STACK *ca, int nid_key, int nid_cert, int iter, int mac_iter, + STACK_OF(X509) *ca, int nid_key, int nid_cert, int iter, int mac_iter, int keytype) { PKCS12 *p12; @@ -103,8 +103,8 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert, /* Add all other certificates */ if(ca) { - for(i = 0; i < sk_num(ca); i++) { - tcert = (X509 *)sk_value(ca, i); + for(i = 0; i < sk_X509_num(ca); i++) { + tcert = sk_X509_value(ca, i); if(!(bag = M_PKCS12_x5092certbag(tcert))) return NULL; if(!sk_push(bags, (char *)bag)) { PKCS12err(PKCS12_F_PKCS12_CREATE,ERR_R_MALLOC_FAILURE);