diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2013-06-03 18:47:53 +0200 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2013-06-03 18:47:53 +0200 |
commit | 70b71e008cc968ee53d6b8af9f7a006f13c27e2a (patch) | |
tree | bb9c15285fe1f4751fd26bbdd4981ff7819403be /src/openvpn/ssl_openssl.c | |
parent | fcc893c0d8d245525cfb023b6e2a8aae086304cf (diff) |
Imported Upstream version 2.3.2upstream/2.3.2
Diffstat (limited to 'src/openvpn/ssl_openssl.c')
-rw-r--r-- | src/openvpn/ssl_openssl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 1006617..79cc056 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -217,8 +217,9 @@ tls_ctx_restrict_ciphers(struct tls_root_ctx *ctx, const char *ciphers) ASSERT(NULL != ctx); // Translate IANA cipher suite names to OpenSSL names - for (begin_of_cipher = 0; begin_of_cipher < strlen(ciphers); begin_of_cipher = end_of_cipher+1) { - end_of_cipher = strcspn(&ciphers[begin_of_cipher], ":"); + begin_of_cipher = end_of_cipher = 0; + for (; begin_of_cipher < strlen(ciphers); begin_of_cipher = end_of_cipher) { + end_of_cipher += strcspn(&ciphers[begin_of_cipher], ":"); cipher_pair = tls_get_cipher_name_pair(&ciphers[begin_of_cipher], end_of_cipher - begin_of_cipher); if (NULL == cipher_pair) @@ -257,6 +258,8 @@ tls_ctx_restrict_ciphers(struct tls_root_ctx *ctx, const char *ciphers) openssl_ciphers_len += current_cipher_len; openssl_ciphers[openssl_ciphers_len] = ':'; openssl_ciphers_len++; + + end_of_cipher++; } if (openssl_ciphers_len > 0) |