Loading...
Searching...
No Matches
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
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
26extern "C" {
27#endif
28
30
31void as_tls_cleanup(void);
32
34
36
38
40
41int as_tls_wrap(as_tls_context* ctx, as_socket* sock, const char* tls_name);
42
43void as_tls_set_name(as_socket* sock, const char* tls_name);
44
45struct ssl_st;
46void as_tls_set_context_name(struct ssl_st* ssl, as_tls_context* ctx, const char* tls_name);
47
49
50int as_tls_connect(as_socket* sock, uint64_t deadline);
51
53
54int as_tls_read_once(as_socket* sock, void* buf, size_t num);
55
56int as_tls_read(as_socket* sock, void* buf, size_t num, uint32_t socket_timeout, uint64_t deadline);
57
58int as_tls_write_once(as_socket* sock, void* buf, size_t num);
59
60int 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
as_status
Definition as_status.h:30
#define AS_EXTERN
Definition as_std.h:25
void as_tls_context_destroy(as_tls_context *ctx)
void as_tls_set_name(as_socket *sock, const char *tls_name)
int as_tls_wrap(as_tls_context *ctx, as_socket *sock, const char *tls_name)
void as_tls_set_context_name(struct ssl_st *ssl, as_tls_context *ctx, const char *tls_name)
void as_tls_check_init(void)
as_status as_tls_config_reload(as_config_tls *tlscfg, as_tls_context *ctx, as_error *err)
int as_tls_read(as_socket *sock, void *buf, size_t num, uint32_t socket_timeout, uint64_t deadline)
int as_tls_write_once(as_socket *sock, void *buf, size_t num)
int as_tls_read_pending(as_socket *sock)
int as_tls_connect_once(as_socket *sock)
void as_tls_cleanup(void)
int as_tls_read_once(as_socket *sock, void *buf, size_t num)
int as_tls_write(as_socket *sock, void *buf, size_t num, uint32_t socket_timeout, uint64_t deadline)
as_status as_tls_context_setup(as_config_tls *tlscfg, as_tls_context *ctx, as_error *err)
int as_tls_connect(as_socket *sock, uint64_t deadline)
AS_EXTERN void as_tls_thread_cleanup(void)