mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 04:06:18 +08:00
remove unused member Raw from certificate, #95
This commit is contained in:
parent
8f6804d73f
commit
68e297f49b
@ -1,4 +1,22 @@
|
|||||||
// Package smx509 parses X.509-encoded keys and certificates include SM2/SM3 support.
|
// Package smx509 parses X.509-encoded keys and certificates include SM2/SM3 support.
|
||||||
|
//
|
||||||
|
// It allows parsing and generating certificates, certificate signing
|
||||||
|
// requests, certificate revocation lists, and encoded public and private keys.
|
||||||
|
// It provides a certificate verifier, complete with a chain builder.
|
||||||
|
//
|
||||||
|
// The package targets the X.509 technical profile defined by the IETF (RFC
|
||||||
|
// 2459/3280/5280), and as further restricted by the CA/Browser Forum Baseline
|
||||||
|
// Requirements. There is minimal support for features outside of these
|
||||||
|
// profiles, as the primary goal of the package is to provide compatibility
|
||||||
|
// with the publicly trusted TLS certificate ecosystem and its policies and
|
||||||
|
// constraints.
|
||||||
|
//
|
||||||
|
// On Windows, certificate verification is handled by system APIs, but
|
||||||
|
// the package aims to apply consistent validation rules across operating
|
||||||
|
// systems.
|
||||||
|
//
|
||||||
|
// On macOS, we did NOT support to use system root CA yet due to too many SDK internal
|
||||||
|
// package's dependencies.
|
||||||
package smx509
|
package smx509
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -139,7 +157,6 @@ func MarshalPKIXPublicKey(pub interface{}) ([]byte, error) {
|
|||||||
// These structures reflect the ASN.1 structure of X.509 certificates.:
|
// These structures reflect the ASN.1 structure of X.509 certificates.:
|
||||||
|
|
||||||
type certificate struct {
|
type certificate struct {
|
||||||
Raw asn1.RawContent
|
|
||||||
TBSCertificate tbsCertificate
|
TBSCertificate tbsCertificate
|
||||||
SignatureAlgorithm pkix.AlgorithmIdentifier
|
SignatureAlgorithm pkix.AlgorithmIdentifier
|
||||||
SignatureValue asn1.BitString
|
SignatureValue asn1.BitString
|
||||||
@ -1454,7 +1471,6 @@ func CreateCertificate(rand io.Reader, template, parent *x509.Certificate, pub,
|
|||||||
}
|
}
|
||||||
|
|
||||||
signedCert, err := asn1.Marshal(certificate{
|
signedCert, err := asn1.Marshal(certificate{
|
||||||
nil,
|
|
||||||
c,
|
c,
|
||||||
signatureAlgorithm,
|
signatureAlgorithm,
|
||||||
asn1.BitString{Bytes: signature, BitLength: len(signature) * 8},
|
asn1.BitString{Bytes: signature, BitLength: len(signature) * 8},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user