www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: [PATCH 4/4] Revert "aes: the init function fails when OpenSSL has AES support"

[PATCH 4/4] Revert "aes: the init function fails when OpenSSL has AES support"

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Tue, 11 Sep 2012 09:55:25 +0200

This partially reverts commit f4f2298ef3635acd031cc2ee0e71026cdcda5864.

We need to use the EVP_aes_???_ctr() functions in FIPS mode.

---
 src/openssl.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/openssl.h b/src/openssl.h
index 4835ab6..6f21a1a 100644
--- a/src/openssl.h
+++ b/src/openssl.h
@@ -151,9 +151,15 @@ void libssh2_md5(const unsigned char *message, unsigned long len, unsigned char
 #define _libssh2_cipher_aes256 EVP_aes_256_cbc
 #define _libssh2_cipher_aes192 EVP_aes_192_cbc
 #define _libssh2_cipher_aes128 EVP_aes_128_cbc
+#ifdef HAVE_EVP_AES_128_CTR
+#define _libssh2_cipher_aes128ctr EVP_aes_128_ctr
+#define _libssh2_cipher_aes192ctr EVP_aes_192_ctr
+#define _libssh2_cipher_aes256ctr EVP_aes_256_ctr
+#else
 #define _libssh2_cipher_aes128ctr _libssh2_EVP_aes_128_ctr
 #define _libssh2_cipher_aes192ctr _libssh2_EVP_aes_192_ctr
 #define _libssh2_cipher_aes256ctr _libssh2_EVP_aes_256_ctr
+#endif
 #define _libssh2_cipher_blowfish EVP_bf_cbc
 #define _libssh2_cipher_arcfour EVP_rc4
 #define _libssh2_cipher_cast5 EVP_cast5_cbc
-- 
1.7.1
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-09-11

the libssh2 team