"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/h235/h235crypto.cxx" between
h323plus-1_27_0.tar.gz and h323plus-1_27_1.tar.gz

About: H.323 Plus offers libraries for voice (VoIP) and videoconferencing using H.323.

h235crypto.cxx  (h323plus-1_27_0):h235crypto.cxx  (h323plus-1_27_1)
skipping to change at line 66 skipping to change at line 66
#if _WIN32 #if _WIN32
#pragma message("AES256 Encryption Enabled. Software may be subject to US export restrictions. http://www.bis.doc.gov/encryption/") #pragma message("AES256 Encryption Enabled. Software may be subject to US export restrictions. http://www.bis.doc.gov/encryption/")
#else #else
#warning("AES256 Encryption Enabled. Software may be subject to US export restri ctions. http://www.bis.doc.gov/encryption/") #warning("AES256 Encryption Enabled. Software may be subject to US export restri ctions. http://www.bis.doc.gov/encryption/")
#endif #endif
#endif #endif
// the IV sequence is always 6 bytes long (2 bytes seq number + 4 bytes timestam p) // the IV sequence is always 6 bytes long (2 bytes seq number + 4 bytes timestam p)
const unsigned int IV_SEQUENCE_LEN = 6; const unsigned int IV_SEQUENCE_LEN = 6;
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
inline const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx) inline const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx)
{ {
return ctx->iv; return ctx->iv;
} }
#endif // (OPENSSL_VERSION_NUMBER < 0x10100000L) #endif // (OPENSSL_VERSION_NUMBER < 0x10100000L)
// Ciphertext stealing (CTS) code based on an OpenSSL patch by An-Cheng Huang // Ciphertext stealing (CTS) code based on an OpenSSL patch by An-Cheng Huang
// Note: This ciphertext stealing implementation doesn't seem to always produce // Note: This ciphertext stealing implementation doesn't seem to always produce
skipping to change at line 505 skipping to change at line 505
m_initialised = false; m_initialised = false;
if (m_encryptCtx == NULL) { if (m_encryptCtx == NULL) {
m_encryptCtx = EVP_CIPHER_CTX_new(); m_encryptCtx = EVP_CIPHER_CTX_new();
if (m_encryptCtx == NULL) { if (m_encryptCtx == NULL) {
PTRACE(1, "H235\tFailed to allocate EVP encrypt context"); PTRACE(1, "H235\tFailed to allocate EVP encrypt context");
return; return;
} }
} else { } else {
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
EVP_CIPHER_CTX_cleanup(m_encryptCtx); EVP_CIPHER_CTX_cleanup(m_encryptCtx);
EVP_CIPHER_CTX_init(m_encryptCtx); EVP_CIPHER_CTX_init(m_encryptCtx);
#else #else
EVP_CIPHER_CTX_reset(m_encryptCtx); EVP_CIPHER_CTX_reset(m_encryptCtx);
#endif #endif
} }
EVP_EncryptInit_ex(m_encryptCtx, cipher, NULL, key.GetPointer(), NULL); EVP_EncryptInit_ex(m_encryptCtx, cipher, NULL, key.GetPointer(), NULL);
m_enc_blockSize = EVP_CIPHER_CTX_block_size(m_encryptCtx); m_enc_blockSize = EVP_CIPHER_CTX_block_size(m_encryptCtx);
m_enc_ivLength = EVP_CIPHER_CTX_iv_length(m_encryptCtx); m_enc_ivLength = EVP_CIPHER_CTX_iv_length(m_encryptCtx);
m_encryptHelper.Reset(); m_encryptHelper.Reset();
if (m_decryptCtx == NULL) { if (m_decryptCtx == NULL) {
m_decryptCtx = EVP_CIPHER_CTX_new(); m_decryptCtx = EVP_CIPHER_CTX_new();
if (m_decryptCtx == NULL) { if (m_decryptCtx == NULL) {
PTRACE(1, "H235\tFailed to allocate EVP decrypt context"); PTRACE(1, "H235\tFailed to allocate EVP decrypt context");
return; return;
} }
} else { } else {
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)
EVP_CIPHER_CTX_cleanup(m_decryptCtx); EVP_CIPHER_CTX_cleanup(m_decryptCtx);
EVP_CIPHER_CTX_init(m_decryptCtx); EVP_CIPHER_CTX_init(m_decryptCtx);
#else #else
EVP_CIPHER_CTX_reset(m_decryptCtx); EVP_CIPHER_CTX_reset(m_decryptCtx);
#endif #endif
} }
EVP_DecryptInit_ex(m_decryptCtx, cipher, NULL, key.GetPointer(), NULL); EVP_DecryptInit_ex(m_decryptCtx, cipher, NULL, key.GetPointer(), NULL);
m_dec_blockSize = EVP_CIPHER_CTX_block_size(m_decryptCtx); m_dec_blockSize = EVP_CIPHER_CTX_block_size(m_decryptCtx);
m_dec_ivLength = EVP_CIPHER_CTX_iv_length(m_decryptCtx); m_dec_ivLength = EVP_CIPHER_CTX_iv_length(m_decryptCtx);
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)