Skip to content
/ pkcs7 Public
forked from fullsailor/pkcs7

Implements a subset of PKCS#7/Cryptographic Message Syntax (rfc2315, rfc5652) with stream signing and verifying

License

Notifications You must be signed in to change notification settings

andviro/pkcs7

 
 

Repository files navigation

pkcs7

This is a fork of an excellent pkcs7 package. Copyright (c) 2015 Andrew Smith.

Notable additions to the original library are stream verifying and signing functions. To verify signed message from reader src while writing contents to some writer dest use:

p7 := pkcs7.NewDecoder(r)
if err := p7.VerifyTo(dest); err != nil {
    // handle error
}
// use p7 fields and methods

To sign file src with known size to writer dest:

p7 := pkcs7.NewEncoder(dest)
if err := p7.AddSigner(cert.Certificate, cert.PrivateKey, SignerInfoConfig{}); err != nil {
    // handle add signer error
}
if err = p7.SignFrom(r, size); err != nil {
    // handle write error
}

GoDoc

Original README

GoDoc Build Status

pkcs7 implements parsing and creating signed and enveloped messages.

About

Implements a subset of PKCS#7/Cryptographic Message Syntax (rfc2315, rfc5652) with stream signing and verifying

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%