2
* Copyright (C) 2003, 2004, 2005 Free Software Foundation
4
* Author: Nikos Mavrogiannopoulos
6
* This file is part of GNUTLS.
8
* The GNUTLS library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation; either version 2.1 of
11
* the License, or (at your option) any later version.
13
* This library is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
28
/* Some OIDs usually found in Distinguished names
30
#define OID_X520_COUNTRY_NAME "2.5.4.6"
31
#define OID_X520_ORGANIZATION_NAME "2.5.4.10"
32
#define OID_X520_ORGANIZATIONAL_UNIT_NAME "2.5.4.11"
33
#define OID_X520_COMMON_NAME "2.5.4.3"
34
#define OID_X520_LOCALITY_NAME "2.5.4.7"
35
#define OID_X520_STATE_OR_PROVINCE_NAME "2.5.4.8"
36
#define OID_LDAP_DC "0.9.2342.19200300.100.1.25"
37
#define OID_LDAP_UID "0.9.2342.19200300.100.1.1"
38
#define OID_PKCS9_EMAIL "1.2.840.113549.1.9.1"
40
int _gnutls_x509_parse_dn (ASN1_TYPE asn1_struct,
41
const char *asn1_rdn_name, char *buf,
44
int _gnutls_x509_parse_dn_oid (ASN1_TYPE asn1_struct,
45
const char *asn1_rdn_name, const char *oid,
46
int indx, unsigned int raw_flag, void *buf,
49
int _gnutls_x509_set_dn_oid (ASN1_TYPE asn1_struct,
50
const char *asn1_rdn_name, const char *oid,
51
int raw_flag, const char *name, int sizeof_name);
53
int _gnutls_x509_get_dn_oid (ASN1_TYPE asn1_struct,
54
const char *asn1_rdn_name,
55
int indx, void *_oid, size_t * sizeof_oid);