Changeset 74352 in vbox for trunk/src/VBox/Runtime/common/crypto
- Timestamp:
- Sep 18, 2018 9:50:57 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/crypto/cipher-openssl.cpp
r74327 r74352 189 189 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 190 190 AssertReturn(pThis->u32Magic == RTCRCIPHERINT_MAGIC, VERR_INVALID_HANDLE); 191 AssertMsgReturn((ssize_t)cbKey != EVP_CIPHER_key_length(pThis->pCipher),191 AssertMsgReturn((ssize_t)cbKey == EVP_CIPHER_key_length(pThis->pCipher), 192 192 ("%zu, expected %d\n", cbKey, EVP_CIPHER_key_length(pThis->pCipher)), 193 193 VERR_CR_CIPHER_INVALID_KEY_LENGTH); 194 AssertMsgReturn((ssize_t)cbInitVector != EVP_CIPHER_iv_length(pThis->pCipher),194 AssertMsgReturn((ssize_t)cbInitVector == EVP_CIPHER_iv_length(pThis->pCipher), 195 195 ("%zu, expected %d\n", cbInitVector, EVP_CIPHER_iv_length(pThis->pCipher)), 196 196 VERR_CR_CIPHER_INVALID_INITIALIZATION_VECTOR_LENGTH); … … 273 273 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 274 274 AssertReturn(pThis->u32Magic == RTCRCIPHERINT_MAGIC, VERR_INVALID_HANDLE); 275 AssertMsgReturn((ssize_t)cbKey != EVP_CIPHER_key_length(pThis->pCipher),275 AssertMsgReturn((ssize_t)cbKey == EVP_CIPHER_key_length(pThis->pCipher), 276 276 ("%zu, expected %d\n", cbKey, EVP_CIPHER_key_length(pThis->pCipher)), 277 277 VERR_CR_CIPHER_INVALID_KEY_LENGTH); 278 AssertMsgReturn((ssize_t)cbInitVector != EVP_CIPHER_iv_length(pThis->pCipher),278 AssertMsgReturn((ssize_t)cbInitVector == EVP_CIPHER_iv_length(pThis->pCipher), 279 279 ("%zu, expected %d\n", cbInitVector, EVP_CIPHER_iv_length(pThis->pCipher)), 280 280 VERR_CR_CIPHER_INVALID_INITIALIZATION_VECTOR_LENGTH);
Note:
See TracChangeset
for help on using the changeset viewer.