summaryrefslogtreecommitdiffstats
path: root/crypto/asn1/p5_pbev2.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2000-02-22 18:45:11 +0000
committerDr. Stephen Henson <steve@openssl.org>2000-02-22 18:45:11 +0000
commit4b42658082a3d6224d25f10de8fdb605d30015a9 (patch)
tree6c9ce1e8f0f222d9a1de90de288b184436a23db4 /crypto/asn1/p5_pbev2.c
parent3f2b5a88ad62c63caae1265f9055fb660c7eb407 (diff)
Make pkcs8 work again.
Make EVP_CIPHER_type() return NID_undef if the cipher has no ASN1 OID, modify code to handle this.
Diffstat (limited to 'crypto/asn1/p5_pbev2.c')
-rw-r--r--crypto/asn1/p5_pbev2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/p5_pbev2.c b/crypto/asn1/p5_pbev2.c
index 2f6a4c4518..4ce06a94ab 100644
--- a/crypto/asn1/p5_pbev2.c
+++ b/crypto/asn1/p5_pbev2.c
@@ -178,12 +178,12 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
ASN1_OBJECT *obj;
alg_nid = EVP_CIPHER_type(cipher);
- obj = OBJ_nid2obj(alg_nid);
- if(!obj || !obj->data) {
+ if(alg_nid == NID_undef) {
ASN1err(ASN1_F_PKCS5_PBE2_SET,
ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER);
goto err;
}
+ obj = OBJ_nid2obj(alg_nid);
if(!(pbe2 = PBE2PARAM_new())) goto merr;