diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libressl/ressl_config.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/libressl/ressl_config.c b/src/lib/libressl/ressl_config.c index 133ef81b02..aa353be01f 100644 --- a/src/lib/libressl/ressl_config.c +++ b/src/lib/libressl/ressl_config.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ressl_config.c,v 1.7 2014/08/06 01:54:01 jsing Exp $ */ | 1 | /* $OpenBSD: ressl_config.c,v 1.8 2014/08/27 10:46:53 reyk Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -28,6 +28,7 @@ struct ressl_config ressl_config_default = { | |||
28 | .ca_file = _PATH_SSL_CA_FILE, | 28 | .ca_file = _PATH_SSL_CA_FILE, |
29 | .ca_path = NULL, | 29 | .ca_path = NULL, |
30 | .ciphers = NULL, | 30 | .ciphers = NULL, |
31 | .ecdhcurve = NID_X9_62_prime256v1, | ||
31 | .verify = 1, | 32 | .verify = 1, |
32 | .verify_depth = 6, | 33 | .verify_depth = 6, |
33 | }; | 34 | }; |
@@ -82,6 +83,18 @@ ressl_config_set_ciphers(struct ressl_config *config, char *ciphers) | |||
82 | config->ciphers = ciphers; | 83 | config->ciphers = ciphers; |
83 | } | 84 | } |
84 | 85 | ||
86 | int | ||
87 | ressl_config_set_ecdhcurve(struct ressl_config *config, const char *name) | ||
88 | { | ||
89 | int nid = NID_undef; | ||
90 | |||
91 | if (name != NULL && (nid = OBJ_txt2nid(name)) == NID_undef) | ||
92 | return (-1); | ||
93 | |||
94 | config->ecdhcurve = nid; | ||
95 | return (0); | ||
96 | } | ||
97 | |||
85 | void | 98 | void |
86 | ressl_config_set_key_file(struct ressl_config *config, char *key_file) | 99 | ressl_config_set_key_file(struct ressl_config *config, char *key_file) |
87 | { | 100 | { |