Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pkcs7
✓ github.com/gunnsth/pkcs7
Parses a PKCS#7 signed data structure.
package main
import (
"crypto/x509"
"encoding/pem"
"log"
"github.com/gunnsth/pkcs7"
)
func main() {
// Example: parsing a PKCS7 signed data
certPEM := []byte("-----BEGIN CERTIFICATE-----\n...")
block, _ := pem.Decode(certPEM)
cert, err := x509.ParseCertificate(block.Bytes)
if err != nil {
log.Fatal(err)
}
pkcs7Data := []byte("...")
parsed, err := pkcs7.Parse(pkcs7Data)
if err != nil {
log.Fatal(err)
}
log.Printf("Parsed PKCS7: %+v", parsed)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20181213175627-3cffc6fbfe83latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.