5 // Created by Martin Baulig on 3/5/16.
6 // Copyright © 2016 Xamarin. All rights reserved.
9 #ifndef __btls__btls_x509_name__
10 #define __btls__btls_x509_name__
16 MONO_BTLS_X509_NAME_ENTRY_TYPE_UNKNOWN
= 0,
17 MONO_BTLS_X509_NAME_ENTRY_TYPE_COUNTRY_NAME
,
18 MONO_BTLS_X509_NAME_ENTRY_TYPE_ORGANIZATION_NAME
,
19 MONO_BTLS_X509_NAME_ENTRY_TYPE_ORGANIZATIONAL_UNIT_NAME
,
20 MONO_BTLS_X509_NAME_ENTRY_TYPE_COMMON_NAME
,
21 MONO_BTLS_X509_NAME_ENTRY_TYPE_LOCALITY_NAME
,
22 MONO_BTLS_X509_NAME_ENTRY_TYPE_STATE_OR_PROVINCE_NAME
,
23 MONO_BTLS_X509_NAME_ENTRY_TYPE_STREET_ADDRESS
,
24 MONO_BTLS_X509_NAME_ENTRY_TYPE_SERIAL_NUMBER
,
25 MONO_BTLS_X509_NAME_ENTRY_TYPE_DOMAIN_COMPONENT
,
26 MONO_BTLS_X509_NAME_ENTRY_TYPE_USER_ID
,
27 MONO_BTLS_X509_NAME_ENTRY_TYPE_EMAIL
,
28 MONO_BTLS_X509_NAME_ENTRY_TYPE_DN_QUALIFIER
,
29 MONO_BTLS_X509_NAME_ENTRY_TYPE_TITLE
,
30 MONO_BTLS_X509_NAME_ENTRY_TYPE_SURNAME
,
31 MONO_BTLS_X509_NAME_ENTRY_TYPE_GIVEN_NAME
,
32 MONO_BTLS_X509_NAME_ENTRY_TYPE_INITIAL
33 } MonoBtlsX509NameEntryType
;
35 MONO_API MonoBtlsX509Name
*
36 mono_btls_x509_name_from_name (X509_NAME
*name
);
38 MONO_API MonoBtlsX509Name
*
39 mono_btls_x509_name_copy (X509_NAME
*xn
);
42 mono_btls_x509_name_free (MonoBtlsX509Name
*name
);
45 mono_btls_x509_name_peek_name (MonoBtlsX509Name
*name
);
47 MONO_API MonoBtlsX509Name
*
48 mono_btls_x509_name_from_data (const void *data
, int len
, int use_canon_enc
);
51 mono_btls_x509_name_print_bio (MonoBtlsX509Name
*name
, BIO
*bio
);
54 mono_btls_x509_name_print_string (MonoBtlsX509Name
*name
, char *buffer
, int size
);
57 mono_btls_x509_name_get_raw_data (MonoBtlsX509Name
*name
, void **buffer
, int use_canon_enc
);
60 mono_btls_x509_name_hash (MonoBtlsX509Name
*name
);
63 mono_btls_x509_name_hash_old (MonoBtlsX509Name
*name
);
66 mono_btls_x509_name_get_entry_count (MonoBtlsX509Name
*name
);
68 MONO_API MonoBtlsX509NameEntryType
69 mono_btls_x509_name_get_entry_type (MonoBtlsX509Name
*name
, int index
);
72 mono_btls_x509_name_get_entry_oid (MonoBtlsX509Name
*name
, int index
, char *buffer
, int size
);
75 mono_btls_x509_name_get_entry_oid_data (MonoBtlsX509Name
*name
, int index
, const void **data
);
78 mono_btls_x509_name_get_entry_value (MonoBtlsX509Name
*name
, int index
, int *tag
, unsigned char **str
);
80 #endif /* __btls__btls_x509_name__ */