Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -N strict option #459

Merged
merged 3 commits into from
Sep 18, 2023
Merged

Add -N strict option #459

merged 3 commits into from
Sep 18, 2023

Conversation

apoorvdeshmukh
Copy link
Contributor

@apoorvdeshmukh apoorvdeshmukh commented Sep 4, 2023

Fixes #430

Validation:
With unknown CA

git\go-sqlcmd>.\sqlcmd.exe -Slocalhost:1434 -Usa -P<masked> -N "strict"
TLS Handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority
TLS Handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority

git\go-sqlcmd>.\sqlcmd.exe -Slocalhost:1434 -Usa -P<masked> -N "strict" -C
TLS Handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority
TLS Handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority

With known CA

git\go-sqlcmd>.\sqlcmd.exe -S<redacted>.database.windows.net:1433 -U<masked> -P<masked> -N "strict"
1> select @@version
2> go


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Azure (RTM) - 12.0.2000.8
        Jul 17 2023 18:40:52
        Copyright (C) 2022 Microsoft Corporation


(1 row affected)
1> SELECT protocol_type, CONVERT(varbinary(9),protocol_version),client_net_address from sys.dm_exec_connections where session_id=@@SPID
2> go
protocol_type                                      client_net_address
---------------------------------------- --------- ------------------------------------------------
TSQL                                     0x0800000 58.84.60.222

(1 row affected)
1> exit

Copy link
Collaborator

@shueybubbles shueybubbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@shueybubbles shueybubbles merged commit 2c2da58 into main Sep 18, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "strict" option for -N flag
2 participants