Skip to content

Commit

Permalink
[crypto] map 3des to des3 for openssl
Browse files Browse the repository at this point in the history
reported in corosync/corosync#451

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Apr 10, 2019
1 parent 03f0c3b commit bdfa824
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libknet/crypto_openssl.c
Expand Up @@ -542,6 +542,9 @@ static int opensslcrypto_init(
if (strcmp(knet_handle_crypto_cfg->crypto_cipher_type, "none") == 0) {
opensslcrypto_instance->crypto_cipher_type = NULL;
} else {
if (!strncmp(knet_handle_crypto_cfg->crypto_cipher_type, "3des", 4)) {
strncpy(knet_handle_crypto_cfg->crypto_cipher_type, "des3", sizeof(knet_handle_crypto_cfg->crypto_cipher_type) - 1);
}
opensslcrypto_instance->crypto_cipher_type = EVP_get_cipherbyname(knet_handle_crypto_cfg->crypto_cipher_type);
if (!opensslcrypto_instance->crypto_cipher_type) {
log_err(knet_h, KNET_SUB_OPENSSLCRYPTO, "unknown crypto cipher type requested");
Expand Down

0 comments on commit bdfa824

Please sign in to comment.