From 9b84cd113b6684df7fd0576195a8b9ea098cc41d Mon Sep 17 00:00:00 2001 From: Jeff Sharp Date: Wed, 1 May 2024 09:08:01 -0500 Subject: [PATCH] Fix: EncryptionMode.Default should not verify localhost identity. --- PSql/_Data/SqlContext.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PSql/_Data/SqlContext.cs b/PSql/_Data/SqlContext.cs index 029d778..6586266 100644 --- a/PSql/_Data/SqlContext.cs +++ b/PSql/_Data/SqlContext.cs @@ -511,12 +511,12 @@ private protected virtual void return mode switch { - // ( ENCRYPT, VERIFY ) - EncryptionMode.None => ( false, false ), - EncryptionMode.Unverified => ( true, false ), - EncryptionMode.Full => ( true, true ), - // EncryptionMode.Default ↓↓ ( !GetIsLocal(), true ), - _ => ( !GetIsLocal(), true ), + // ( ENCRYPT, VERIFY ) + EncryptionMode.None => ( false, false ), + EncryptionMode.Unverified => ( true, false ), + EncryptionMode.Full => ( true, true ), + EncryptionMode.Default when IsLocal => ( false, false ), + _ => ( true, true ), }; }