diff options
author | sergey.galtsev <sergey.galtsev@mongodb.com> | 2022-02-08 23:53:32 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-09 00:40:56 +0000 |
commit | 9357161cfc1098344d94f8e3efd38b90ce67516f (patch) | |
tree | 2810627702eca9896d82196039d416cfc79bee86 /src/mongo/crypto/symmetric_crypto.cpp | |
parent | 22d69577041a96795c836988e965334305ebe9d8 (diff) | |
download | mongo-9357161cfc1098344d94f8e3efd38b90ce67516f.tar.gz |
SERVER-63186 Add AES-CTR support for OpenSSL
Diffstat (limited to 'src/mongo/crypto/symmetric_crypto.cpp')
-rw-r--r-- | src/mongo/crypto/symmetric_crypto.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/crypto/symmetric_crypto.cpp b/src/mongo/crypto/symmetric_crypto.cpp index bb57d35e90a..375a8264f59 100644 --- a/src/mongo/crypto/symmetric_crypto.cpp +++ b/src/mongo/crypto/symmetric_crypto.cpp @@ -55,6 +55,8 @@ size_t aesGetIVSize(crypto::aesMode mode) { return crypto::aesCBCIVSize; case crypto::aesMode::gcm: return crypto::aesGCMIVSize; + case crypto::aesMode::ctr: + return crypto::aesCTRIVSize; default: fassertFailed(4053); } @@ -65,6 +67,8 @@ aesMode getCipherModeFromString(const std::string& mode) { return aesMode::cbc; } else if (mode == aes256GCMName) { return aesMode::gcm; + } else if (mode == aes256CTRName) { + return aesMode::ctr; } else { MONGO_UNREACHABLE; } @@ -75,6 +79,8 @@ std::string getStringFromCipherMode(aesMode mode) { return aes256CBCName; } else if (mode == aesMode::gcm) { return aes256GCMName; + } else if (mode == aesMode::ctr) { + return aes256CTRName; } else { MONGO_UNREACHABLE; } |