Skip to content

Commit

Permalink
Small name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
papafe committed Feb 24, 2025
1 parent 801a7c6 commit be8ef7b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ private ClientEncryption CreateClientEncryption(Dictionary<string, IMongoClient>
IMongoClient keyVaultClient = null;
CollectionNamespace keyVaultCollectionNamespace = null;
IReadOnlyDictionary<string, IReadOnlyDictionary<string, object>> kmsProviders = null;
long? cacheLifetimeMs = null;
long? keyExpirationMs = null;

foreach (var option in element.Value.AsBsonDocument)
{
Expand All @@ -744,7 +744,7 @@ private ClientEncryption CreateClientEncryption(Dictionary<string, IMongoClient>
kmsProviders = EncryptionTestHelper.ParseKmsProviders(option.Value.AsBsonDocument);
break;
case "keyExpirationMS":
cacheLifetimeMs = option.Value.AsInt32;
keyExpirationMs = option.Value.AsInt32;
break;
default:
throw new FormatException($"Invalid collection option argument name: '{option.Name}'.");
Expand All @@ -757,7 +757,7 @@ private ClientEncryption CreateClientEncryption(Dictionary<string, IMongoClient>
Ensure.IsNotNull(keyVaultCollectionNamespace, nameof(keyVaultCollectionNamespace)),
Ensure.IsNotNull(kmsProviders, nameof(kmsProviders)),
tlsOptions: tlsOptions);
options.SetKeyExpiration(cacheLifetimeMs is { } ms ? TimeSpan.FromMilliseconds(ms) : null);
options.SetKeyExpiration(keyExpirationMs is { } ms ? TimeSpan.FromMilliseconds(ms) : null);
break;
default:
throw new FormatException($"Invalid {nameof(ClientEncryptionOptions)} argument name: '{element.Name}'.");
Expand Down

0 comments on commit be8ef7b

Please sign in to comment.