summaryrefslogtreecommitdiff
path: root/src/lib/libressl/ressl_internal.h
diff options
context:
space:
mode:
authorjsing <>2014-10-31 13:46:17 +0000
committerjsing <>2014-10-31 13:46:17 +0000
commitcd85e00508e178758948e7a759609d0f1e7764df (patch)
tree44ea21a19ccf529a3e38fb107d3a2d1330f58d8e /src/lib/libressl/ressl_internal.h
parente83bdb8edcd9388f13b71372b277fdcce386a9b0 (diff)
downloadopenbsd-cd85e00508e178758948e7a759609d0f1e7764df.tar.gz
openbsd-cd85e00508e178758948e7a759609d0f1e7764df.tar.bz2
openbsd-cd85e00508e178758948e7a759609d0f1e7764df.zip
Rename libressl to libtls to avoid confusion and to make it easier to
distinguish between LibreSSL (the project) and libressl (the library). Discussed with many.
Diffstat (limited to 'src/lib/libressl/ressl_internal.h')
-rw-r--r--src/lib/libressl/ressl_internal.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/src/lib/libressl/ressl_internal.h b/src/lib/libressl/ressl_internal.h
deleted file mode 100644
index b752b5fd88..0000000000
--- a/src/lib/libressl/ressl_internal.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/* $OpenBSD: ressl_internal.h,v 1.12 2014/10/03 14:14:40 tedu Exp $ */
2/*
3 * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org>
4 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#ifndef HEADER_RESSL_INTERNAL_H
20#define HEADER_RESSL_INTERNAL_H
21
22#include <openssl/ssl.h>
23
24#define HTTPS_PORT "443"
25
26#define _PATH_SSL_CA_FILE "/etc/ssl/cert.pem"
27
28struct ressl_config {
29 const char *ca_file;
30 const char *ca_path;
31 const char *cert_file;
32 char *cert_mem;
33 size_t cert_len;
34 const char *ciphers;
35 int ecdhcurve;
36 const char *key_file;
37 char *key_mem;
38 size_t key_len;
39 uint32_t protocols;
40 int verify_cert;
41 int verify_host;
42 int verify_depth;
43};
44
45#define RESSL_CLIENT (1 << 0)
46#define RESSL_SERVER (1 << 1)
47#define RESSL_SERVER_CONN (1 << 2)
48
49struct ressl {
50 struct ressl_config *config;
51 uint64_t flags;
52
53 int err;
54 char *errmsg;
55
56 int socket;
57
58 SSL *ssl_conn;
59 SSL_CTX *ssl_ctx;
60};
61
62struct ressl *ressl_new(void);
63struct ressl *ressl_server_conn(struct ressl *ctx);
64
65int ressl_check_hostname(X509 *cert, const char *host);
66int ressl_configure_keypair(struct ressl *ctx);
67int ressl_configure_server(struct ressl *ctx);
68int ressl_configure_ssl(struct ressl *ctx);
69int ressl_host_port(const char *hostport, char **host, char **port);
70int ressl_set_error(struct ressl *ctx, char *fmt, ...);
71
72#endif /* HEADER_RESSL_INTERNAL_H */