update readme (#21797)
[mono-project.git] / mono / btls / btls-key.h
blob054aafb45dda7caf2edb5bfa2aafeea7db43dd57
1 //
2 // btls-key.h
3 // MonoBtls
4 //
5 // Created by Martin Baulig on 3/7/16.
6 // Copyright © 2016 Xamarin. All rights reserved.
7 //
9 #ifndef __btls__btls_key__
10 #define __btls__btls_key__
12 #include <stdio.h>
13 #include "btls-ssl.h"
14 #include "btls-x509.h"
16 MONO_API EVP_PKEY *
17 mono_btls_key_new ();
19 MONO_API void
20 mono_btls_key_free (EVP_PKEY *pkey);
22 MONO_API EVP_PKEY *
23 mono_btls_key_up_ref (EVP_PKEY *pkey);
25 MONO_API int
26 mono_btls_key_get_bits (EVP_PKEY *pkey);
28 MONO_API int
29 mono_btls_key_is_rsa (EVP_PKEY *pkey);
31 MONO_API int
32 mono_btls_key_assign_rsa_private_key (EVP_PKEY *pkey, uint8_t *der_data, int der_length);
34 MONO_API int
35 mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int include_private_bits);
37 #endif /* __btls__btls_key__ */