Documentation ¶
Overview ¶
Package certificate provides en: structure of the Container representation in the asn.1, methods for this structure
and the decoding function from DER
ru: структуру представления Container в asn.1, методы для этой структуры
и функцию декодирования из DER
asn.1 - Abstract Syntax Notation One (ASN. 1) is a standard interface description language for defining data structures that can be serialized and deserialized in a cross-platform way. It is broadly used in telecommunications and computer networking, and especially in cryptography. https://en.wikipedia.org/wiki/ASN.1
Index ¶
- func IsCertificatesEqual(a, b *Container) bool
- func VerifyPartialChain(cert *Container, parents []*Container) error
- type Container
- func (c *Container) CheckSignature(algo *signaturealgorithm.SignatureAlgorithm, signedSource, signature []byte) (err error)
- func (c *Container) CheckSignatureFrom(parent *Container) error
- func (c *Container) EncodeToDER() (containers.DER, error)
- func (c *Container) EncodeToPEM() (containers.PEM, error)
- func (c *Container) GetSource() *Container
- func (c *Container) IsValidOnDate(date time.Time) bool
- type PKCS1PublicKey
- type Service
- type VerifyDigestError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCertificatesEqual ¶
func VerifyPartialChain ¶
VerifyPartialChain checks that a given cert is issued by the first parent in the list, then continue down the path. It doesn't require the last parent to be a root CA, or to be trusted in any truststore. It simply verifies that the chain provided, albeit partial, makes sense.
Types ¶
type Container ¶
type Container struct { Raw asn1.RawContent TBSCertificate tbscertificate.Container SignatureAlgorithm pkix.AlgorithmIdentifier SignatureValue asn1.BitString }
func DecodeDER ¶
func DecodeDER(derData containers.DER) ([]*Container, error)
DecodeDER en: parses a multiple certificates from the given ASN.1 DER data. ru: парсит DER данные и выдает слайс сертификатов
func DecodePEM ¶
func DecodePEM(pemData containers.PEM) ([]*Container, error)
DecodePEM en: parses a multiple certificates from the given ASN.1 PEM data. ru: парсит PEM данные и выдает слайс сертификатов
func DecodePEMFile ¶
DecodePEMFile en: parses a multiple certificates from the given ASN.1 PEM file. ru: парсит указанный файл в формате PEM и возвращает слайс сертификатов
func (*Container) CheckSignature ¶
func (c *Container) CheckSignature( algo *signaturealgorithm.SignatureAlgorithm, signedSource, signature []byte, ) (err error)
CheckSignature - Verifies signature over certificate public key
func (*Container) CheckSignatureFrom ¶
CheckSignatureFrom verifies that the signature on c is a valid signature from parent.
func (*Container) EncodeToDER ¶
func (c *Container) EncodeToDER() (containers.DER, error)
EncodeToDER en: convert certificate to DER data. ru: конвертирует сертификат в DER данные
func (*Container) EncodeToPEM ¶
func (c *Container) EncodeToPEM() (containers.PEM, error)
EncodeToPEM en: convert certificate to PEM data. ru: конвертирует сертификат в PEM данные
type PKCS1PublicKey ¶
RSA public key PKCS#1 representation
type VerifyDigestError ¶
type VerifyDigestError struct { }
VerifyDigestError en: error - digest verify failed ru: ошибка - Верификация подписи не удалась
func (*VerifyDigestError) Error ¶
func (e *VerifyDigestError) Error() string
Error en: error text formation ru: формирование текста ошибки
func (*VerifyDigestError) Is ¶
func (e *VerifyDigestError) Is(target error) bool
Is en: compare with target error ru: сравнение с другой ошибкой
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package tbscertificate provides en: structure of the Container representation in the asn.1, methods for this structure and the decoding function from DER ru: структуру представления Container в asn.1, методы для этой структуры и функцию декодирования из DER asn.1 - Abstract Syntax Notation One (ASN.
|
Package tbscertificate provides en: structure of the Container representation in the asn.1, methods for this structure and the decoding function from DER ru: структуру представления Container в asn.1, методы для этой структуры и функцию декодирования из DER asn.1 - Abstract Syntax Notation One (ASN. |
public-key-info
Package publickeyinfo provides en: structure of the public key representation in the asn.1, methods for this structure and the decoding function from DER ru: структуру представления публичного ключа в asn.1, методы для этой структуры и функцию декодирования из DER asn.1 - Abstract Syntax Notation One (ASN.
|
Package publickeyinfo provides en: structure of the public key representation in the asn.1, methods for this structure and the decoding function from DER ru: структуру представления публичного ключа в asn.1, методы для этой структуры и функцию декодирования из DER asn.1 - Abstract Syntax Notation One (ASN. |