use a generic EC_KEY structure (EC keys are not ECDSA specific)
[openssl.git] / crypto / asn1 / i2d_pr.c
index a40c64d3f4991cbe0105f65331151687ede6da6b..bbf2a0d2d6b06c9878189cd4a5f168655057e2bf 100644 (file)
@@ -67,8 +67,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
 
 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
@@ -86,10 +86,10 @@ int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp)
                return(i2d_DSAPrivateKey(a->pkey.dsa,pp));
                }
 #endif
-#ifndef OPENSSL_NO_ECDSA
-       if (a->type == EVP_PKEY_ECDSA)
+#ifndef OPENSSL_NO_EC
+       if (a->type == EVP_PKEY_EC)
                {
-               return(i2d_ECDSAPrivateKey(a->pkey.ecdsa, pp));
+               return(i2d_ECPrivateKey(a->pkey.eckey, pp));
                }
 #endif