Documentation ¶
Overview ¶
Copyright 2022 Google LLC. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Client is a cross-platform client for the signer binary (a.k.a."EnterpriseCertSigner"). The signer binary is OS-specific, but exposes a standard set of APIs for the client to use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { io.ReadCloser io.WriteCloser }
A Connection wraps a pair of unidirectional streams as an io.ReadWriteCloser.
func (*Connection) Close ¶
func (c *Connection) Close() error
Close closes c's underlying ReadCloser and WriteCloser.
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key implements credential.Credential by holding the executed signer subprocess.
func Cred ¶
Cred spawns a signer subprocess that listens on stdin/stdout to perform certificate related operations, including signing messages with the private key.
The signer binary path is read from the specified configFilePath, if provided. Otherwise, use the default config file path.
The config file also specifies which certificate the signer should use.
func (*Key) CertificateChain ¶
CertificateChain returns the credential as a raw X509 cert chain. This contains the public key.
func (*Key) Close ¶
Close closes the RPC connection and kills the signer subprocess. Call this to free up resources when the Key object is no longer needed.
type SignArgs ¶
type SignArgs struct { Digest []byte // The content to sign. Opts crypto.SignerOpts // Options for signing, such as Hash identifier. }
SignArgs contains arguments to a crypto Signer.Sign method.