Documentation
¶
Index ¶
- type AlpineRSASigner
- type GPGSigner
- func (s *GPGSigner) GetPublicKey() ([]byte, error)
- func (s *GPGSigner) SignCleartext(data []byte) ([]byte, error)
- func (s *GPGSigner) SignDetached(data []byte) ([]byte, error)
- func (s *GPGSigner) SignDetachedBinary(data []byte) ([]byte, error)
- func (s *GPGSigner) SignDetachedBinaryFromFile(filePath string) ([]byte, error)
- type RSASigner
- type Signer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlpineRSASigner ¶
type AlpineRSASigner struct {
// contains filtered or unexported fields
}
AlpineRSASigner implements RSASigner interface for Alpine APK signing
func NewAlpineRSASigner ¶
func NewAlpineRSASigner(keyPath, passphrase string) (*AlpineRSASigner, error)
NewAlpineRSASigner creates a new RSA signer for Alpine from a private key file
func (*AlpineRSASigner) GetPublicKey ¶
func (s *AlpineRSASigner) GetPublicKey() ([]byte, error)
GetPublicKey returns the public key in PEM format
type GPGSigner ¶
type GPGSigner struct {
// contains filtered or unexported fields
}
GPGSigner implements Signer interface using GPG
func NewGPGSigner ¶
NewGPGSigner creates a new GPG signer from a private key file
func (*GPGSigner) GetPublicKey ¶
GetPublicKey returns the public key in armored format
func (*GPGSigner) SignCleartext ¶
SignCleartext creates a cleartext signature (for Debian InRelease)
func (*GPGSigner) SignDetached ¶
SignDetached creates a detached ASCII-armored signature (for Debian Release.gpg, RPM repomd.xml.asc)
func (*GPGSigner) SignDetachedBinary ¶
SignDetachedBinary creates a detached binary signature (for Pacman .sig files) Pacman expects binary OpenPGP signatures in old packet format, not ASCII-armored ones We use GPG command-line to ensure compatibility with Pacman's expectations
type RSASigner ¶
type RSASigner interface {
// SignRSA creates an RSA PKCS1v15 signature
SignRSA(data []byte) ([]byte, error)
// GetPublicKey returns the public key
GetPublicKey() ([]byte, error)
}
RSASigner interface for RSA signing (Alpine APK)
func NewNilRSASigner ¶
func NewNilRSASigner() RSASigner
NewNilRSASigner returns a nil RSA signer (for unsigned repositories)
type Signer ¶
type Signer interface {
// SignCleartext creates a cleartext signature (for Debian InRelease)
SignCleartext(data []byte) ([]byte, error)
// SignDetached creates a detached ASCII-armored signature (for Debian Release.gpg, RPM repomd.xml.asc)
SignDetached(data []byte) ([]byte, error)
// SignDetachedBinary creates a detached binary signature (for Pacman .sig files)
SignDetachedBinary(data []byte) ([]byte, error)
// SignDetachedBinaryFromFile creates a detached binary signature directly from a file
// This avoids loading large files into memory
SignDetachedBinaryFromFile(filePath string) ([]byte, error)
// GetPublicKey returns the public key
GetPublicKey() ([]byte, error)
}
Signer interface for signing repository metadata
func NewNilSigner ¶
func NewNilSigner() Signer
NewNilSigner returns a nil signer (for unsigned repositories)