8000 Add -N strict option by apoorvdeshmukh · Pull Request #459 · microsoft/go-sqlcmd · GitHub
[go: up one dir, main page]

Skip to content

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
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

3 participants

0