Skip to content

Commit

Permalink
Fix: EncryptionMode.Default should not verify localhost identity.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpjs committed May 1, 2024
1 parent f7f5397 commit 9b84cd1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions PSql/_Data/SqlContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ),
};
}

Expand Down

0 comments on commit 9b84cd1

Please sign in to comment.