diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-12-29 02:59:18 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-12-29 02:59:18 +0000 |
commit | f45f40fffff1348ce2b12c9da520a1ea88567294 (patch) | |
tree | b2db6279ebb534b83d5dc653f96d97b9fe8f238f /crypto/pkcs12 | |
parent | 6447cce37251e6d947279a3fd6874e59ed0d3d2d (diff) |
Add OIDs for idea and blowfish. Unfortunately these are in
the middle of the OID table so the diff is rather large :-(
Diffstat (limited to 'crypto/pkcs12')
-rw-r--r-- | crypto/pkcs12/p12_add.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/pkcs12/p12_add.c b/crypto/pkcs12/p12_add.c index 7ed1c3fea4..d045cbba8d 100644 --- a/crypto/pkcs12/p12_add.c +++ b/crypto/pkcs12/p12_add.c @@ -189,14 +189,14 @@ X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, if (!(p8 = X509_SIG_new())) { PKCS12err(PKCS12_F_PKCS8_ENCRYPT, ERR_R_MALLOC_FAILURE); - return NULL; + goto err; } if(pbe_nid == -1) pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen); else pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen); if(!pbe) { - PKCS12err(PKCS12_F_PKCS8_ENCRYPT, ERR_R_MALLOC_FAILURE); - return NULL; + PKCS12err(PKCS12_F_PKCS8_ENCRYPT, ERR_R_ASN1_LIB); + goto err; } X509_ALGOR_free(p8->algor); p8->algor = pbe; @@ -205,8 +205,12 @@ X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, PKCS12_i2d_encrypt (pbe, i2d_PKCS8_PRIV_KEY_INFO, pass, passlen, (char *)p8inf, 0))) { PKCS12err(PKCS12_F_PKCS8_ENCRYPT, PKCS12_R_ENCRYPT_ERROR); - return NULL; + goto err; } return p8; + + err: + X509_SIG_free(p8); + return NULL; } |