Skip to content

Commit

Permalink
Provide Blowfish from EVP_get_cipherbyname
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Dec 9, 2024
1 parent d681431 commit 19d11c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crypto/cipher_extra/cipher_extra.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ static const struct {
{NID_des_ede3_cbc, "des-ede3-cbc", EVP_des_ede3_cbc},
{NID_rc2_cbc, "rc2-cbc", EVP_rc2_cbc},
{NID_rc4, "rc4", EVP_rc4},
{NID_bf_cbc, "bf-cbc", EVP_bf_cbc},
{NID_bf_ecb, "bf-ecb", EVP_bf_ecb},
{NID_bf_cfb64, "bf-cfb", EVP_bf_cfb},
};

static const struct {
Expand Down
4 changes: 4 additions & 0 deletions crypto/cipher_extra/cipher_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,10 @@ TEST(CipherTest, GetCipher) {
cipher = EVP_get_cipherbyname("aes128");
ASSERT_TRUE(cipher);
EXPECT_EQ(NID_aes_128_cbc, EVP_CIPHER_nid(cipher));

cipher = EVP_get_cipherbyname("bf-cbc");
ASSERT_TRUE(cipher);
EXPECT_EQ(NID_bf_cbc, EVP_CIPHER_nid(cipher));
}

// Test the AES-GCM EVP_CIPHER's internal IV management APIs. OpenSSH uses these
Expand Down

0 comments on commit 19d11c1

Please sign in to comment.