summaryrefslogtreecommitdiff
path: root/src/mongo/bson
diff options
context:
space:
mode:
authorIsabella Siu <isabella.siu@10gen.com>2019-01-17 15:55:42 -0500
committerIsabella Siu <isabella.siu@10gen.com>2019-01-22 15:50:10 -0500
commit6eeb3abfb260e6fe3298df19a440cd32438939d9 (patch)
treedabbc7ad668a0fdb5d1ce4dcc68df7eaac737718 /src/mongo/bson
parent037e88ee7332de0cefff7e6e4bfadfbdc90a4ac1 (diff)
downloadmongo-6eeb3abfb260e6fe3298df19a440cd32438939d9.tar.gz
SERVER-38932 add BinData sub-type for encryption
Diffstat (limited to 'src/mongo/bson')
-rw-r--r--src/mongo/bson/bsontypes.cpp3
-rw-r--r--src/mongo/bson/bsontypes.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/bson/bsontypes.cpp b/src/mongo/bson/bsontypes.cpp
index c840ab1c51d..c319ccd5099 100644
--- a/src/mongo/bson/bsontypes.cpp
+++ b/src/mongo/bson/bsontypes.cpp
@@ -173,6 +173,8 @@ const char* typeName(BinDataType type) {
return "UUID";
case MD5Type:
return "MD5";
+ case Encrypt:
+ return "encrypt";
case bdtCustom:
return "Custom";
default:
@@ -188,6 +190,7 @@ bool isValidBinDataType(int type) {
case bdtUUID:
case newUUID:
case MD5Type:
+ case Encrypt:
case bdtCustom:
return true;
default:
diff --git a/src/mongo/bson/bsontypes.h b/src/mongo/bson/bsontypes.h
index 6ac523ee387..9f0f1991fcb 100644
--- a/src/mongo/bson/bsontypes.h
+++ b/src/mongo/bson/bsontypes.h
@@ -162,6 +162,7 @@ enum BinDataType {
bdtUUID = 3, /* deprecated */
newUUID = 4, /* language-independent UUID format across all drivers */
MD5Type = 5,
+ Encrypt = 6, /* encryption placeholder or encrypted data */
bdtCustom = 128
};