diff options
| author | jsing <> | 2014-08-06 01:54:01 +0000 |
|---|---|---|
| committer | jsing <> | 2014-08-06 01:54:01 +0000 |
| commit | 533b9cb6fe0524c31a25d947f525c859b4c84ff9 (patch) | |
| tree | 4078c1ca5f3aed03285687c8b675da3f2275e5c9 /src/lib/libressl/ressl_config.c | |
| parent | ae244416d2459b82c672fe5c98ec0ee712a706d1 (diff) | |
| download | openbsd-533b9cb6fe0524c31a25d947f525c859b4c84ff9.tar.gz openbsd-533b9cb6fe0524c31a25d947f525c859b4c84ff9.tar.bz2 openbsd-533b9cb6fe0524c31a25d947f525c859b4c84ff9.zip | |
Add support for loading the public/private key from memory, rather than
directly from file.
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libressl/ressl_config.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/libressl/ressl_config.c b/src/lib/libressl/ressl_config.c index 60307d66b3..133ef81b02 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.6 2014/08/05 12:46:16 jsing Exp $ */ | 1 | /* $OpenBSD: ressl_config.c,v 1.7 2014/08/06 01:54:01 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -70,6 +70,13 @@ ressl_config_set_cert_file(struct ressl_config *config, char *cert_file) | |||
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | void | 72 | void |
| 73 | ressl_config_set_cert_mem(struct ressl_config *config, char *cert, size_t len) | ||
| 74 | { | ||
| 75 | config->cert_mem = cert; | ||
| 76 | config->cert_len = len; | ||
| 77 | } | ||
| 78 | |||
| 79 | void | ||
| 73 | ressl_config_set_ciphers(struct ressl_config *config, char *ciphers) | 80 | ressl_config_set_ciphers(struct ressl_config *config, char *ciphers) |
| 74 | { | 81 | { |
| 75 | config->ciphers = ciphers; | 82 | config->ciphers = ciphers; |
| @@ -82,6 +89,13 @@ ressl_config_set_key_file(struct ressl_config *config, char *key_file) | |||
| 82 | } | 89 | } |
| 83 | 90 | ||
| 84 | void | 91 | void |
| 92 | ressl_config_set_key_mem(struct ressl_config *config, char *key, size_t len) | ||
| 93 | { | ||
| 94 | config->key_mem = key; | ||
| 95 | config->key_len = len; | ||
| 96 | } | ||
| 97 | |||
| 98 | void | ||
| 85 | ressl_config_set_verify_depth(struct ressl_config *config, int verify_depth) | 99 | ressl_config_set_verify_depth(struct ressl_config *config, int verify_depth) |
| 86 | { | 100 | { |
| 87 | config->verify_depth = verify_depth; | 101 | config->verify_depth = verify_depth; |
