PrcIdSigner

package
v0.0.0-...-cbc4e0b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2014 License: AGPL-3.0 Imports: 8 Imported by: 0

README

PrcIdSigner

It signs an ID in GPG Public Key.It works directly on Ascii armor of public and private keys which makes it easy to work with.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.

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

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 GetPub

func GetPub(asciiPub string) (pubKey packet.PublicKey, retEntity openpgp.Entity, err error)

GetPub gets packet.PublicKey and openpgp.Entity of Public Key from ascii armor

func PubEntToAsciiArmor

func PubEntToAsciiArmor(pubEnt openpgp.Entity) (asciiEntity string, err error)

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

func (e PrcEntity) PRCSignIdentity(identity string, signer PrcEntity, config *packet.Config) error

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.

func (PrcEntity) PRCSignIdentityLifeTime

func (e PrcEntity) PRCSignIdentityLifeTime(identity string, signer PrcEntity, config *packet.Config, lifeTime uint32) error

PRCSignIdentityLifeTime is same as PRCSignIdentity but with a Lifetime of the signature in seconds

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL