pkg/inspect: correct some doc comments
This commit is contained in:
parent
5ac63352a7
commit
9c12d15bfb
|
@ -85,7 +85,7 @@ func (priv *PrivateKey) Location() string {
|
||||||
return priv.Loc
|
return priv.Loc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info returns structured information about the prvate key.
|
// Info returns structured information about the private key.
|
||||||
func (priv *PrivateKey) Info() []Section {
|
func (priv *PrivateKey) Info() []Section {
|
||||||
return []Section{
|
return []Section{
|
||||||
priv.PrivateKeyInfoSection(),
|
priv.PrivateKeyInfoSection(),
|
||||||
|
|
|
@ -25,23 +25,6 @@ func ConnectionState(c tls.ConnectionState) []Info {
|
||||||
return 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
|
// TLSSecurity provides an indicative security assessment of a negotiated TLS
|
||||||
// connection.
|
// connection.
|
||||||
type TLSSecurity int
|
type TLSSecurity int
|
||||||
|
@ -74,17 +57,17 @@ type TLSConnectionState struct {
|
||||||
CipherSuite uint16
|
CipherSuite uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type indicates this is a private key.
|
// Type indicates this is a TLS connection type.
|
||||||
func (tcs *TLSConnectionState) Type() Type {
|
func (tcs *TLSConnectionState) Type() Type {
|
||||||
return TypeTLSConnectionState
|
return TypeTLSConnectionState
|
||||||
}
|
}
|
||||||
|
|
||||||
// Location returns the location data stored by PrivateKeyInfo.
|
// Location returns the location data stored by TLSConnectionState.
|
||||||
func (tcs *TLSConnectionState) Location() string {
|
func (tcs *TLSConnectionState) Location() string {
|
||||||
return "TLS handshake"
|
return "TLS handshake"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info returns structured information about the prvate key.
|
// Info returns structured information about the TLS connection.
|
||||||
func (tcs *TLSConnectionState) Info() []Section {
|
func (tcs *TLSConnectionState) Info() []Section {
|
||||||
var security TLSSecurity = TLSSecurityStrong
|
var security TLSSecurity = TLSSecurityStrong
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue