diff options
author | jsing <> | 2014-07-13 22:13:52 +0000 |
---|---|---|
committer | jsing <> | 2014-07-13 22:13:52 +0000 |
commit | 734069c418dd5db326e494ffe7552276336252b5 (patch) | |
tree | 5883e31fe626c0a75749f92ee5185b14217574c0 /src/lib | |
parent | 9e28eca16f16dae38f8957111772bbdec58376c9 (diff) | |
download | openbsd-734069c418dd5db326e494ffe7552276336252b5.tar.gz openbsd-734069c418dd5db326e494ffe7552276336252b5.tar.bz2 openbsd-734069c418dd5db326e494ffe7552276336252b5.zip |
Use a single ressl.h header file.
Discussed with beck@ and tedu@.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libressl/Makefile | 10 | ||||
-rw-r--r-- | src/lib/libressl/ressl.c | 3 | ||||
-rw-r--r-- | src/lib/libressl/ressl.h | 14 | ||||
-rw-r--r-- | src/lib/libressl/ressl_config.c | 3 | ||||
-rw-r--r-- | src/lib/libressl/ressl_config.h | 33 |
5 files changed, 18 insertions, 45 deletions
diff --git a/src/lib/libressl/Makefile b/src/lib/libressl/Makefile index c6f4328b79..167379edff 100644 --- a/src/lib/libressl/Makefile +++ b/src/lib/libressl/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2014/07/12 01:20:24 jsing Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2014/07/13 22:13:52 jsing Exp $ |
2 | 2 | ||
3 | CFLAGS+= -Wall -Werror -Wimplicit | 3 | CFLAGS+= -Wall -Werror -Wimplicit |
4 | CFLAGS+= -DLIBRESSL_INTERNAL | 4 | CFLAGS+= -DLIBRESSL_INTERNAL |
@@ -7,7 +7,7 @@ LIB= ressl | |||
7 | 7 | ||
8 | DPADD= ${LIBCRYPTO} ${LIBSSL} | 8 | DPADD= ${LIBCRYPTO} ${LIBSSL} |
9 | 9 | ||
10 | HDRS= ressl.h ressl_config.h | 10 | HDRS= ressl.h |
11 | 11 | ||
12 | SRCS= ressl.c \ | 12 | SRCS= ressl.c \ |
13 | ressl_config.c \ | 13 | ressl_config.c \ |
@@ -15,12 +15,10 @@ SRCS= ressl.c \ | |||
15 | ressl_verify.c | 15 | ressl_verify.c |
16 | 16 | ||
17 | includes: | 17 | includes: |
18 | @test -d ${DESTDIR}/usr/include/ressl || \ | ||
19 | mkdir ${DESTDIR}/usr/include/ressl | ||
20 | @cd ${.CURDIR}; for i in $(HDRS); do \ | 18 | @cd ${.CURDIR}; for i in $(HDRS); do \ |
21 | j="cmp -s $$i ${DESTDIR}/usr/include/ressl/$$i || \ | 19 | j="cmp -s $$i ${DESTDIR}/usr/include/$$i || \ |
22 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\ | 20 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $$i\ |
23 | ${DESTDIR}/usr/include/ressl"; \ | 21 | ${DESTDIR}/usr/include/"; \ |
24 | echo $$j; \ | 22 | echo $$j; \ |
25 | eval "$$j"; \ | 23 | eval "$$j"; \ |
26 | done; | 24 | done; |
diff --git a/src/lib/libressl/ressl.c b/src/lib/libressl/ressl.c index 21b7c0ead0..7295c520d2 100644 --- a/src/lib/libressl/ressl.c +++ b/src/lib/libressl/ressl.c | |||
@@ -26,8 +26,7 @@ | |||
26 | 26 | ||
27 | #include <openssl/x509.h> | 27 | #include <openssl/x509.h> |
28 | 28 | ||
29 | #include <ressl/ressl.h> | 29 | #include <ressl.h> |
30 | |||
31 | #include "ressl_internal.h" | 30 | #include "ressl_internal.h" |
32 | 31 | ||
33 | extern struct ressl_config ressl_config_default; | 32 | extern struct ressl_config ressl_config_default; |
diff --git a/src/lib/libressl/ressl.h b/src/lib/libressl/ressl.h index 5217a69c15..d044cd4fdc 100644 --- a/src/lib/libressl/ressl.h +++ b/src/lib/libressl/ressl.h | |||
@@ -17,14 +17,24 @@ | |||
17 | #ifndef HEADER_RESSL_H | 17 | #ifndef HEADER_RESSL_H |
18 | #define HEADER_RESSL_H | 18 | #define HEADER_RESSL_H |
19 | 19 | ||
20 | #include <ressl/ressl_config.h> | ||
21 | |||
22 | struct ressl; | 20 | struct ressl; |
21 | struct ressl_config; | ||
23 | 22 | ||
24 | int ressl_init(void); | 23 | int ressl_init(void); |
25 | 24 | ||
26 | const char *ressl_error(struct ressl *ctx); | 25 | const char *ressl_error(struct ressl *ctx); |
27 | 26 | ||
27 | struct ressl_config *ressl_config_new(void); | ||
28 | void ressl_config_free(struct ressl_config *config); | ||
29 | |||
30 | void ressl_config_ca_file(struct ressl_config *config, char *ca_file); | ||
31 | void ressl_config_ca_path(struct ressl_config *config, char *ca_path); | ||
32 | void ressl_config_ciphers(struct ressl_config *config, char *ciphers); | ||
33 | void ressl_config_verify_depth(struct ressl_config *config, int verify_depth); | ||
34 | |||
35 | void ressl_config_insecure(struct ressl_config *config); | ||
36 | void ressl_config_secure(struct ressl_config *config); | ||
37 | |||
28 | struct ressl *ressl_new(struct ressl_config *config); | 38 | struct ressl *ressl_new(struct ressl_config *config); |
29 | void ressl_reset(struct ressl *ctx); | 39 | void ressl_reset(struct ressl *ctx); |
30 | void ressl_free(struct ressl *ctx); | 40 | void ressl_free(struct ressl *ctx); |
diff --git a/src/lib/libressl/ressl_config.c b/src/lib/libressl/ressl_config.c index a84de591bc..3932b96add 100644 --- a/src/lib/libressl/ressl_config.c +++ b/src/lib/libressl/ressl_config.c | |||
@@ -17,8 +17,7 @@ | |||
17 | #include <errno.h> | 17 | #include <errno.h> |
18 | #include <stdlib.h> | 18 | #include <stdlib.h> |
19 | 19 | ||
20 | #include <ressl/ressl.h> | 20 | #include <ressl.h> |
21 | |||
22 | #include "ressl_internal.h" | 21 | #include "ressl_internal.h" |
23 | 22 | ||
24 | /* | 23 | /* |
diff --git a/src/lib/libressl/ressl_config.h b/src/lib/libressl/ressl_config.h deleted file mode 100644 index da13d91efa..0000000000 --- a/src/lib/libressl/ressl_config.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
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_CONFIG_H | ||
18 | #define HEADER_RESSL_CONFIG_H | ||
19 | |||
20 | struct ressl_config; | ||
21 | |||
22 | struct ressl_config *ressl_config_new(void); | ||
23 | void ressl_config_free(struct ressl_config *config); | ||
24 | |||
25 | void ressl_config_ca_file(struct ressl_config *config, char *ca_file); | ||
26 | void ressl_config_ca_path(struct ressl_config *config, char *ca_path); | ||
27 | void ressl_config_ciphers(struct ressl_config *config, char *ciphers); | ||
28 | void ressl_config_verify_depth(struct ressl_config *config, int verify_depth); | ||
29 | |||
30 | void ressl_config_insecure(struct ressl_config *config); | ||
31 | void ressl_config_secure(struct ressl_config *config); | ||
32 | |||
33 | #endif /* HEADER_RESSL_H */ | ||