Skip to content

Commit 512b291

Browse files
authored
Merge pull request #140 from essentialkaos/develop
Version 14.0.1
2 parents d3de1ab + b561d9c commit 512b291

File tree

9 files changed

+67
-48
lines changed

9 files changed

+67
-48
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ updates:
1414
- "andyone"
1515
reviewers:
1616
- "andyone"
17+
groups:
18+
all:
19+
applies-to: version-updates
20+
update-types:
21+
- "minor"
22+
- "patch"
1723

1824
- package-ecosystem: "github-actions"
1925
directory: "/"

.github/images/card.svg

Lines changed: 1 addition & 0 deletions
Loading

.github/images/godoc.svg

Lines changed: 1 addition & 0 deletions
Loading

.github/images/license.svg

Lines changed: 1 addition & 0 deletions
Loading

Makefile

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
################################################################################
22

3-
# This Makefile generated by GoMakeGen 2.3.0 using next command:
3+
# This Makefile generated by GoMakeGen 3.0.2 using next command:
44
# gomakegen --mod .
55
#
66
# More info: https://kaos.sh/gomakegen
77

88
################################################################################
99

10-
export GO111MODULE=on
11-
1210
ifdef VERBOSE ## Print verbose information (Flag)
1311
VERBOSE_FLAG = -v
1412
endif
1513

16-
COMPAT ?= 1.18
14+
COMPAT ?= 1.19
1715
MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
1816
GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD)
1917

@@ -33,61 +31,74 @@ update: mod-update ## Update dependencies to the latest versions
3331
vendor: mod-vendor ## Make vendored copy of dependencies
3432

3533
test: ## Run tests
34+
@echo "Starting tests…"
3635
ifdef COVERAGE_FILE ## Save coverage data into file (String)
37-
go test $(VERBOSE_FLAG) -covermode=count -coverprofile=$(COVERAGE_FILE) .
36+
@go test $(VERBOSE_FLAG) -covermode=count -coverprofile=$(COVERAGE_FILE) .
3837
else
39-
go test $(VERBOSE_FLAG) -covermode=count .
38+
@go test $(VERBOSE_FLAG) -covermode=count .
4039
endif
4140

4241
mod-init:
42+
@echo "[1/2] Modules initialization…"
4343
ifdef MODULE_PATH ## Module path for initialization (String)
44-
go mod init $(MODULE_PATH)
44+
@go mod init $(MODULE_PATH)
4545
else
46-
go mod init
46+
@go mod init
4747
endif
4848

49+
@echo "[2/2] Dependencies cleanup…"
4950
ifdef COMPAT ## Compatible Go version (String)
50-
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) -go=$(COMPAT)
51+
@go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT) -go=$(COMPAT)
5152
else
52-
go mod tidy $(VERBOSE_FLAG)
53+
@go mod tidy $(VERBOSE_FLAG)
5354
endif
5455

5556
mod-update:
57+
@echo "[1/4] Updating dependencies…"
5658
ifdef UPDATE_ALL ## Update all dependencies (Flag)
57-
go get -u $(VERBOSE_FLAG) all
59+
@go get -u $(VERBOSE_FLAG) all
5860
else
59-
go get -u $(VERBOSE_FLAG) ./...
61+
@go get -u $(VERBOSE_FLAG) ./...
6062
endif
6163

64+
@echo "[2/4] Stripping toolchain info…"
65+
@grep -q 'toolchain ' go.mod && go mod edit -toolchain=none || :
66+
67+
@echo "[3/4] Dependencies cleanup…"
6268
ifdef COMPAT
63-
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
69+
@go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
6470
else
65-
go mod tidy $(VERBOSE_FLAG)
71+
@go mod tidy $(VERBOSE_FLAG)
6672
endif
6773

68-
test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
74+
@echo "[4/4] Updating vendored dependencies…"
75+
@test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
6976

7077
mod-download:
71-
go mod download
78+
@echo "Downloading dependencies…"
79+
@go mod download
7280

