All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
as_tls.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2022 Aerospike, Inc.
3  *
4  * Portions may be licensed to Aerospike, Inc. under one or more contributor
5  * license agreements.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
8  * use this file except in compliance with the License. You may obtain a copy of
9  * the License at http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14  * License for the specific language governing permissions and limitations under
15  * the License.
16  */
17 #pragma once
18 
19 #include <aerospike/as_address.h>
20 #include <aerospike/as_config.h>
21 #include <aerospike/as_status.h>
22 #include <aerospike/as_socket.h>
23 #include <openssl/ssl.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 void as_tls_check_init(void);
30 
31 void as_tls_cleanup(void);
32 
34 
36 
38 
40 
41 int as_tls_wrap(as_tls_context* ctx, as_socket* sock, const char* tls_name);
42 
43 void as_tls_set_name(as_socket* sock, const char* tls_name);
44 
45 struct ssl_st;
46 void as_tls_set_context_name(struct ssl_st* ssl, as_tls_context* ctx, const char* tls_name);
47 
49 
50 int as_tls_connect(as_socket* sock, uint64_t deadline);
51 
53 
54 int as_tls_read_once(as_socket* sock, void* buf, size_t num);
55 
56 int as_tls_read(as_socket* sock, void* buf, size_t num, uint32_t socket_timeout, uint64_t deadline);
57 
58 int as_tls_write_once(as_socket* sock, void* buf, size_t num);
59 
60 int as_tls_write(as_socket* sock, void* buf, size_t num, uint32_t socket_timeout, uint64_t deadline);
61 
62 #ifdef __cplusplus
63 } // end extern "C"
64 #endif
int as_tls_write_once(as_socket *sock, void *buf, size_t num)
as_status
Definition: as_status.h:30
void as_tls_check_init(void)
void as_tls_set_name(as_socket *sock, const char *tls_name)
void as_tls_context_destroy(as_tls_context *ctx)
AS_EXTERN void as_tls_thread_cleanup(void)
int as_tls_read_pending(as_socket *sock)
#define AS_EXTERN
Definition: as_std.h:25
void as_tls_cleanup(void)
as_status as_tls_config_reload(as_config_tls *tlscfg, as_tls_context *ctx, as_error *err)
int as_tls_connect(as_socket *sock, uint64_t deadline)
int as_tls_connect_once(as_socket *sock)
as_status as_tls_context_setup(as_config_tls *tlscfg, as_tls_context *ctx, as_error *err)
void as_tls_set_context_name(struct ssl_st *ssl, as_tls_context *ctx, const char *tls_name)
int as_tls_write(as_socket *sock, void *buf, size_t num, uint32_t socket_timeout, uint64_t deadline)
int as_tls_wrap(as_tls_context *ctx, as_socket *sock, const char *tls_name)
int as_tls_read(as_socket *sock, void *buf, size_t num, uint32_t socket_timeout, uint64_t deadline)
int as_tls_read_once(as_socket *sock, void *buf, size_t num)