From 9c12d15bfb6df705748144cbcdbee36c5184ea02 Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Sat, 29 Apr 2023 10:50:18 +0100 Subject: [PATCH] pkg/inspect: correct some doc comments --- pkg/inspect/private_key.go | 2 +- pkg/inspect/tls.go | 23 +++-------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/pkg/inspect/private_key.go b/pkg/inspect/private_key.go index 19d1951..a5fa0d8 100644 --- a/pkg/inspect/private_key.go +++ b/pkg/inspect/private_key.go @@ -85,7 +85,7 @@ func (priv *PrivateKey) Location() string { return priv.Loc } -// Info returns structured information about the prvate key. +// Info returns structured information about the private key. func (priv *PrivateKey) Info() []Section { return []Section{ priv.PrivateKeyInfoSection(), diff --git a/pkg/inspect/tls.go b/pkg/inspect/tls.go index c310220..1257322 100644 --- a/pkg/inspect/tls.go +++ b/pkg/inspect/tls.go @@ -25,23 +25,6 @@ func ConnectionState(c tls.ConnectionState) []Info { return info } -// PrivateKeyInfo returns structured information about the given RSA private key. -/* -func PrivateKeyInfo(loc string, key *rsa.PrivateKey) *PrivateKey { - pl := make([]int, len(key.Primes)) - for i, n := range key.Primes { - pl[i] = n.BitLen() - } - - return &PrivateKey{ - Loc: loc, - Primes: len(key.Primes), - PrimeLens: pl, - Public: PublicKeyInfo(loc, &key.PublicKey), - } -} -*/ - // TLSSecurity provides an indicative security assessment of a negotiated TLS // connection. type TLSSecurity int @@ -74,17 +57,17 @@ type TLSConnectionState struct { CipherSuite uint16 } -// Type indicates this is a private key. +// Type indicates this is a TLS connection type. func (tcs *TLSConnectionState) Type() Type { return TypeTLSConnectionState } -// Location returns the location data stored by PrivateKeyInfo. +// Location returns the location data stored by TLSConnectionState. func (tcs *TLSConnectionState) Location() string { return "TLS handshake" } -// Info returns structured information about the prvate key. +// Info returns structured information about the TLS connection. func (tcs *TLSConnectionState) Info() []Section { var security TLSSecurity = TLSSecurityStrong