mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-06-11 09:50:26 -04:00
Fixed tls-cipher translation bug in openssl-build
Signed-off-by: Steffan Karger <steffan.karger@fox-it.com> Acked-by: Arne Schwabe <arne@rfc2549.org> Message-Id: <1CED409804E2164C8104F9E623B08B9013BC28A538@FOXDFT02.FOX.local> URL: http://article.gmane.org/gmane.network.openvpn.devel/7480 Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
792e8956b9
commit
0bcde52f6a
1 changed files with 5 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue