package
2.0.0+incompatible
Repository: https://github.com/zhongshuwen/gmsm.git
Documentation: pkg.go.dev
# Functions
CreateCertificate creates a new certificate based on a template.
CreateCertificateRequest creates a new certificate request based on a template.
No description provided by the author
CreateCertificateToPem creates a new certificate based on a template and encodes it to PEM format.
CreateRevocationList creates a new X.509 v2 Certificate Revocation List, according to RFC 5280, based on template.
DegenerateCertificate creates a signed data structure containing only the provided certificate or certificate chain.
MarshalPKCS1PrivateKey converts a private key to ASN.1 DER encoded form.
MarshalPKIXPublicKey serialises a public key to DER-encoded PKIX format.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewCertPool returns a new, empty CertPool.
NewSignedData initializes a SignedData with content.
ParseCertificate parses a single certificate from the given ASN.1 DER data.
ParseCertificateRequest parses a single certificate request from the given ASN.1 DER data.
ParseCertificates parses one or more certificates from the given ASN.1 DER data.
ParseCRL parses a CRL from the given bytes.
ParseDERCRL parses a DER encoded CRL from the given bytes.
ParsePKCS1PrivateKey returns an RSA private key from its ASN.1 PKCS#1 DER encoded form.
ParsePKCS7 decodes a DER encoded PKCS7.
No description provided by the author
No description provided by the author
No description provided by the author
ParsePKIXPublicKey parses a DER encoded public key.
No description provided by the author
No description provided by the author
No description provided by the author
Encrypt creates and returns an envelope data PKCS7 structure with encrypted recipient keys for each recipient public key.
No description provided by the author
No description provided by the author
No description provided by the author
DHex是sm2私钥的真正关键数值.
No description provided by the author
No description provided by the author
No description provided by the author
RegisterHash registers a function that returns a new instance of the given hash function.
SystemCertPool returns a copy of the system cert pool.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
CANotAuthorizedForThisName results when an intermediate or root certificate has a name constraint which doesn't include the name being checked.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Expired results when a certificate has expired, based on the time given in the VerifyOptions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IncompatibleUsage results when the certificate's key usage indicates that it may only be used for a different purpose.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
import golang.org/x/crypto/md4.
import crypto/md5.
no implementation; MD5+SHA1 used for TLS RSA.
No description provided by the author
NameMismatch results when the subject name of a parent certificate does not match the issuer name in the child.
NotAuthorizedToSign results when a certificate is signed by another which isn't marked as a CA certificate.
import golang.org/x/crypto/ripemd160.
No description provided by the author
import crypto/sha1.
SM3WithRSA reserve.
import crypto/sha256.
import crypto/sha256.
No description provided by the author
No description provided by the author
import golang.org/x/crypto/sha3.
import golang.org/x/crypto/sha3.
import golang.org/x/crypto/sha3.
import golang.org/x/crypto/sha3.
import crypto/sha512.
No description provided by the author
No description provided by the author
import crypto/sha512.
import crypto/sha512.
import crypto/sha512.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TooManyIntermediates results when a path length constraint is violated.
No description provided by the author
No description provided by the author
# Variables
ContentEncryptionAlgorithm determines the algorithm used to encrypt the plaintext message.
ErrNotEncryptedContent is returned when attempting to Decrypt data that is not encrypted data.
ErrPKCS7UnsupportedAlgorithm tells you when our quick dev assumptions have failed.
ErrUnsupportedAlgorithm results from attempting to perform an operation that involves algorithms that are not currently implemented.
ErrUnsupportedContentType is returned when a PKCS7 content is not supported.
ErrUnsupportedEncryptionAlgorithm is returned when attempting to encrypt content with an unsupported algorithm.
# Structs
Attribute represents a key value pair attribute.
A Certificate represents an X.509 certificate.
CertificateInvalidError results when an odd error occurs.
CertificateRequest represents a PKCS #10, certificate signature request.
CertPool is a set of certificates.
ConstraintViolationError results when a requested usage is not permitted by a certificate.
reference to https://www.rfc-editor.org/rfc/rfc5958.txt.
HostnameError results when the set of authorized names doesn't match the requested name.
MessageDigestMismatchError is returned when the signer data digest does not match the computed digest for the contained content.
reference to https://www.ietf.org/rfc/rfc2898.txt.
No description provided by the author
reference to https://www.ietf.org/rfc/rfc2898.txt.
reference to https://www.ietf.org/rfc/rfc2898.txt.
PKCS7 Represents a PKCS7 structure.
reference to https://www.ietf.org/rfc/rfc2898.txt.
reference to https://www.rfc-editor.org/rfc/rfc5958.txt.
RevocationList contains the fields used to create an X.509 v2 Certificate Revocation list with CreateRevocationList.
SignedData is an opaque data structure for creating signed data payloads.
SignerInfoConfig are optional values to include when adding a signer.
SystemRootsError results when we fail to load the system root certificates.
No description provided by the author
UnknownAuthorityError results when the certificate issuer is unknown.
VerifyOptions contains parameters for Certificate.Verify.
# Type aliases
ExtKeyUsage represents an extended set of actions that are valid for a given key.
No description provided by the author
An InsecureAlgorithmError.
No description provided by the author
KeyUsage represents the set of actions that are valid for a given key.
No description provided by the author
No description provided by the author