More disambiguation of Python in makefiles (#18284)
[mono-project.git] / mono / btls / btls-x509-name.h
blobb206f53f70f3e3debef18585ab30bf3adc2d26e9
1 //
2 // btls-x509-name.h
3 // MonoBtls
4 //
5 // Created by Martin Baulig on 3/5/16.
6 // Copyright © 2016 Xamarin. All rights reserved.
7 //
9 #ifndef __btls__btls_x509_name__
10 #define __btls__btls_x509_name__
12 #include <stdio.h>
13 #include "btls-ssl.h"
15 typedef enum {
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);
41 MONO_API void
42 mono_btls_x509_name_free (MonoBtlsX509Name *name);
44 MONO_API X509_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);
50 MONO_API int
51 mono_btls_x509_name_print_bio (MonoBtlsX509Name *name, BIO *bio);
53 MONO_API int
54 mono_btls_x509_name_print_string (MonoBtlsX509Name *name, char *buffer, int size);
56 MONO_API int
57 mono_btls_x509_name_get_raw_data (MonoBtlsX509Name *name, void **buffer, int use_canon_enc);
59 MONO_API int64_t
60 mono_btls_x509_name_hash (MonoBtlsX509Name *name);
62 MONO_API int64_t
63 mono_btls_x509_name_hash_old (MonoBtlsX509Name *name);
65 MONO_API int
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);
71 MONO_API int
72 mono_btls_x509_name_get_entry_oid (MonoBtlsX509Name *name, int index, char *buffer, int size);
74 MONO_API int
75 mono_btls_x509_name_get_entry_oid_data (MonoBtlsX509Name *name, int index, const void **data);
77 MONO_API int
78 mono_btls_x509_name_get_entry_value (MonoBtlsX509Name *name, int index, int *tag, unsigned char **str);
80 #endif /* __btls__btls_x509_name__ */