Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertificatePublicKey ¶
func CertificatePublicKey(cert *x509.Certificate) (*keys.PublicKey, error)
CertificatePublicKey returns the P-256 public key from cert.
func CertificatePublicKeyFromRaw ¶
CertificatePublicKeyFromRaw returns the P-256 public key from the first TLS certificate in a handshake chain.
func IsTrustedPeer ¶
IsTrustedPeer reports whether ctx was authenticated during the TLS handshake.
Types ¶
type AuthInfo ¶
type AuthInfo struct {
credentials.TLSInfo
PublicKey *keys.PublicKey
}
AuthInfo is TLS authentication information for a peer with a supported public key. It is set once during the TLS handshake.
func NewAuthInfo ¶
func NewAuthInfo(info credentials.TLSInfo) (AuthInfo, error)
NewAuthInfo returns authentication information for a TLS peer certificate.
func (AuthInfo) AuthType ¶
AuthType implements credentials.AuthInfo.
Click to show internal directories.
Click to hide internal directories.