]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/asn1/i2d_pu.c
ECDSA support
[thirdparty/openssl.git] / crypto / asn1 / i2d_pu.c
index 013d19bbf418b13205d5b968796dce056136cd28..2607734ebc63f66b1e9751255d4101564d092a71 100644 (file)
@@ -67,6 +67,9 @@
 #ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
 #endif
+#ifndef OPENSSL_NO_ECDSA
+#include <openssl/ecdsa.h>
+#endif
 
 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp)
        {
@@ -79,6 +82,10 @@ int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp)
 #ifndef OPENSSL_NO_DSA
        case EVP_PKEY_DSA:
                return(i2d_DSAPublicKey(a->pkey.dsa,pp));
+#endif
+#ifndef OPENSSL_NO_ECDSA
+       case EVP_PKEY_ECDSA:
+               return(i2d_ECDSAPublicKey(a->pkey.ecdsa, pp));
 #endif
        default:
                ASN1err(ASN1_F_I2D_PUBLICKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);