mirror of
https://github.com/smallstep/certificates.git
synced 2024-10-31 03:20:16 +00:00
Fix typos.
This commit is contained in:
parent
329f401e58
commit
8381e9bd17
@ -13,7 +13,7 @@ var (
|
|||||||
oidStepCertificateAuthority = append(asn1.ObjectIdentifier(nil), append(oidStepRoot, 2)...)
|
oidStepCertificateAuthority = append(asn1.ObjectIdentifier(nil), append(oidStepRoot, 2)...)
|
||||||
)
|
)
|
||||||
|
|
||||||
// CertificateAuthorityExtension is type used to encode the certificate
|
// CertificateAuthorityExtension type is used to encode the certificate
|
||||||
// authority extension.
|
// authority extension.
|
||||||
type CertificateAuthorityExtension struct {
|
type CertificateAuthorityExtension struct {
|
||||||
Type string
|
Type string
|
||||||
|
4
db/db.go
4
db/db.go
@ -190,11 +190,11 @@ func (db *DB) RevokeSSH(rci *RevokedCertificateInfo) error {
|
|||||||
|
|
||||||
// GetCertificate retrieves a certificate by the serial number.
|
// GetCertificate retrieves a certificate by the serial number.
|
||||||
func (db *DB) GetCertificate(serialNumber string) (*x509.Certificate, error) {
|
func (db *DB) GetCertificate(serialNumber string) (*x509.Certificate, error) {
|
||||||
ans1Data, err := db.Get(certsTable, []byte(serialNumber))
|
asn1Data, err := db.Get(certsTable, []byte(serialNumber))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "database Get error")
|
return nil, errors.Wrap(err, "database Get error")
|
||||||
}
|
}
|
||||||
cert, err := x509.ParseCertificate(ans1Data)
|
cert, err := x509.ParseCertificate(asn1Data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrapf(err, "error parsing certificate with serial number %s", serialNumber)
|
return nil, errors.Wrapf(err, "error parsing certificate with serial number %s", serialNumber)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user