summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/i2d_pr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/i2d_pr.c')
-rw-r--r--src/lib/libcrypto/asn1/i2d_pr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/libcrypto/asn1/i2d_pr.c b/src/lib/libcrypto/asn1/i2d_pr.c
index 1e951ae01d..0be52c5b76 100644
--- a/src/lib/libcrypto/asn1/i2d_pr.c
+++ b/src/lib/libcrypto/asn1/i2d_pr.c
@@ -67,6 +67,9 @@
67#ifndef OPENSSL_NO_DSA 67#ifndef OPENSSL_NO_DSA
68#include <openssl/dsa.h> 68#include <openssl/dsa.h>
69#endif 69#endif
70#ifndef OPENSSL_NO_EC
71#include <openssl/ec.h>
72#endif
70 73
71int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp) 74int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
72 { 75 {
@@ -83,6 +86,12 @@ int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
83 return(i2d_DSAPrivateKey(a->pkey.dsa,pp)); 86 return(i2d_DSAPrivateKey(a->pkey.dsa,pp));
84 } 87 }
85#endif 88#endif
89#ifndef OPENSSL_NO_EC
90 if (a->type == EVP_PKEY_EC)
91 {
92 return(i2d_ECPrivateKey(a->pkey.ec, pp));
93 }
94#endif
86 95
87 ASN1err(ASN1_F_I2D_PRIVATEKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); 96 ASN1err(ASN1_F_I2D_PRIVATEKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
88 return(-1); 97 return(-1);