summaryrefslogtreecommitdiff
path: root/lib/gnutls_cert.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-07-26 15:49:33 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-07-26 15:49:33 +0000
commit2d44edb6a24dcdd00ba1c79cacc7cc7d12546495 (patch)
tree398be1bf214a2196491d45283690d75757d12aa3 /lib/gnutls_cert.c
parentc7ec2b38282a0d103210cfb2958ddaf87abbf6d9 (diff)
downloadgnutls-2d44edb6a24dcdd00ba1c79cacc7cc7d12546495.tar.gz
*** empty log message ***
Diffstat (limited to 'lib/gnutls_cert.c')
-rw-r--r--lib/gnutls_cert.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c
index 91eafc9db4..f300e37c9c 100644
--- a/lib/gnutls_cert.c
+++ b/lib/gnutls_cert.c
@@ -457,10 +457,10 @@ static int _read_rsa_params(opaque * der, int dersize, MPI ** params)
/* res is not malloced
*/
-#define _READ( str, OID, NAME, res) \
+#define _READ( str, OID, ANAME, NAME, res) \
if(strcmp(str, OID)==0){ \
- strcpy( str, "PKIX1Implicit88.X520"); \
- strcat( str, NAME); \
+ strcpy( str, "PKIX1Implicit88."); \
+ strcat( str, ANAME); \
strcpy( name2, "temp-structure-"); \
strcat( name2, NAME); \
if ( (result = asn1_create_structure( _gnutls_get_pkix(), str, &tmpasn, name2)) != ASN_OK) { \
@@ -508,7 +508,6 @@ void _gnutls_int2str(int k, char* data) {
* ASN.1 structure. (Taken from Fabio's samples!)
* --nmav
*/
-#warning "Fix COUNTRY/EMAIL"
static int _get_Name_type( node_asn *rasn, char *root, gnutls_DN * dn)
{
int k, k2, result, len;
@@ -562,21 +561,21 @@ static int _get_Name_type( node_asn *rasn, char *root, gnutls_DN * dn)
if (result == ASN_OK) {
node_asn *tmpasn;
-
- _READ(str, "2 5 4 6", "countryName",
- dn->country);
- _READ(str, "2 5 4 10", "OrganizationName",
- dn->organization);
- _READ(str, "2 5 4 11",
- "OrganizationalUnitName",
- dn->organizational_unit_name);
- _READ(str, "2 5 4 3", "CommonName",
- dn->common_name);
- _READ(str, "2 5 4 7", "LocalityName",
- dn->locality_name);
- _READ(str, "2 5 4 8",
- "StateOrProvinceName",
- dn->state_or_province_name);
+#ifdef DEBUG
+# warning " FIX COUNTRY HERE"
+#endif
+ _READ(str, "2 5 4 6", "X520OrganizationName",
+ "countryName", dn->country);
+ _READ(str, "2 5 4 10", "X520OrganizationName",
+ "OrganizationName", dn->organization);
+ _READ(str, "2 5 4 11", "X520OrganizationalUnitName",
+ "OrganizationalUnitName", dn->organizational_unit_name);
+ _READ(str, "2 5 4 3", "X520CommonName",
+ "CommonName", dn->common_name);
+ _READ(str, "2 5 4 7", "X520LocalityName",
+ "LocalityName", dn->locality_name);
+ _READ(str, "2 5 4 8", "X520StateOrProvinceName",
+ "StateOrProvinceName", dn->state_or_province_name);
}
} while (1);
} while (1);