Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mono / btls / btls-x509-store-ctx.h
1 //
2 //  btls-x509-store-ctx.h
3 //  MonoBtls
4 //
5 //  Created by Martin Baulig on 3/3/16.
6 //  Copyright © 2016 Xamarin. All rights reserved.
7 //
8
9 #ifndef __btls__btls_x509_store_ctx__
10 #define __btls__btls_x509_store_ctx__
11
12 #include <stdio.h>
13 #include <btls-ssl.h>
14 #include <btls-x509-chain.h>
15 #include <btls-x509-name.h>
16 #include <btls-x509-store.h>
17 #include <btls-x509-verify-param.h>
18
19 MonoBtlsX509StoreCtx *
20 mono_btls_x509_store_ctx_from_ptr (X509_STORE_CTX *ptr);
21
22 MonoBtlsX509StoreCtx *
23 mono_btls_x509_store_ctx_new (void);
24
25 MonoBtlsX509StoreCtx *
26 mono_btls_x509_store_ctx_up_ref (MonoBtlsX509StoreCtx *ctx);
27
28 int
29 mono_btls_x509_store_ctx_free (MonoBtlsX509StoreCtx *ctx);
30
31 int
32 mono_btls_x509_store_ctx_get_error (MonoBtlsX509StoreCtx *ctx, const char **error_string);
33
34 int
35 mono_btls_x509_store_ctx_get_error_depth (MonoBtlsX509StoreCtx *ctx);
36
37 MonoBtlsX509Chain *
38 mono_btls_x509_store_ctx_get_chain (MonoBtlsX509StoreCtx *ctx);
39
40 X509 *
41 mono_btls_x509_store_ctx_get_current_cert (MonoBtlsX509StoreCtx *ctx);
42
43 X509 *
44 mono_btls_x509_store_ctx_get_current_issuer (MonoBtlsX509StoreCtx *ctx);
45
46 int
47 mono_btls_x509_store_ctx_init (MonoBtlsX509StoreCtx *ctx,
48                                    MonoBtlsX509Store *store, MonoBtlsX509Chain *chain);
49
50 int
51 mono_btls_x509_store_ctx_set_param (MonoBtlsX509StoreCtx *ctx, MonoBtlsX509VerifyParam *param);
52
53 X509 *
54 mono_btls_x509_store_ctx_get_by_subject (MonoBtlsX509StoreCtx *ctx, MonoBtlsX509Name *name);
55
56 int
57 mono_btls_x509_store_ctx_verify_cert (MonoBtlsX509StoreCtx *ctx);
58
59 MonoBtlsX509VerifyParam *
60 mono_btls_x509_store_ctx_get_verify_param (MonoBtlsX509StoreCtx *ctx);
61
62 MonoBtlsX509Chain *
63 mono_btls_x509_store_ctx_get_untrusted (MonoBtlsX509StoreCtx *ctx);
64
65 #endif /* defined(__btls__btls_x509_store_ctx__) */
66