Fix CRL encoding bug.
[oweals/openssl.git] / crypto / asn1 / x_pkey.c
index 2e677f0b240c35c4d32369e8522c38a574c46c18..0c81558dc4b2263fbf284b5a43479afb7340bd26 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "evp.h"
-#include "objects.h"
-#include "asn1_mac.h"
-
-/* ASN1err(ASN1_F_D2I_X509_PKEY,ASN1_R_UNSUPPORTED_CIPHER); */
-/* ASN1err(ASN1_F_X509_PKEY_NEW,ASN1_R_IV_TOO_LARGE); */
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/asn1_mac.h>
+#include <openssl/x509.h>
 
 /* need to implement */
 int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp)
@@ -114,7 +112,7 @@ X509_PKEY *X509_PKEY_new(void)
        M_ASN1_New_Malloc(ret,X509_PKEY);
        ret->version=0;
        M_ASN1_New(ret->enc_algor,X509_ALGOR_new);
-       M_ASN1_New(ret->enc_pkey,ASN1_OCTET_STRING_new);
+       M_ASN1_New(ret->enc_pkey,M_ASN1_OCTET_STRING_new);
        ret->dec_pkey=NULL;
        ret->key_length=0;
        ret->key_data=NULL;
@@ -146,7 +144,7 @@ void X509_PKEY_free(X509_PKEY *x)
 #endif
 
        if (x->enc_algor != NULL) X509_ALGOR_free(x->enc_algor);
-       if (x->enc_pkey != NULL) ASN1_OCTET_STRING_free(x->enc_pkey);
+       if (x->enc_pkey != NULL) M_ASN1_OCTET_STRING_free(x->enc_pkey);
        if (x->dec_pkey != NULL)EVP_PKEY_free(x->dec_pkey);
        if ((x->key_data != NULL) && (x->key_free)) Free((char *)x->key_data);
        Free((char *)(char *)x);