summaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-02-13 18:21:51 +0000
committerBodo Möller <bodo@openssl.org>2002-02-13 18:21:51 +0000
commit4d94ae00d5614d64d4dd065860c4b00161a81f82 (patch)
treee993aa323ea753b3c0782439eb78f4f8c896a67e /apps/x509.c
parent60d8bae30d1040a4f955e3247443b2dd4c674cde (diff)
ECDSA support
Submitted by: Nils Larsch <nla@trustcenter.de>
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/x509.c b/apps/x509.c
index b2ea09d52f..a56f037b89 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -866,6 +866,10 @@ bad:
if (Upkey->type == EVP_PKEY_DSA)
digest=EVP_dss1();
#endif
+#ifndef OPENSSL_NO_ECDSA
+ if (Upkey->type == EVP_PKEY_ECDSA)
+ digest=EVP_ecdsa();
+#endif
assert(need_rand);
if (!sign(x,Upkey,days,clrext,digest,
@@ -885,6 +889,10 @@ bad:
if (CApkey->type == EVP_PKEY_DSA)
digest=EVP_dss1();
#endif
+#ifndef OPENSSL_NO_ECDSA
+ if (CApkey->type == EVP_PKEY_ECDSA)
+ digest = EVP_ecdsa();
+#endif
assert(need_rand);
if (!x509_certify(ctx,CAfile,digest,x,xca,
@@ -914,6 +922,8 @@ bad:
if (pk->type == EVP_PKEY_DSA)
digest=EVP_dss1();
+ else if (pk->type == EVP_PKEY_ECDSA)
+ digest=EVP_ecdsa();
rq=X509_to_X509_REQ(x,pk,digest);
EVP_PKEY_free(pk);