summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-10-20 01:50:23 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-10-20 01:50:23 +0000
commit08e9c1af6c26f74ef7f7524be4b89241ff232a8c (patch)
tree7fe3f66fdfb1f20a5bfcbbf98369032374f3a79b /crypto/asn1
parent023c8d0b0aec445b680ef5aea2bd2154adb59974 (diff)
Replace the macros in asn1.h with function equivalents. Also make UTF8Strings
tolerated in certificates.
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/a_bitstr.c13
-rw-r--r--crypto/asn1/a_bmp.c6
-rw-r--r--crypto/asn1/a_enum.c14
-rw-r--r--crypto/asn1/a_gentm.c10
-rw-r--r--crypto/asn1/a_hdr.c4
-rw-r--r--crypto/asn1/a_int.c24
-rw-r--r--crypto/asn1/a_octet.c20
-rw-r--r--crypto/asn1/a_print.c29
-rw-r--r--crypto/asn1/a_time.c6
-rw-r--r--crypto/asn1/a_utctm.c10
-rw-r--r--crypto/asn1/a_utf8.c6
-rw-r--r--crypto/asn1/a_vis.c6
-rw-r--r--crypto/asn1/asn1.h183
-rw-r--r--crypto/asn1/asn1_lib.c11
-rw-r--r--crypto/asn1/asn1_par.c8
-rw-r--r--crypto/asn1/d2i_dhp.c4
-rw-r--r--crypto/asn1/d2i_dsap.c4
-rw-r--r--crypto/asn1/d2i_r_pr.c5
-rw-r--r--crypto/asn1/d2i_r_pu.c4
-rw-r--r--crypto/asn1/d2i_s_pr.c4
-rw-r--r--crypto/asn1/d2i_s_pu.c4
-rw-r--r--crypto/asn1/evp_asn1.c24
-rw-r--r--crypto/asn1/n_pkey.c14
-rw-r--r--crypto/asn1/p5_pbe.c8
-rw-r--r--crypto/asn1/p5_pbev2.c12
-rw-r--r--crypto/asn1/p7_dgst.c8
-rw-r--r--crypto/asn1/p7_enc.c4
-rw-r--r--crypto/asn1/p7_enc_c.c2
-rw-r--r--crypto/asn1/p7_evp.c4
-rw-r--r--crypto/asn1/p7_i_s.c4
-rw-r--r--crypto/asn1/p7_lib.c2
-rw-r--r--crypto/asn1/p7_recip.c8
-rw-r--r--crypto/asn1/p7_s_e.c4
-rw-r--r--crypto/asn1/p7_signd.c4
-rw-r--r--crypto/asn1/p7_signi.c8
-rw-r--r--crypto/asn1/p8_pkey.c4
-rw-r--r--crypto/asn1/t_crl.c2
-rw-r--r--crypto/asn1/t_req.c2
-rw-r--r--crypto/asn1/t_x509.c2
-rw-r--r--crypto/asn1/x_cinf.c16
-rw-r--r--crypto/asn1/x_crl.c22
-rw-r--r--crypto/asn1/x_exten.c4
-rw-r--r--crypto/asn1/x_name.c2
-rw-r--r--crypto/asn1/x_pkey.c4
-rw-r--r--crypto/asn1/x_pubkey.c6
-rw-r--r--crypto/asn1/x_req.c8
-rw-r--r--crypto/asn1/x_sig.c4
-rw-r--r--crypto/asn1/x_spki.c8
-rw-r--r--crypto/asn1/x_val.c8
-rw-r--r--crypto/asn1/x_x509.c4
50 files changed, 357 insertions, 220 deletions
diff --git a/crypto/asn1/a_bitstr.c b/crypto/asn1/a_bitstr.c
index 38ea802be8..a441cde1db 100644
--- a/crypto/asn1/a_bitstr.c
+++ b/crypto/asn1/a_bitstr.c
@@ -60,6 +60,15 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_BIT_STRING *ASN1_BIT_STRING_new(void)
+{ return M_ASN1_BIT_STRING_new(); }
+
+void ASN1_BIT_STRING_free(ASN1_BIT_STRING *x)
+{ return M_ASN1_BIT_STRING_free(x); }
+
+int ASN1_BIT_STRING_set(ASN1_BIT_STRING *x, unsigned char *d, int len)
+{ return M_ASN1_BIT_STRING_set(x, d, len); }
+
int i2d_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp)
{
int ret,j,r,bits,len;
@@ -121,7 +130,7 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
if ((a == NULL) || ((*a) == NULL))
{
- if ((ret=ASN1_BIT_STRING_new()) == NULL) return(NULL);
+ if ((ret=M_ASN1_BIT_STRING_new()) == NULL) return(NULL);
}
else
ret=(*a);
@@ -173,7 +182,7 @@ ASN1_BIT_STRING *d2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a, unsigned char **pp,
err:
ASN1err(ASN1_F_D2I_ASN1_BIT_STRING,i);
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
- ASN1_BIT_STRING_free(ret);
+ M_ASN1_BIT_STRING_free(ret);
return(NULL);
}
diff --git a/crypto/asn1/a_bmp.c b/crypto/asn1/a_bmp.c
index 6075871984..eba61a7747 100644
--- a/crypto/asn1/a_bmp.c
+++ b/crypto/asn1/a_bmp.c
@@ -60,6 +60,12 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_BMPSTRING *ASN1_BMPSTRING_new(void)
+{ return M_ASN1_BMPSTRING_new(); }
+
+void ASN1_BMPSTRING_free(ASN1_BMPSTRING *x)
+{ return M_ASN1_BMPSTRING_free(x); }
+
int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **pp)
{
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
diff --git a/crypto/asn1/a_enum.c b/crypto/asn1/a_enum.c
index 9239ecc439..32cfe5b599 100644
--- a/crypto/asn1/a_enum.c
+++ b/crypto/asn1/a_enum.c
@@ -65,6 +65,12 @@
* for comments on encoding see a_int.c
*/
+ASN1_ENUMERATED *ASN1_ENUMERATED_new(void)
+{ return M_ASN1_ENUMERATED_new(); }
+
+void ASN1_ENUMERATED_free(ASN1_ENUMERATED *x)
+{ return M_ASN1_ENUMERATED_free(x); }
+
int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **pp)
{
int pad=0,ret,r,i,t;
@@ -142,7 +148,7 @@ ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp,
if ((a == NULL) || ((*a) == NULL))
{
- if ((ret=ASN1_ENUMERATED_new()) == NULL) return(NULL);
+ if ((ret=M_ASN1_ENUMERATED_new()) == NULL) return(NULL);
ret->type=V_ASN1_ENUMERATED;
}
else
@@ -217,7 +223,7 @@ ASN1_ENUMERATED *d2i_ASN1_ENUMERATED(ASN1_ENUMERATED **a, unsigned char **pp,
err:
ASN1err(ASN1_F_D2I_ASN1_ENUMERATED,i);
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
- ASN1_ENUMERATED_free(ret);
+ M_ASN1_ENUMERATED_free(ret);
return(NULL);
}
@@ -295,7 +301,7 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
int len,j;
if (ai == NULL)
- ret=ASN1_ENUMERATED_new();
+ ret=M_ASN1_ENUMERATED_new();
else
ret=ai;
if (ret == NULL)
@@ -311,7 +317,7 @@ ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai)
ret->length=BN_bn2bin(bn,ret->data);
return(ret);
err:
- if (ret != ai) ASN1_ENUMERATED_free(ret);
+ if (ret != ai) M_ASN1_ENUMERATED_free(ret);
return(NULL);
}
diff --git a/crypto/asn1/a_gentm.c b/crypto/asn1/a_gentm.c
index 226474f057..d5b8bd99b2 100644
--- a/crypto/asn1/a_gentm.c
+++ b/crypto/asn1/a_gentm.c
@@ -63,6 +63,12 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_new(void)
+{ return M_ASN1_GENERALIZEDTIME_new(); }
+
+void ASN1_GENERALIZEDTIME_free(ASN1_GENERALIZEDTIME *x)
+{ return M_ASN1_GENERALIZEDTIME_free(x); }
+
int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp)
{
#ifdef CHARSET_EBCDIC
@@ -106,7 +112,7 @@ ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a,
return(ret);
err:
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
- ASN1_GENERALIZEDTIME_free(ret);
+ M_ASN1_GENERALIZEDTIME_free(ret);
return(NULL);
}
@@ -193,7 +199,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
#endif
if (s == NULL)
- s=ASN1_GENERALIZEDTIME_new();
+ s=M_ASN1_GENERALIZEDTIME_new();
if (s == NULL)
return(NULL);
diff --git a/crypto/asn1/a_hdr.c b/crypto/asn1/a_hdr.c
index 1171d36443..8dc58ed6d2 100644
--- a/crypto/asn1/a_hdr.c
+++ b/crypto/asn1/a_hdr.c
@@ -102,7 +102,7 @@ ASN1_HEADER *ASN1_HEADER_new(void)
ASN1_CTX c;
M_ASN1_New_Malloc(ret,ASN1_HEADER);
- M_ASN1_New(ret->header,ASN1_OCTET_STRING_new);
+ M_ASN1_New(ret->header,M_ASN1_OCTET_STRING_new);
ret->meth=NULL;
ret->data=NULL;
return(ret);
@@ -112,7 +112,7 @@ ASN1_HEADER *ASN1_HEADER_new(void)
void ASN1_HEADER_free(ASN1_HEADER *a)
{
if (a == NULL) return;
- ASN1_OCTET_STRING_free(a->header);
+ M_ASN1_OCTET_STRING_free(a->header);
if (a->meth != NULL)
a->meth->destroy(a->data);
Free((char *)a);
diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c
index d05436378b..de40623f42 100644
--- a/crypto/asn1/a_int.c
+++ b/crypto/asn1/a_int.c
@@ -60,6 +60,18 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_INTEGER *ASN1_INTEGER_new(void)
+{ return M_ASN1_INTEGER_new();}
+
+void ASN1_INTEGER_free(ASN1_INTEGER *x)
+{ return M_ASN1_INTEGER_free(x);}
+
+ASN1_INTEGER *ASN1_INTEGER_dup(ASN1_INTEGER *x)
+{ return M_ASN1_INTEGER_dup(x);}
+
+int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y)
+{ return M_ASN1_INTEGER_cmp(x,y);}
+
/*
* This converts an ASN1 INTEGER into its DER encoding.
* The internal representation is an ASN1_STRING whose data is a big endian
@@ -160,7 +172,7 @@ ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp,
if ((a == NULL) || ((*a) == NULL))
{
- if ((ret=ASN1_INTEGER_new()) == NULL) return(NULL);
+ if ((ret=M_ASN1_INTEGER_new()) == NULL) return(NULL);
ret->type=V_ASN1_INTEGER;
}
else
@@ -240,7 +252,7 @@ ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp,
err:
ASN1err(ASN1_F_D2I_ASN1_INTEGER,i);
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
- ASN1_INTEGER_free(ret);
+ M_ASN1_INTEGER_free(ret);
return(NULL);
}
@@ -260,7 +272,7 @@ ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, unsigned char **pp,
if ((a == NULL) || ((*a) == NULL))
{
- if ((ret=ASN1_INTEGER_new()) == NULL) return(NULL);
+ if ((ret=M_ASN1_INTEGER_new()) == NULL) return(NULL);
ret->type=V_ASN1_INTEGER;
}
else
@@ -307,7 +319,7 @@ ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, unsigned char **pp,
err:
ASN1err(ASN1_F_D2I_ASN1_UINTEGER,i);
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
- ASN1_INTEGER_free(ret);
+ M_ASN1_INTEGER_free(ret);
return(NULL);
}
@@ -385,7 +397,7 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
int len,j;
if (ai == NULL)
- ret=ASN1_INTEGER_new();
+ ret=M_ASN1_INTEGER_new();
else
ret=ai;
if (ret == NULL)
@@ -401,7 +413,7 @@ ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai)
ret->length=BN_bn2bin(bn,ret->data);
return(ret);
err:
- if (ret != ai) ASN1_INTEGER_free(ret);
+ if (ret != ai) M_ASN1_INTEGER_free(ret);
return(NULL);
}
diff --git a/crypto/asn1/a_octet.c b/crypto/asn1/a_octet.c
index 7659a13bd3..bd6264eec1 100644
--- a/crypto/asn1/a_octet.c
+++ b/crypto/asn1/a_octet.c
@@ -60,11 +60,23 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_OCTET_STRING *ASN1_OCTET_STRING_new(void)
+{ return M_ASN1_OCTET_STRING_new(); }
+
+void ASN1_OCTET_STRING_free(ASN1_OCTET_STRING *x)
+{ return M_ASN1_OCTET_STRING_free(x); }
+
+ASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(ASN1_OCTET_STRING *x)
+{ return M_ASN1_OCTET_STRING_dup(x); }
+
+int ASN1_OCTET_STRING_cmp(ASN1_OCTET_STRING *a, ASN1_OCTET_STRING *b)
+{ return M_ASN1_OCTET_STRING_cmp(a, b); }
+
+int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, unsigned char *d, int len)
+{ return M_ASN1_OCTET_STRING_set(x, d, len); }
+
int i2d_ASN1_OCTET_STRING(ASN1_OCTET_STRING *a, unsigned char **pp)
- {
- return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
- V_ASN1_OCTET_STRING,V_ASN1_UNIVERSAL));
- }
+{ return M_i2d_ASN1_OCTET_STRING(a, pp); }
ASN1_OCTET_STRING *d2i_ASN1_OCTET_STRING(ASN1_OCTET_STRING **a,
unsigned char **pp, long length)
diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c
index cdec7a1561..21bdcdb904 100644
--- a/crypto/asn1/a_print.c
+++ b/crypto/asn1/a_print.c
@@ -60,6 +60,12 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_IA5STRING *ASN1_IA5STRING_new(void)
+{ return M_ASN1_IA5STRING_new();}
+
+void ASN1_IA5STRING_free(ASN1_IA5STRING *x)
+{ return M_ASN1_IA5STRING_free(x);}
+
int i2d_ASN1_IA5STRING(ASN1_IA5STRING *a, unsigned char **pp)
{ return(M_i2d_ASN1_IA5STRING(a,pp)); }
@@ -67,10 +73,22 @@ ASN1_IA5STRING *d2i_ASN1_IA5STRING(ASN1_IA5STRING **a, unsigned char **pp,
long l)
{ return(M_d2i_ASN1_IA5STRING(a,pp,l)); }
+ASN1_T61STRING *ASN1_T61STRING_new(void)
+{ return M_ASN1_T61STRING_new();}
+
+void ASN1_T61STRING_free(ASN1_T61STRING *x)
+{ return M_ASN1_T61STRING_free(x);}
+
ASN1_T61STRING *d2i_ASN1_T61STRING(ASN1_T61STRING **a, unsigned char **pp,
long l)
{ return(M_d2i_ASN1_T61STRING(a,pp,l)); }
+ASN1_PRINTABLESTRING *ASN1_PRINTABLESTRING_new(void)
+{ return M_ASN1_PRINTABLESTRING_new();}
+
+void ASN1_PRINTABLESTRING_free(ASN1_PRINTABLESTRING *x)
+{ return M_ASN1_PRINTABLESTRING_free(x);}
+
ASN1_PRINTABLESTRING *d2i_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING **a,
unsigned char **pp, long l)
{ return(M_d2i_ASN1_PRINTABLESTRING(a,pp,
@@ -149,6 +167,11 @@ int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s)
return(1);
}
+ASN1_STRING *DIRECTORYSTRING_new(void)
+{ return M_DIRECTORYSTRING_new();}
+
+void DIRECTORYSTRING_free(ASN1_STRING *x)
+{ return M_DIRECTORYSTRING_free(x);}
int i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **pp)
{ return(M_i2d_DIRECTORYSTRING(a,pp)); }
@@ -157,6 +180,12 @@ ASN1_STRING *d2i_DIRECTORYSTRING(ASN1_STRING **a, unsigned char **pp,
long l)
{ return(M_d2i_DIRECTORYSTRING(a,pp,l)); }
+ASN1_STRING *DISPLAYTEXT_new(void)
+{ return M_DISPLAYTEXT_new();}
+
+void DISPLAYTEXT_free(ASN1_STRING *x)
+{ return M_DISPLAYTEXT_free(x);}
+
int i2d_DISPLAYTEXT(ASN1_STRING *a, unsigned char **pp)
{ return(M_i2d_DISPLAYTEXT(a,pp)); }
diff --git a/crypto/asn1/a_time.c b/crypto/asn1/a_time.c
index c1690a5694..d1900f68e4 100644
--- a/crypto/asn1/a_time.c
+++ b/crypto/asn1/a_time.c
@@ -66,6 +66,12 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_TIME *ASN1_TIME_new(void)
+{ return M_ASN1_TIME_new(); }
+
+void ASN1_TIME_free(ASN1_TIME *x)
+{ return M_ASN1_TIME_free(x); }
+
int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp)
{
#ifdef CHARSET_EBCDIC
diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c
index 688199fdd2..ba349455a1 100644
--- a/crypto/asn1/a_utctm.c
+++ b/crypto/asn1/a_utctm.c
@@ -66,6 +66,12 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_UTCTIME *ASN1_UTCTIME_new(void)
+{ return M_ASN1_UTCTIME_new(); }
+
+void ASN1_UTCTIME_free(ASN1_UTCTIME *x)
+{ return M_ASN1_UTCTIME_free(x); }
+
int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp)
{
#ifndef CHARSET_EBCDIC
@@ -109,7 +115,7 @@ ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, unsigned char **pp,
return(ret);
err:
if ((ret != NULL) && ((a == NULL) || (*a != ret)))
- ASN1_UTCTIME_free(ret);
+ M_ASN1_UTCTIME_free(ret);
return(NULL);
}
@@ -192,7 +198,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
#endif
if (s == NULL)
- s=ASN1_UTCTIME_new();
+ s=M_ASN1_UTCTIME_new();
if (s == NULL)
return(NULL);
diff --git a/crypto/asn1/a_utf8.c b/crypto/asn1/a_utf8.c
index 7f68b88cd1..16aab7f43e 100644
--- a/crypto/asn1/a_utf8.c
+++ b/crypto/asn1/a_utf8.c
@@ -60,6 +60,12 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_UTF8STRING *ASN1_UTF8STRING_new(void)
+{ return M_ASN1_UTF8STRING_new();}
+
+void ASN1_UTF8STRING_free(ASN1_UTF8STRING *x)
+{ return M_ASN1_UTF8STRING_free(x);}
+
int i2d_ASN1_UTF8STRING(ASN1_UTF8STRING *a, unsigned char **pp)
{
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
diff --git a/crypto/asn1/a_vis.c b/crypto/asn1/a_vis.c
index 2072be780d..3bc3d79f5d 100644
--- a/crypto/asn1/a_vis.c
+++ b/crypto/asn1/a_vis.c
@@ -60,6 +60,12 @@
#include "cryptlib.h"
#include <openssl/asn1.h>
+ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void)
+{ return M_ASN1_VISIBLESTRING_new(); }
+
+void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *x)
+{ return M_ASN1_VISIBLESTRING_free(x); }
+
int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **pp)
{
return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h
index bb5c12131c..edc7aae4b2 100644
--- a/crypto/asn1/asn1.h
+++ b/crypto/asn1/asn1.h
@@ -281,60 +281,50 @@ typedef struct asn1_header_st
ASN1_METHOD *meth;
} ASN1_HEADER;
-#define ASN1_STRING_length(x) ((x)->length)
-#define ASN1_STRING_type(x) ((x)->type)
-#define ASN1_STRING_data(x) ((x)->data)
+#define M_ASN1_STRING_length(x) ((x)->length)
+#define M_ASN1_STRING_length_set(x, n) ((x)->length = (n))
+#define M_ASN1_STRING_type(x) ((x)->type)
+#define M_ASN1_STRING_data(x) ((x)->data)
/* Macros for string operations */
-#define ASN1_BIT_STRING_new() (ASN1_BIT_STRING *)\
+#define M_ASN1_BIT_STRING_new() (ASN1_BIT_STRING *)\
ASN1_STRING_type_new(V_ASN1_BIT_STRING)
-#define ASN1_BIT_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\
+#define M_ASN1_BIT_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\
ASN1_STRING_dup((ASN1_STRING *)a)
-#define ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\
+#define M_ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\
(ASN1_STRING *)a,(ASN1_STRING *)b)
-#define ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c)
-/* i2d_ASN1_BIT_STRING() is a function */
-/* d2i_ASN1_BIT_STRING() is a function */
+#define M_ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c)
-#define ASN1_INTEGER_new() (ASN1_INTEGER *)\
+#define M_ASN1_INTEGER_new() (ASN1_INTEGER *)\
ASN1_STRING_type_new(V_ASN1_INTEGER)
-#define ASN1_INTEGER_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_INTEGER_dup(a) (ASN1_INTEGER *)ASN1_STRING_dup((ASN1_STRING *)a)
-#define ASN1_INTEGER_cmp(a,b) ASN1_STRING_cmp(\
+#define M_ASN1_INTEGER_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_INTEGER_dup(a) (ASN1_INTEGER *)ASN1_STRING_dup((ASN1_STRING *)a)
+#define M_ASN1_INTEGER_cmp(a,b) ASN1_STRING_cmp(\
(ASN1_STRING *)a,(ASN1_STRING *)b)
-/* ASN1_INTEGER_set() is a function, also see BN_to_ASN1_INTEGER() */
-/* ASN1_INTEGER_get() is a function, also see ASN1_INTEGER_to_BN() */
-/* i2d_ASN1_INTEGER() is a function */
-/* d2i_ASN1_INTEGER() is a function */
-#define ASN1_ENUMERATED_new() (ASN1_ENUMERATED *)\
+#define M_ASN1_ENUMERATED_new() (ASN1_ENUMERATED *)\
ASN1_STRING_type_new(V_ASN1_ENUMERATED)
-#define ASN1_ENUMERATED_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)ASN1_STRING_dup((ASN1_STRING *)a)
-#define ASN1_ENUMERATED_cmp(a,b) ASN1_STRING_cmp(\
+#define M_ASN1_ENUMERATED_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)ASN1_STRING_dup((ASN1_STRING *)a)
+#define M_ASN1_ENUMERATED_cmp(a,b) ASN1_STRING_cmp(\
(ASN1_STRING *)a,(ASN1_STRING *)b)
-/* ASN1_ENUMERATED_set() is a function, also see BN_to_ASN1_ENUMERATED() */
-/* ASN1_ENUMERATED_get() is a function, also see ASN1_ENUMERATED_to_BN() */
-/* i2d_ASN1_ENUMERATED() is a function */
-/* d2i_ASN1_ENUMERATED() is a function */
-#define ASN1_OCTET_STRING_new() (ASN1_OCTET_STRING *)\
+#define M_ASN1_OCTET_STRING_new() (ASN1_OCTET_STRING *)\
ASN1_STRING_type_new(V_ASN1_OCTET_STRING)
-#define ASN1_OCTET_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\
+#define M_ASN1_OCTET_STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\
ASN1_STRING_dup((ASN1_STRING *)a)
-#define ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\
+#define M_ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\
(ASN1_STRING *)a,(ASN1_STRING *)b)
-#define ASN1_OCTET_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c)
-#define ASN1_OCTET_STRING_print(a,b) ASN1_STRING_print(a,(ASN1_STRING *)b)
+#define M_ASN1_OCTET_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c)
+#define M_ASN1_OCTET_STRING_print(a,b) ASN1_STRING_print(a,(ASN1_STRING *)b)
#define M_i2d_ASN1_OCTET_STRING(a,pp) \
i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_OCTET_STRING,\
- V_ASN1_OCTET_STRING)
-/* d2i_ASN1_OCTET_STRING() is a function */
+ V_ASN1_UNIVERSAL)
-#define ASN1_PRINTABLE_new() ASN1_STRING_type_new(V_ASN1_T61STRING)
-#define ASN1_PRINTABLE_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_PRINTABLE_new() ASN1_STRING_type_new(V_ASN1_T61STRING)
+#define M_ASN1_PRINTABLE_free(a) ASN1_STRING_free((ASN1_STRING *)a)
#define M_i2d_ASN1_PRINTABLE(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\
pp,a->type,V_ASN1_UNIVERSAL)
#define M_d2i_ASN1_PRINTABLE(a,pp,l) \
@@ -345,10 +335,11 @@ typedef struct asn1_header_st
B_ASN1_BIT_STRING| \
B_ASN1_UNIVERSALSTRING|\
B_ASN1_BMPSTRING|\
+ B_ASN1_UTF8STRING|\
B_ASN1_UNKNOWN)
-#define DIRECTORYSTRING_new() ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)
-#define DIRECTORYSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_DIRECTORYSTRING_new() ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)
+#define M_DIRECTORYSTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
#define M_i2d_DIRECTORYSTRING(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\
pp,a->type,V_ASN1_UNIVERSAL)
#define M_d2i_DIRECTORYSTRING(a,pp,l) \
@@ -359,8 +350,8 @@ typedef struct asn1_header_st
B_ASN1_UNIVERSALSTRING|\
B_ASN1_UTF8STRING)
-#define DISPLAYTEXT_new() ASN1_STRING_type_new(V_ASN1_VISIBLESTRING)
-#define DISPLAYTEXT_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_DISPLAYTEXT_new() ASN1_STRING_type_new(V_ASN1_VISIBLESTRING)
+#define M_DISPLAYTEXT_free(a) ASN1_STRING_free((ASN1_STRING *)a)
#define M_i2d_DISPLAYTEXT(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\
pp,a->type,V_ASN1_UNIVERSAL)
#define M_d2i_DISPLAYTEXT(a,pp,l) \
@@ -369,9 +360,9 @@ typedef struct asn1_header_st
B_ASN1_BMPSTRING|\
B_ASN1_UTF8STRING)
-#define ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING *)\
+#define M_ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING *)\
ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)
-#define ASN1_PRINTABLESTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_PRINTABLESTRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
#define M_i2d_ASN1_PRINTABLESTRING(a,pp) \
i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_PRINTABLESTRING,\
V_ASN1_UNIVERSAL)
@@ -379,9 +370,9 @@ typedef struct asn1_header_st
(ASN1_PRINTABLESTRING *)d2i_ASN1_type_bytes\
((ASN1_STRING **)a,pp,l,B_ASN1_PRINTABLESTRING)
-#define ASN1_T61STRING_new() (ASN1_T61STRING *)\
+#define M_ASN1_T61STRING_new() (ASN1_T61STRING *)\
ASN1_STRING_type_new(V_ASN1_T61STRING)
-#define ASN1_T61STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_T61STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
#define M_i2d_ASN1_T61STRING(a,pp) \
i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_T61STRING,\
V_ASN1_UNIVERSAL)
@@ -389,10 +380,10 @@ typedef struct asn1_header_st
(ASN1_T61STRING *)d2i_ASN1_type_bytes\
((ASN1_STRING **)a,pp,l,B_ASN1_T61STRING)
-#define ASN1_IA5STRING_new() (ASN1_IA5STRING *)\
+#define M_ASN1_IA5STRING_new() (ASN1_IA5STRING *)\
ASN1_STRING_type_new(V_ASN1_IA5STRING)
-#define ASN1_IA5STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_IA5STRING_dup(a) \
+#define M_ASN1_IA5STRING_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_IA5STRING_dup(a) \
(ASN1_IA5STRING *)ASN1_STRING_dup((ASN1_STRING *)a)
#define M_i2d_ASN1_IA5STRING(a,pp) \
i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\
@@ -401,38 +392,25 @@ typedef struct asn1_header_st
(ASN1_IA5STRING *)d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l,\
B_ASN1_IA5STRING)
-#define ASN1_UTCTIME_new() (ASN1_UTCTIME *)\
+#define M_ASN1_UTCTIME_new() (ASN1_UTCTIME *)\
ASN1_STRING_type_new(V_ASN1_UTCTIME)
-#define ASN1_UTCTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)ASN1_STRING_dup((ASN1_STRING *)a)
-/* i2d_ASN1_UTCTIME() is a function */
-/* d2i_ASN1_UTCTIME() is a function */
-/* ASN1_UTCTIME_set() is a function */
-/* ASN1_UTCTIME_check() is a function */
-
-#define ASN1_GENERALIZEDTIME_new() (ASN1_GENERALIZEDTIME *)\
+#define M_ASN1_UTCTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)ASN1_STRING_dup((ASN1_STRING *)a)
+
+#define M_ASN1_GENERALIZEDTIME_new() (ASN1_GENERALIZEDTIME *)\
ASN1_STRING_type_new(V_ASN1_GENERALIZEDTIME)
-#define ASN1_GENERALIZEDTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\
+#define M_ASN1_GENERALIZEDTIME_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\
(ASN1_STRING *)a)
-/* i2d_ASN1_GENERALIZEDTIME() is a function */
-/* d2i_ASN1_GENERALIZEDTIME() is a function */
-/* ASN1_GENERALIZEDTIME_set() is a function */
-/* ASN1_GENERALIZEDTIME_check() is a function */
-#define ASN1_TIME_new() (ASN1_TIME *)\
+#define M_ASN1_TIME_new() (ASN1_TIME *)\
ASN1_STRING_type_new(V_ASN1_UTCTIME)
-#define ASN1_TIME_free(a) ASN1_STRING_free((ASN1_STRING *)a)
-#define ASN1_TIME_dup(a) (ASN1_TIME *)ASN1_STRING_dup((ASN1_STRING *)a)
-
-/* i2d_ASN1_TIME() is a function */
-/* d2i_ASN1_TIME() is a function */
-/* ASN1_TIME_set() is a function */
-/* ASN1_TIME_check() is a function */
+#define M_ASN1_TIME_free(a) ASN1_STRING_free((ASN1_STRING *)a)
+#define M_ASN1_TIME_dup(a) (ASN1_TIME *)ASN1_STRING_dup((ASN1_STRING *)a)
-#define ASN1_GENERALSTRING_new() (ASN1_GENERALSTRING *)\
+#define M_ASN1_GENERALSTRING_new() (ASN1_GENERAL