Documentation ¶
Overview ¶
Package PrcIdSigner Signs a GPG Public Key's ID.It works directly on Ascii armor of public and private keys.
It also provides easy to use methods to change Public Keys from openpgp.Entity to Armor and vice versa.
Current Implemetation of SignIdentity in Go is faulty and generates ID signature that is not recognized as valid by other GPG softwares.
Hence this implements patch provided to resolve issue no. 7371 https://code.google.com/p/go/issues/detail?id=7371.
Index ¶
- func GetPri(asciiPri string, pripwd string) (priKey packet.PrivateKey, priEnt openpgp.Entity, err error)
- func GetPub(asciiPub string) (pubKey packet.PublicKey, retEntity openpgp.Entity, err error)
- func PubEntToAsciiArmor(pubEnt openpgp.Entity) (asciiEntity string, err error)
- func SignPubKeyPKS(asciiPub string, asciiPri string, pripwd string, lifeTime uint32) (asciiSignedKey string, err error)
- type PrcEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPri ¶
func GetPri(asciiPri string, pripwd string) (priKey packet.PrivateKey, priEnt openpgp.Entity, err error)
GetPri gets packet.PrivateKEy and openpgp.Entity of Decrypted Private Key from ascii armor
func PubEntToAsciiArmor ¶
PubEntToAsciiArmor creates ASscii Armor from pubEnt of type openpgp.Entity
func SignPubKeyPKS ¶
func SignPubKeyPKS(asciiPub string, asciiPri string, pripwd string, lifeTime uint32) (asciiSignedKey string, err error)
SignPubKeyPKS takes asciiarmored private key which will sign the public key Public key is also ascii armored,pripwd is password of private key in string This function will return ascii armored signed public key i.e. (pubkey+sign by prikey) If lifeTime==0 then signature doesnt expire
Types ¶
type PrcEntity ¶
type PrcEntity struct {
*Entity
}
func (PrcEntity) PRCSignIdentity ¶
PRCSignIdentity adds a signature to e, from signer, attesting that identity is associated with e. The provided identity must already be an element of e.Identities and the private key of signer must have been decrypted if necessary. If config is nil, sensible defaults will be used. Note:It is custom implementation based on patch provided to resolve issue no. 7371 https://code.google.com/p/go/issues/detail?id=7371.