summaryrefslogtreecommitdiff
path: root/src/lib/libressl/ressl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libressl/ressl.h')
-rw-r--r--src/lib/libressl/ressl.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/lib/libressl/ressl.h b/src/lib/libressl/ressl.h
new file mode 100644
index 0000000000..5217a69c15
--- /dev/null
+++ b/src/lib/libressl/ressl.h
@@ -0,0 +1,39 @@
1/*
2 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#ifndef HEADER_RESSL_H
18#define HEADER_RESSL_H
19
20#include <ressl/ressl_config.h>
21
22struct ressl;
23
24int ressl_init(void);
25
26const char *ressl_error(struct ressl *ctx);
27
28struct ressl *ressl_new(struct ressl_config *config);
29void ressl_reset(struct ressl *ctx);
30void ressl_free(struct ressl *ctx);
31
32int ressl_connect(struct ressl *ctx, const char *host, const char *port);
33int ressl_connect_socket(struct ressl *ctx, int s, const char *hostname);
34int ressl_read(struct ressl *ctx, char *buf, size_t buflen, size_t *outlen);
35int ressl_write(struct ressl *ctx, const char *buf, size_t buflen,
36 size_t *outlen);
37int ressl_close(struct ressl *ctx);
38
39#endif /* HEADER_RESSL_H */