X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fasn1%2Fa_print.c;h=b7bd2bd18aeb5b05d23000d9f7c8f51dffb40762;hb=9ef9e78520eba0fb3d92b581dc4f895a5f464387;hp=3d7629089c9a6366d57f7bb66fb3fe4d05018830;hpb=a9be3af5ad4836f7e50f0546311ca90c717b861e;p=oweals%2Fopenssl.git diff --git a/crypto/asn1/a_print.c b/crypto/asn1/a_print.c index 3d7629089c..b7bd2bd18a 100644 --- a/crypto/asn1/a_print.c +++ b/crypto/asn1/a_print.c @@ -60,6 +60,12 @@ #include "cryptlib.h" #include +ASN1_IA5STRING *ASN1_IA5STRING_new(void) +{ return M_ASN1_IA5STRING_new();} + +void ASN1_IA5STRING_free(ASN1_IA5STRING *x) +{ M_ASN1_IA5STRING_free(x);} + int i2d_ASN1_IA5STRING(ASN1_IA5STRING *a, unsigned char **pp) { return(M_i2d_ASN1_IA5STRING(a,pp)); } @@ -67,15 +73,30 @@ 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) +{ 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) +{ 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, l)); } +int i2d_ASN1_PRINTABLESTRING(ASN1_PRINTABLESTRING *a, unsigned char **pp) + { return(M_i2d_ASN1_PRINTABLESTRING(a,pp)); } + int i2d_ASN1_PRINTABLE(ASN1_STRING *a, unsigned char **pp) { return(M_i2d_ASN1_PRINTABLE(a,pp)); } @@ -95,6 +116,7 @@ int ASN1_PRINTABLE_type(unsigned char *s, int len) while ((*s) && (len-- != 0)) { c= *(s++); +#ifndef CHARSET_EBCDIC if (!( ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || (c == ' ') || @@ -108,6 +130,13 @@ int ASN1_PRINTABLE_type(unsigned char *s, int len) ia5=1; if (c&0x80) t61=1; +#else + if (!isalnum(c) && (c != ' ') && + strchr("'()+,-./:=?", c) == NULL) + ia5=1; + if (os_toascii[c] & 0x80) + t61=1; +#endif } if (t61) return(V_ASN1_T61STRING); if (ia5) return(V_ASN1_IA5STRING); @@ -141,6 +170,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) +{ M_DIRECTORYSTRING_free(x);} int i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **pp) { return(M_i2d_DIRECTORYSTRING(a,pp)); } @@ -149,6 +183,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) +{ M_DISPLAYTEXT_free(x);} + int i2d_DISPLAYTEXT(ASN1_STRING *a, unsigned char **pp) { return(M_i2d_DISPLAYTEXT(a,pp)); }