Revert "randomize only the IV part of prefix"

This reverts commit 85d59d7c73.
oxigraph-main
Niko PLP 1 year ago
parent 2776c764d0
commit 1f28422b79
  1. 2
      plugin/openssl/openssl_provider.cc

@ -270,7 +270,7 @@ Status OpensslProvider::AddCipher(const std::string& /*descriptor*/,
Status OpensslProvider::CreateNewPrefix(const std::string& /*fname*/, Status OpensslProvider::CreateNewPrefix(const std::string& /*fname*/,
char* prefix, size_t prefixLength) const { char* prefix, size_t prefixLength) const {
if (1 != RAND_bytes(reinterpret_cast<unsigned char *>(prefix), static_cast<int>(OpensslCipherStream::kBlockSize)) ){ if (1 != RAND_bytes(reinterpret_cast<unsigned char *>(prefix), static_cast<int>(prefixLength)) ){
return handleErrors("Failed to get random numbers.");//Status::Aborted(ERR_reason_error_string(ERR_get_error())); return handleErrors("Failed to get random numbers.");//Status::Aborted(ERR_reason_error_string(ERR_get_error()));
} }
//if( 1 != EVP_CIPHER_up_ref(aes_cipher_)) return handleErrors("Failed to create OpensslCipherStream."); //if( 1 != EVP_CIPHER_up_ref(aes_cipher_)) return handleErrors("Failed to create OpensslCipherStream.");

Loading…
Cancel
Save