aboutsummaryrefslogtreecommitdiff
path: root/crypto/asn1/d2i_pr.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-08-07 10:49:54 +0000
committerBodo Möller <bodo@openssl.org>2002-08-07 10:49:54 +0000
commit14a7cfb32a0347a4bc620ae1b552b21c4c1e270b (patch)
tree13c4bcc3d58ba7db5e598cd668670873b51e8ce3 /crypto/asn1/d2i_pr.c
parent7a8645d1716d7f84435b0f3d8d2fd122d6f75113 (diff)
downloadopenssl-14a7cfb32a0347a4bc620ae1b552b21c4c1e270b.zip
openssl-14a7cfb32a0347a4bc620ae1b552b21c4c1e270b.tar.gz
openssl-14a7cfb32a0347a4bc620ae1b552b21c4c1e270b.tar.bz2
use a generic EC_KEY structure (EC keys are not ECDSA specific)
Submitted by: Nils Larsch
Diffstat (limited to 'crypto/asn1/d2i_pr.c')
-rw-r--r--crypto/asn1/d2i_pr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c
index d56e5fd..8d0dc27 100644
--- a/crypto/asn1/d2i_pr.c
+++ b/crypto/asn1/d2i_pr.c
@@ -68,8 +68,8 @@
#ifndef OPENSSL_NO_DSA
#include <openssl/dsa.h>
#endif
-#ifndef OPENSSL_NO_ECDSA
-#include <openssl/ecdsa.h>
+#ifndef OPENSSL_NO_EC
+#include <openssl/ec.h>
#endif
EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
@@ -111,9 +111,9 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp,
}
break;
#endif
-#ifndef OPENSSL_NO_ECDSA
- case EVP_PKEY_ECDSA:
- if ((ret->pkey.ecdsa = d2i_ECDSAPrivateKey(NULL,
+#ifndef OPENSSL_NO_EC
+ case EVP_PKEY_EC:
+ if ((ret->pkey.eckey = d2i_ECPrivateKey(NULL,
(const unsigned char **)pp, length)) == NULL)
{
ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB);
@@ -154,7 +154,7 @@ EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, unsigned char **pp,
if(sk_ASN1_TYPE_num(inkey) == 6)
keytype = EVP_PKEY_DSA;
else if (sk_ASN1_TYPE_num(inkey) == 4)
- keytype = EVP_PKEY_ECDSA;
+ keytype = EVP_PKEY_EC;
else keytype = EVP_PKEY_RSA;
sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free);
return d2i_PrivateKey(keytype, a, pp, length);