use asn1 callbacks for new, free and d2i
[oweals/openssl.git] / crypto / pem / pem_info.c
index c8980bb56fa9886de240aeb4e32d05cb098b00cd..1644dfcaac7311ca1adf4b9a74bc94b65caa3bf8 100644 (file)
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include <openssl/pem.h>
+#ifndef OPENSSL_NO_RSA
 #include <openssl/rsa.h>
+#endif
+#ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
+#endif
 
 #ifndef OPENSSL_NO_FP_API
 STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, void *u)
@@ -225,7 +229,7 @@ start:
                        if ((xi->x_pkey->dec_pkey=EVP_PKEY_new()) == NULL)
                                goto err;
                        xi->x_pkey->dec_pkey->type=EVP_PKEY_EC;
-                       pp=&(xi->x_pkey->dec_pkey->pkey.eckey);
+                       pp=&(xi->x_pkey->dec_pkey->pkey.ec);
                        if ((int)strlen(header) > 10) /* assume encrypted */
                                raw=1;
                        }