summaryrefslogtreecommitdiff
path: root/src/lib/libressl/ressl_internal.h
diff options
context:
space:
mode:
authorjsing <>2014-07-13 23:17:29 +0000
committerjsing <>2014-07-13 23:17:29 +0000
commit90b541a2592f0fcd2c02ac451cfbc1cbdc345888 (patch)
tree10c93fe3f57aedfd81afcb7321f36d5a44350668 /src/lib/libressl/ressl_internal.h
parent52d7e6dec2e1e75fcac1a3f02ca708176e0c1ee9 (diff)
downloadopenbsd-90b541a2592f0fcd2c02ac451cfbc1cbdc345888.tar.gz
openbsd-90b541a2592f0fcd2c02ac451cfbc1cbdc345888.tar.bz2
openbsd-90b541a2592f0fcd2c02ac451cfbc1cbdc345888.zip
Rename the context allocation from ressl_new to ressl_client, which makes
it completely obvious what the context is for. Ensure client functions are used on client contexts.
Diffstat (limited to 'src/lib/libressl/ressl_internal.h')
-rw-r--r--src/lib/libressl/ressl_internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libressl/ressl_internal.h b/src/lib/libressl/ressl_internal.h
index f4eec10e63..260ae8e1f9 100644
--- a/src/lib/libressl/ressl_internal.h
+++ b/src/lib/libressl/ressl_internal.h
@@ -33,8 +33,12 @@ struct ressl_config {
33 int verify_depth; 33 int verify_depth;
34}; 34};
35 35
36#define RESSL_CLIENT (1 << 0)
37#define RESSL_SERVER (1 << 1)
38
36struct ressl { 39struct ressl {
37 struct ressl_config *config; 40 struct ressl_config *config;
41 uint64_t flags;
38 42
39 int err; 43 int err;
40 char *errmsg; 44 char *errmsg;
@@ -45,6 +49,8 @@ struct ressl {
45 SSL_CTX *ssl_ctx; 49 SSL_CTX *ssl_ctx;
46}; 50};
47 51
52struct ressl *ressl_new(void);
53
48int ressl_check_hostname(X509 *cert, const char *host); 54int ressl_check_hostname(X509 *cert, const char *host);
49int ressl_host_port(const char *hostport, char **host, char **port); 55int ressl_host_port(const char *hostport, char **host, char **port);
50int ressl_set_error(struct ressl *ctx, char *fmt, ...); 56int ressl_set_error(struct ressl *ctx, char *fmt, ...);