Loading CHANGES +11 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,17 @@ Changes between 0.9.4 and 0.9.5 [xx XXX 1999] *) Add PKCS#10 attributes to field table: challengePassword, unstructuredName and unstructuredAddress. These are taken from draft PKCS#9 v2.0 but are compatible with v1.2 provided no international characters are used. More changes to X509_ATTRIBUTE code: allow the setting of types based on strings. Remove the 'loc' parameter when adding attributes because these will be a SET OF encoding which is sorted in ASN1 order. [Steve Henson] *) Initial changes to the 'req' utility to allow request generation automation. This will allow an application to just generate a template file containing all the field values and have req construct the Loading apps/x509.c +2 −2 Original line number Diff line number Diff line Loading @@ -557,7 +557,7 @@ bad: } } if(alias) X509_alias_set(x, (unsigned char *)alias, -1); if(alias) X509_alias_rset(x, (unsigned char *)alias, -1); if(clrtrust) X509_trust_clear(x); if(clrreject) X509_reject_clear(x); Loading Loading @@ -601,7 +601,7 @@ bad: else if (aliasout == i) { unsigned char *alstr; alstr = X509_alias_get(x, NULL); alstr = X509_alias_iget(x, NULL); if(alstr) BIO_printf(STDout,"%s\n", alstr); else BIO_puts(STDout,"<No Alias>\n"); } Loading crypto/asn1/a_strnid.c +4 −1 Original line number Diff line number Diff line Loading @@ -163,11 +163,14 @@ static ASN1_STRING_TABLE tbl_standard[] = { {NID_organizationName, 1, ub_organization_name, DIRSTRING_TYPE, 0}, {NID_organizationalUnitName, 1, ub_organization_unit_name, DIRSTRING_TYPE, 0}, {NID_pkcs9_emailAddress, 1, ub_email_address, B_ASN1_IA5STRING, STABLE_NO_MASK}, {NID_pkcs9_unstructuredName, 1, -1, PKCS9STRING_TYPE, 0}, {NID_pkcs9_challengePassword, 1, -1, PKCS9STRING_TYPE, 0}, {NID_pkcs9_unstructuredAddress, 1, -1, DIRSTRING_TYPE, 0}, {NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_surname, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_initials, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_name, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK}, {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK} }; static int sk_table_cmp(ASN1_STRING_TABLE **a, ASN1_STRING_TABLE **b) Loading crypto/asn1/asn1.h +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ typedef struct asn1_string_st #define STABLE_NO_MASK 0x02 #define DIRSTRING_TYPE \ (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING) #define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING) typedef struct asn1_string_table_st { int nid; Loading crypto/asn1/x_x509a.c +2 −2 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ static X509_CERT_AUX *aux_get(X509 *x) return x->aux; } int X509_alias_set(X509 *x, unsigned char *name, int len) int X509_alias_rset(X509 *x, unsigned char *name, int len) { X509_CERT_AUX *aux; if(!(aux = aux_get(x))) return 0; Loading @@ -152,7 +152,7 @@ int X509_alias_set(X509 *x, unsigned char *name, int len) return ASN1_STRING_set(aux->alias, name, len); } unsigned char *X509_alias_get(X509 *x, int *len) unsigned char *X509_alias_iget(X509 *x, int *len) { if(!x->aux || !x->aux->alias) return NULL; if(len) *len = x->aux->alias->length; Loading Loading
CHANGES +11 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,17 @@ Changes between 0.9.4 and 0.9.5 [xx XXX 1999] *) Add PKCS#10 attributes to field table: challengePassword, unstructuredName and unstructuredAddress. These are taken from draft PKCS#9 v2.0 but are compatible with v1.2 provided no international characters are used. More changes to X509_ATTRIBUTE code: allow the setting of types based on strings. Remove the 'loc' parameter when adding attributes because these will be a SET OF encoding which is sorted in ASN1 order. [Steve Henson] *) Initial changes to the 'req' utility to allow request generation automation. This will allow an application to just generate a template file containing all the field values and have req construct the Loading
apps/x509.c +2 −2 Original line number Diff line number Diff line Loading @@ -557,7 +557,7 @@ bad: } } if(alias) X509_alias_set(x, (unsigned char *)alias, -1); if(alias) X509_alias_rset(x, (unsigned char *)alias, -1); if(clrtrust) X509_trust_clear(x); if(clrreject) X509_reject_clear(x); Loading Loading @@ -601,7 +601,7 @@ bad: else if (aliasout == i) { unsigned char *alstr; alstr = X509_alias_get(x, NULL); alstr = X509_alias_iget(x, NULL); if(alstr) BIO_printf(STDout,"%s\n", alstr); else BIO_puts(STDout,"<No Alias>\n"); } Loading
crypto/asn1/a_strnid.c +4 −1 Original line number Diff line number Diff line Loading @@ -163,11 +163,14 @@ static ASN1_STRING_TABLE tbl_standard[] = { {NID_organizationName, 1, ub_organization_name, DIRSTRING_TYPE, 0}, {NID_organizationalUnitName, 1, ub_organization_unit_name, DIRSTRING_TYPE, 0}, {NID_pkcs9_emailAddress, 1, ub_email_address, B_ASN1_IA5STRING, STABLE_NO_MASK}, {NID_pkcs9_unstructuredName, 1, -1, PKCS9STRING_TYPE, 0}, {NID_pkcs9_challengePassword, 1, -1, PKCS9STRING_TYPE, 0}, {NID_pkcs9_unstructuredAddress, 1, -1, DIRSTRING_TYPE, 0}, {NID_givenName, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_surname, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_initials, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_name, 1, ub_name, DIRSTRING_TYPE, 0}, {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK}, {NID_dnQualifier, -1, -1, B_ASN1_PRINTABLESTRING, STABLE_NO_MASK} }; static int sk_table_cmp(ASN1_STRING_TABLE **a, ASN1_STRING_TABLE **b) Loading
crypto/asn1/asn1.h +1 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ typedef struct asn1_string_st #define STABLE_NO_MASK 0x02 #define DIRSTRING_TYPE \ (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING) #define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING) typedef struct asn1_string_table_st { int nid; Loading
crypto/asn1/x_x509a.c +2 −2 Original line number Diff line number Diff line Loading @@ -144,7 +144,7 @@ static X509_CERT_AUX *aux_get(X509 *x) return x->aux; } int X509_alias_set(X509 *x, unsigned char *name, int len) int X509_alias_rset(X509 *x, unsigned char *name, int len) { X509_CERT_AUX *aux; if(!(aux = aux_get(x))) return 0; Loading @@ -152,7 +152,7 @@ int X509_alias_set(X509 *x, unsigned char *name, int len) return ASN1_STRING_set(aux->alias, name, len); } unsigned char *X509_alias_get(X509 *x, int *len) unsigned char *X509_alias_iget(X509 *x, int *len) { if(!x->aux || !x->aux->alias) return NULL; if(len) *len = x->aux->alias->length; Loading