aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/x_pubkey.c
diff options
context:
space:
mode:
authorRalf S. Engelschall <rse@openssl.org>1998-12-21 10:56:39 +0000
committerRalf S. Engelschall <rse@openssl.org>1998-12-21 10:56:39 +0000
commit58964a492275ca9a59a0cd9c8155cb2491b4b909 (patch)
treec7b16876a5789463bbbb468ef4829c8129b3d718 /crypto/asn1/x_pubkey.c
parentd02b48c63a58ea4367a0e905979f140b7d090f86 (diff)
downloadopenssl-58964a492275ca9a59a0cd9c8155cb2491b4b909.tar.gz
Import of old SSLeay release: SSLeay 0.9.0b
Diffstat (limited to 'crypto/asn1/x_pubkey.c')
-rw-r--r--crypto/asn1/x_pubkey.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/crypto/asn1/x_pubkey.c b/crypto/asn1/x_pubkey.c
index b1a2499d34..a309cf74a7 100644
--- a/crypto/asn1/x_pubkey.c
+++ b/crypto/asn1/x_pubkey.c
@@ -1,5 +1,5 @@
/* crypto/asn1/x_pubkey.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
@@ -211,12 +211,16 @@ X509_PUBKEY *key;
long j;
int type;
unsigned char *p;
+#ifndef NO_DSA
X509_ALGOR *a;
+#endif
+
+ if (key == NULL) goto err;
+
+ if (key->pkey != NULL) return(key->pkey);
+
+ if (key->public_key == NULL) goto err;
- if (key->pkey != NULL)
- {
- return(key->pkey);
- }
type=OBJ_obj2nid(key->algor->algorithm);
p=key->public_key->data;
j=key->public_key->length;