summaryrefslogtreecommitdiff
path: root/src/mongo/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/crypto')
-rw-r--r--src/mongo/crypto/fle_crypto.cpp7
-rw-r--r--src/mongo/crypto/fle_crypto_test.cpp3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/crypto/fle_crypto.cpp b/src/mongo/crypto/fle_crypto.cpp
index 1f1ba117b5f..9bc6dfa7022 100644
--- a/src/mongo/crypto/fle_crypto.cpp
+++ b/src/mongo/crypto/fle_crypto.cpp
@@ -732,7 +732,10 @@ std::unique_ptr<Edges> getEdges(BSONElement element,
6775509, "min bound must be decimal", minBound.type() == BSONType::NumberDecimal);
uassert(
6775510, "max bound must be decimal", maxBound.type() == BSONType::NumberDecimal);
- uasserted(ErrorCodes::BadValue, "decimal not supported atm");
+ return getEdgesDecimal128(element.numberDecimal(),
+ minBound.numberDecimal(),
+ maxBound.numberDecimal(),
+ sparsity);
default:
uassert(6775500, "must use supported FLE2 range type", false);
@@ -2612,7 +2615,7 @@ StatusWith<FLE2IndexedRangeEncryptedValue> FLE2IndexedRangeEncryptedValue::decry
return {swEdgeCount.getStatus()};
}
- uassert(6775315, "Edge count must be less then 129", swEdgeCount.getValue() < 129);
+ uassert(6775315, "Edge count must not be over 129", swEdgeCount.getValue() <= 129);
std::vector<FLEEdgeToken> tokens;
tokens.reserve(swEdgeCount.getValue());
diff --git a/src/mongo/crypto/fle_crypto_test.cpp b/src/mongo/crypto/fle_crypto_test.cpp
index 9237f72a4b0..cfd311ac712 100644
--- a/src/mongo/crypto/fle_crypto_test.cpp
+++ b/src/mongo/crypto/fle_crypto_test.cpp
@@ -1009,8 +1009,7 @@ TEST(FLE_EDC, Range_Allowed_Types) {
const std::vector<std::pair<BSONObj, BSONType>> rangeAllowedObjects{
{BSON("sample" << 123.456), NumberDouble},
- // TODO SERVER-68542 remove the commented line
- // {BSON("sample" << Decimal128()), NumberDecimal},
+ {BSON("sample" << Decimal128()), NumberDecimal},
{BSON("sample" << 123456), NumberInt},
{BSON("sample" << 12345678901234567LL), NumberLong},
{BSON("sample" << Date_t::fromMillisSinceEpoch(12345)), Date},