Increase print buffer (10K instead of just 2K).
[oweals/openssl.git] / crypto / asn1 / x_name.c
index 5df74b9f45063ddc9cbdc95ed66f13416ede5deb..b832deb928b0fe48d35fd55ceb5a3f5126caabf2 100644 (file)
@@ -60,6 +60,7 @@
 #include "cryptlib.h"
 #include <openssl/objects.h>
 #include <openssl/asn1_mac.h>
+#include <openssl/x509.h>
 
 static int i2d_X509_NAME_entries(X509_NAME *a);
 int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a, unsigned char **pp)
@@ -216,7 +217,7 @@ X509_NAME *X509_NAME_new(void)
        ASN1_CTX c;
 
        M_ASN1_New_Malloc(ret,X509_NAME);
-       if ((ret->entries=sk_X509_NAME_ENTRY_new(NULL)) == NULL)
+       if ((ret->entries=sk_X509_NAME_ENTRY_new_null()) == NULL)
                { c.line=__LINE__; goto err2; }
        M_ASN1_New(ret->bytes,BUF_MEM_new);
        ret->modified=1;
@@ -245,15 +246,15 @@ void X509_NAME_free(X509_NAME *a)
 
        BUF_MEM_free(a->bytes);
        sk_X509_NAME_ENTRY_pop_free(a->entries,X509_NAME_ENTRY_free);
-       Free(a);
+       OPENSSL_free(a);
        }
 
 void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a)
        {
        if (a == NULL) return;
        ASN1_OBJECT_free(a->object);
-       ASN1_BIT_STRING_free(a->value);
-       Free(a);
+       M_ASN1_BIT_STRING_free(a->value);
+       OPENSSL_free(a);
        }
 
 int X509_NAME_set(X509_NAME **xn, X509_NAME *name)