certigo icon indicating copy to clipboard operation
certigo copied to clipboard

add support for connecting to mssql

Open rgl opened this issue 3 years ago • 4 comments

This fixes #223.

Please be aware that this is currently using a modified version of the denisenkom/go-mssqldb package as explained in #223.

Here's it working:

$ ./certigo connect --ca ~/Projects/sql-server-vagrant/tmp/ca/example-ca-crt.pem --start-tls mssql --name MSSQL 10.2.2.100
** TLS Connection **
Version: TLS 1.2
Cipher Suite: ECDHE_RSA key exchange, AES_256_GCM_SHA384 cipher

** CERTIFICATE 1 **
Valid: 2020-08-17 19:14 UTC to 2025-08-16 19:14 UTC
Subject:
	CN=MSSQL
Issuer:
	CN=Example CA
DNS Names:
	MSSQL
IP Addresses:
	192.168.121.113

Certificate has OCSP extension, but was unable to check status:
	asn1: syntax error: sequence truncated

Found 1 valid certificate chain(s):
[0] CN=MSSQL
	=> CN=Example CA [self-signed]

BTW, that Certificate has OCSP extension is bogus because none of the certificates in the chain have the OCSP extension.

rgl avatar Aug 22 '20 08:08 rgl

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 22 '20 08:08 CLAassistant

yeah there's some bug in the OCSP handling right now. That's #192

mcpherrinm avatar Aug 25 '20 21:08 mcpherrinm

I think once your upstream change is merged into upstream, this is suitable for merging. Thanks!

Do you know how much this increases a certigo binary size?

mcpherrinm avatar Aug 25 '20 21:08 mcpherrinm

It increases the binary size by 1392640 B ( ~1.3 MiB).

The actual binary size built with go 1.15 linux (go build -ldflags -s) was 9789440 (vs 8396800 without mssql).

rgl avatar Aug 25 '20 22:08 rgl