diff options
author | Bodo Möller <bodo@openssl.org> | 2002-02-13 18:21:51 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-02-13 18:21:51 +0000 |
commit | 4d94ae00d5614d64d4dd065860c4b00161a81f82 (patch) | |
tree | e993aa323ea753b3c0782439eb78f4f8c896a67e /crypto/pem/pem_info.c | |
parent | 60d8bae30d1040a4f955e3247443b2dd4c674cde (diff) | |
download | openssl-4d94ae00d5614d64d4dd065860c4b00161a81f82.tar.gz |
ECDSA support
Submitted by: Nils Larsch <nla@trustcenter.de>
Diffstat (limited to 'crypto/pem/pem_info.c')
-rw-r--r-- | crypto/pem/pem_info.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index b6ca51a186..8bcd9f770d 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -203,6 +203,30 @@ start: } else #endif +#ifndef OPENSSL_NO_ECDSA + if (strcmp(name,PEM_STRING_ECDSA) == 0) + { + d2i=(char *(*)())d2i_ECDSAPrivateKey; + if (xi->x_pkey != NULL) + { + if (!sk_X509_INFO_push(ret,xi)) goto err; + if ((xi=X509_INFO_new()) == NULL) goto err; + goto start; + } + + xi->enc_data=NULL; + xi->enc_len=0; + + xi->x_pkey=X509_PKEY_new(); + if ((xi->x_pkey->dec_pkey=EVP_PKEY_new()) == NULL) + goto err; + xi->x_pkey->dec_pkey->type=EVP_PKEY_ECDSA; + pp=(char **)&(xi->x_pkey->dec_pkey->pkey.ecdsa); + if ((int)strlen(header) > 10) /* assume encrypted */ + raw=1; + } + else +#endif { d2i=NULL; pp=NULL; |