7381
mod-vendor:
74-
rm -rf vendor && go mod vendor $(VERBOSE_FLAG)
82+
@echo "Vendoring dependencies…"
83+
@rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
7584

7685
fmt: ## Format source code with gofmt
77-
find . -name "*.go" -exec gofmt -s -w {} \;
86+
@echo "Formatting sources…"
87+
@find . -name "*.go" -exec gofmt -s -w {} \;
7888

7989
vet: ## Runs 'go vet' over sources
80-
go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
90+
@echo "Running 'go vet' over sources…"
91+
@go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
8192

8293
help: ## Show this info
8394
@echo -e '\n\033[1mTargets:\033[0m\n'
8495
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
85-
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-14s\033[0m %s\n", $$1, $$2}'
96+
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-6s\033[0m %s\n", $$1, $$2}'
8697
@echo -e '\n\033[1mVariables:\033[0m\n'
8798
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
8899
| sed 's/ifdef //' \
89-
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}'
100+
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-13s\033[0m %s\n", $$1, $$2}'
90101
@echo -e ''
91-
@echo -e '\033[90mGenerated by GoMakeGen 2.3.0\033[0m\n'
102+
@echo -e '\033[90mGenerated by GoMakeGen 3.0.2\033[0m\n'
92103

93104
################################################################################

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
<p align="center"><a href="#readme"><img src="https://gh.kaos.st/sslscan.svg"/></a></p>
1+
<p align="center"><a href="#readme"><img src=".github/images/card.svg"/></a></p>
22

33
<p align="center">
4-
<a href="https://kaos.sh/g/sslscan.v14"><img src="https://gh.kaos.st/godoc.svg" alt="PkgGoDev" /></a>
4+
<a href="https://kaos.sh/g/sslscan.v14"><img src=".github/images/godoc.svg"/></a>
55
<a href="https://kaos.sh/l/sslscan"><img src="https://kaos.sh/l/35f63606e26d8588f906.svg" alt="Code Climate Maintainability" /></a>
66
<a href="https://kaos.sh/b/sslscan"><img src="https://kaos.sh/b/59a17b0e-b974-425e-a442-b9bcc3ccf7c0.svg" alt="Codebeat badge" /></a>
77
<a href="https://kaos.sh/w/sslscan/ci"><img src="https://kaos.sh/w/sslscan/ci.svg" alt="GitHub Actions CI Status" /></a>
88
<a href="https://kaos.sh/w/sslscan/codeql"><img src="https://kaos.sh/w/sslscan/codeql.svg" alt="GitHub Actions CodeQL Status" /></a>
9-
<a href="#license"><img src="https://gh.kaos.st/apache2.svg"></a>
9+
<a href="#license"><img src=".github/images/license.svg"/></a>
1010
</p>
1111

12-
<p align="center"><a href="#installation">Installation</a> • <a href="#build-status">Build Status</a> • <a href="#contributing">Contributing</a> • <a href="#terms-of-use">Terms of Use</a> • <a href="#license">License</a></p>
12+
<p align="center"><a href="#installation">Installation</a> • <a href="#ci-status">CI Status</a> • <a href="#contributing">Contributing</a> • <a href="#terms-of-use">Terms of Use</a> • <a href="#license">License</a></p>
1313

1414
<br/>
1515

1616
Package for Go for working with [SSLLabs](https://www.ssllabs.com) public API ([Version 4](https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs-v4.md)).
1717

18-
### Build Status
18+
### CI Status
1919

2020
| Branch | Status |
2121
|--------|--------|

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.18
44

55
require (
66
github.com/essentialkaos/check v1.4.0
7-
github.com/essentialkaos/ek/v12 v12.112.1
7+
github.com/essentialkaos/ek/v12 v12.127.0
88
)
99

1010
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
22
github.com/essentialkaos/check v1.4.0 h1:kWdFxu9odCxUqo1NNFNJmguGrDHgwi3A8daXX1nkuKk=
33
github.com/essentialkaos/check v1.4.0/go.mod h1:LMKPZ2H+9PXe7Y2gEoKyVAwUqXVgx7KtgibfsHJPus0=
4-
github.com/essentialkaos/ek/v12 v12.112.1 h1:mYhqb7K3c5e1LSMGOSUfCNRcVn9iEoZi4wQG0G1MLFk=
5-
github.com/essentialkaos/ek/v12 v12.112.1/go.mod h1:SslW97Se34YQKc08Ume2V/8h/HPTgLS1+Iok64cNF/U=
4+
github.com/essentialkaos/ek/v12 v12.127.0 h1:fU5A+QbIZ7NTq1K5jGVwAWwuLtBUhsIKuRWYT78hE+Q=
5+
github.com/essentialkaos/ek/v12 v12.127.0/go.mod h1:71IJ7m82hgjrvWnhL+z0vIhguxz47/rfVma5/CeI5Fw=
66
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
77
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
88
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=

sslscan_test.go

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ func (s *SSLLabsSuite) TestAnalyze(c *check.C) {
165165
c.Assert(details.HostStartTime, check.Not(check.Equals), 0)
166166

167167
c.Assert(details.CertChains, check.Not(check.HasLen), 0)
168-
c.Assert(details.CertChains[0].ID, check.Equals, "885e78ddf4182ca89e1752a8927093b8a37d2b5d858f119af8b662a21396bbaa")
168+
c.Assert(details.CertChains[0].ID, check.Equals, "333e0e5e8e3f9b0cd30fc82e0e136e5d2eefb63d7ff08e48fee7fff467d55103")
169169
c.Assert(details.CertChains[0].CertIDs, check.Not(check.HasLen), 0)
170-
c.Assert(details.CertChains[0].CertIDs[0], check.Equals, "477022360c3af6ba9838cfb2d68f79768c95902946c0117bdd0220b167e7b625")
170+
c.Assert(details.CertChains[0].CertIDs[0], check.Equals, "e08e4417399dd6366eaf8fa4e0a6677d3514effaaa2549430edc86f85dad345a")
171171
c.Assert(details.CertChains[0].TrustPaths, check.Not(check.HasLen), 0)
172-
c.Assert(details.CertChains[0].TrustPaths[0].CertIDs[0], check.Equals, "477022360c3af6ba9838cfb2d68f79768c95902946c0117bdd0220b167e7b625")
172+
c.Assert(details.CertChains[0].TrustPaths[0].CertIDs[0], check.Equals, "e08e4417399dd6366eaf8fa4e0a6677d3514effaaa2549430edc86f85dad345a")
173173
c.Assert(details.CertChains[0].TrustPaths[0].Trust[0].RootStore, check.Equals, "Mozilla")
174174
c.Assert(details.CertChains[0].TrustPaths[0].Trust[0].IsTrusted, check.Equals, true)
175175
c.Assert(details.CertChains[0].Issues, check.Equals, 0)
@@ -322,34 +322,33 @@ func (s *SSLLabsSuite) TestAnalyze(c *check.C) {
322322

323323
certs := fullInfo.Certs
324324

325-
c.Assert(certs, check.HasLen, 8)
326-
c.Assert(certs[0].ID, check.Equals, "477022360c3af6ba9838cfb2d68f79768c95902946c0117bdd0220b167e7b625")
325+
c.Assert(certs, check.HasLen, 9)
326+
c.Assert(certs[0].ID, check.Equals, "e08e4417399dd6366eaf8fa4e0a6677d3514effaaa2549430edc86f85dad345a")
327327
c.Assert(certs[0].Subject, check.Not(check.Equals), "")
328-
c.Assert(certs[0].SerialNumber, check.Equals, "036d5f0006fefee0b122f4e25eeca25c")
328+
c.Assert(certs[0].SerialNumber, check.Equals, "008bc849c01d71e66216c65c99426479a5")
329329
c.Assert(certs[0].CommonNames, check.DeepEquals, []string{"github.com"})
330330
c.Assert(certs[0].AltNames, check.DeepEquals, []string{"github.com", "www.github.com"})
331-
c.Assert(certs[0].NotBefore, check.Equals, int64(1682035200000))
332-
c.Assert(certs[0].NotAfter, check.Equals, int64(1713916799000))
333-
c.Assert(certs[0].IssuerSubject, check.Equals, "CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1, O=DigiCert Inc, C=US")
331+
c.Assert(certs[0].NotBefore, check.Equals, int64(1712620800000))
332+
c.Assert(certs[0].NotAfter, check.Equals, int64(1744243199000))
333+
c.Assert(certs[0].IssuerSubject, check.Equals, "CN=Sectigo RSA Domain Validation Secure Server CA, O=Sectigo Limited, L=Salford, ST=Greater Manchester, C=GB")
334334
c.Assert(certs[0].SigAlg, check.Equals, "SHA256withRSA")
335-
c.Assert(certs[0].RevocationInfo, check.Equals, 3)
336-
c.Assert(certs[0].CRLURIs, check.DeepEquals, []string{"http://crl3.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crl"})
337-
c.Assert(certs[0].OCSPURIs, check.DeepEquals, []string{"http://ocsp.digicert.com"})
335+
c.Assert(certs[0].RevocationInfo, check.Equals, 2)
336+
c.Assert(certs[0].OCSPURIs, check.DeepEquals, []string{"http://ocsp.sectigo.com"})
338337
c.Assert(certs[0].RevocationStatus, check.Equals, 2)
339-
c.Assert(certs[0].CRLRevocationStatus, check.Equals, 2)
338+
c.Assert(certs[0].CRLRevocationStatus, check.Equals, 4)
340339
c.Assert(certs[0].OCSPRevocationStatus, check.Equals, 2)
341340
c.Assert(certs[0].DNSCAA, check.Equals, true)
342341
c.Assert(certs[0].MustStaple, check.Equals, false)
343342
c.Assert(certs[0].SGC, check.Equals, 0)
344343
c.Assert(certs[0].ValidationType, check.Equals, "")
345344
c.Assert(certs[0].Issues, check.Equals, 0)
346345
c.Assert(certs[0].SCT, check.Equals, true)
347-
c.Assert(certs[0].SHA1Hash, check.Equals, "e94e54a930863d535ba0d2d3a5dd0de3bda8c9c2")
348-
c.Assert(certs[0].SHA256Hash, check.Equals, "477022360c3af6ba9838cfb2d68f79768c95902946c0117bdd0220b167e7b625")
349-
c.Assert(certs[0].PINSHA256, check.Equals, "jSd+RbSAB3215SSioJKeyfdEFELVT/xz+Fwod2ypqtE=")
346+
c.Assert(certs[0].SHA1Hash, check.Equals, "16b19284e8d63e818e28c9db0ac88cb54bc8fff2")
347+
c.Assert(certs[0].SHA256Hash, check.Equals, "e08e4417399dd6366eaf8fa4e0a6677d3514effaaa2549430edc86f85dad345a")
348+
c.Assert(certs[0].PINSHA256, check.Equals, "37hpeOriALBxTwq9sqIkx57jO6ehK2Em4op9C1PPY8A=")
350349
c.Assert(certs[0].KeyAlg, check.Equals, "RSA")
351-
c.Assert(certs[0].KeySize, check.Equals, 2048)
352-
c.Assert(certs[0].KeyStrength, check.Equals, 2048)
350+
c.Assert(certs[0].KeySize, check.Equals, 4096)
351+
c.Assert(certs[0].KeyStrength, check.Equals, 4096)
353352
c.Assert(certs[0].KeyKnownDebianInsecure, check.Equals, false)
354353
c.Assert(certs[0].Raw, check.Not(check.Equals), "")
355354
}

0 commit comments

Comments
 (0)