X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fbtls%2Fbtls-x509-chain.c;h=5b7082ddb135f645fc74dd3a05197f70c7b1468a;hb=HEAD;hp=0584791dedf5f37d7c6c5feadfeec4fc1e9af7cd;hpb=0b65fb9d99f02f2a330b20eafcfe57fec34c0465;p=mono.git diff --git a/mono/btls/btls-x509-chain.c b/mono/btls/btls-x509-chain.c index 0584791dedf..5b7082ddb13 100644 --- a/mono/btls/btls-x509-chain.c +++ b/mono/btls/btls-x509-chain.c @@ -13,7 +13,7 @@ struct MonoBtlsX509Chain { CRYPTO_refcount_t references; }; -MonoBtlsX509Chain * +MONO_API MonoBtlsX509Chain * mono_btls_x509_chain_new (void) { MonoBtlsX509Chain *chain = (MonoBtlsX509Chain *)OPENSSL_malloc (sizeof (MonoBtlsX509Chain)); @@ -26,7 +26,7 @@ mono_btls_x509_chain_new (void) return chain; } -MonoBtlsX509Chain * +MONO_API MonoBtlsX509Chain * mono_btls_x509_chain_from_certs (STACK_OF(X509) *certs) { MonoBtlsX509Chain *chain = (MonoBtlsX509Chain *)OPENSSL_malloc (sizeof (MonoBtlsX509Chain)); @@ -39,19 +39,19 @@ mono_btls_x509_chain_from_certs (STACK_OF(X509) *certs) return chain; } -STACK_OF(X509) * +MONO_API STACK_OF(X509) * mono_btls_x509_chain_peek_certs (MonoBtlsX509Chain *chain) { return chain->certs; } -int +MONO_API int mono_btls_x509_chain_get_count (MonoBtlsX509Chain *chain) { return (int)sk_X509_num(chain->certs); } -X509 * +MONO_API X509 * mono_btls_x509_chain_get_cert (MonoBtlsX509Chain *chain, int index) { X509 *cert; @@ -64,13 +64,13 @@ mono_btls_x509_chain_get_cert (MonoBtlsX509Chain *chain, int index) return cert; } -STACK_OF(X509) * +MONO_API STACK_OF(X509) * mono_btls_x509_chain_get_certs (MonoBtlsX509Chain *chain) { return chain->certs; } -int +MONO_API int mono_btls_x509_chain_free (MonoBtlsX509Chain *chain) { if (!CRYPTO_refcount_dec_and_test_zero(&chain->references)) @@ -81,14 +81,14 @@ mono_btls_x509_chain_free (MonoBtlsX509Chain *chain) return 1; } -MonoBtlsX509Chain * +MONO_API MonoBtlsX509Chain * mono_btls_x509_chain_up_ref (MonoBtlsX509Chain *chain) { CRYPTO_refcount_inc(&chain->references); return chain; } -void +MONO_API void mono_btls_x509_chain_add_cert (MonoBtlsX509Chain *chain, X509 *x509) { X509_up_ref(x509);