1 // 2 // btls-util.h 3 // MonoBtls 4 // 5 // Created by Martin Baulig on 3/23/16. 6 // Copyright © 2016 Xamarin. All rights reserved. 7 // 8 9 #ifndef __btls__btls_util__ 10 #define __btls__btls_util__ 11 12 #include <stdio.h> 13 #include <stdlib.h> 14 #include <string.h> 15 #include <openssl/ssl.h> 16 17 #ifndef MONO_API 18 #if defined(_MSC_VER) 19 20 #define MONO_API __declspec(dllexport) 21 22 #else 23 24 #ifdef __GNUC__ 25 #define MONO_API __attribute__ ((__visibility__ ("default"))) 26 #else 27 #define MONO_API 28 #endif 29 30 #endif 31 #endif 32 33 void 34 mono_btls_free (void *data); 35 36 int64_t 37 mono_btls_util_asn1_time_to_ticks (ASN1_TIME *time); 38 39 int 40 mono_btls_debug_printf (BIO *bio, const char *format, va_list args); 41 42 OPENSSL_EXPORT void CRYPTO_refcount_inc(CRYPTO_refcount_t *count); 43 OPENSSL_EXPORT int CRYPTO_refcount_dec_and_test_zero(CRYPTO_refcount_t *count); 44 45 #endif /* __btls__btls_util__ */ 46