Documentation ¶
Index ¶
- Constants
- Variables
- func KeyPrefix(p string) []byte
- func NewErrCRLSignerCertDelegatorNotChainedBack() error
- func NewErrCRLSignerCertNotChainedBackToDelegator() error
- func NewErrCRLSignerCertificateInvalidFormat(description string) error
- func NewErrCRLSignerCertificatePidNotEqualMsgPid(certificatePid int32, messagePid int32) error
- func NewErrCRLSignerCertificatePidNotEqualRevocationPointPid(certificatePid int32, revocationPointPid int32) error
- func NewErrCRLSignerCertificateVidNotEqualMsgVid(certificateVid int32, messageVid int32) error
- func NewErrCRLSignerCertificateVidNotEqualRevocationPointVid(vid1 int32, vid2 int32) error
- func NewErrCertNotChainedBack() error
- func NewErrCertificateAlreadyExists(issuer string, serialNumber string) error
- func NewErrCertificateBySerialNumberDoesNotExist(subject string, subjectKeyID string, serialNumber string) error
- func NewErrCertificateDoesNotExist(subject string, subjectKeyID string) error
- func NewErrCertificateVidNotEqualMsgVid(e interface{}) error
- func NewErrDataFieldPresented(revocationType uint32) error
- func NewErrEmptyDataDigest() error
- func NewErrEmptyDataDigestType() error
- func NewErrInappropriateCertificateType(e interface{}) error
- func NewErrInvalidAddress(err error) error
- func NewErrInvalidAuthorityKeyIDFormat() error
- func NewErrInvalidCertificate(e interface{}) error
- func NewErrInvalidDataDigestType(dataDigestType uint32, allowedDataDigestTypes []uint32) error
- func NewErrInvalidDataURLSchema() error
- func NewErrInvalidPidFormat(e interface{}) error
- func NewErrInvalidRevocationType(revocationType uint32, allowedRevocationTypes []uint32) error
- func NewErrInvalidVidFormat(e interface{}) error
- func NewErrMessageExistingCertIsNotRoot(subject string, subjectKeyID string) error
- func NewErrMessageExpectedNonRoot(subject string, subjectKeyID string) error
- func NewErrMessageVidNotEqualAccountVid(msgVid int32, accountVid int32) error
- func NewErrMessageVidNotEqualRootCertVid(vid1 int32, vid2 int32) error
- func NewErrNocRootCertificateDoesNotExist(subject string, subjectKeyID string) error
- func NewErrNonEmptyDataDigest() error
- func NewErrNonRootCertificateSelfSigned() error
- func NewErrNotEmptyDataDigestType() error
- func NewErrNotEmptyPidForNonRootCertificate() error
- func NewErrNotEmptyPidForRootCertificate() error
- func NewErrNotEmptyVid(e interface{}) error
- func NewErrPemValuesNotEqual(subject string, subjectKeyID string) error
- func NewErrPidNotFoundInCertificateButProvidedInRevocationPoint() error
- func NewErrPidNotFoundInMessage(certificatePid int32) error
- func NewErrPkiRevocationDistributionPointDoesNotExists(vid int32, label string, issuerSubjectKeyID string) error
- func NewErrPkiRevocationDistributionPointWithDataURLAlreadyExists(dataURL string, issuerSubjectKeyID string) error
- func NewErrPkiRevocationDistributionPointWithVidAndLabelAlreadyExists(vid int32, label string, issuerSubjectKeyID string) error
- func NewErrProposedCertificateAlreadyExists(subject string, subjectKeyID string) error
- func NewErrProposedCertificateDoesNotExist(subject string, subjectKeyID string) error
- func NewErrProposedCertificateRevocationAlreadyExists(subject string, subjectKeyID string) error
- func NewErrProposedCertificateRevocationDoesNotExist(subject string, subjectKeyID string, serialNumber string) error
- func NewErrProvidedNocCertButExistingNotNoc(subject string, subjectKeyID string) error
- func NewErrProvidedNotNocCertButExistingNoc(subject string, subjectKeyID string) error
- func NewErrProvidedNotNocCertButRootIsNoc() error
- func NewErrRevokeCertVidNotEqualToAccountVid(rootVID int32, accountVID int32) error
- func NewErrRevokeRootCertVidNotEqualToAccountVid(rootVID int32, accountVID int32) error
- func NewErrRevokedCertificateDoesNotExist(subject string, subjectKeyID string) error
- func NewErrRootCertVidNotEqualToAccountVid(rootVID int32, accountVID int32) error
- func NewErrRootCertVidNotEqualToCertVid(rootVID int32, certVID int32) error
- func NewErrRootCertificateDoesNotExist(subject string, subjectKeyID string) error
- func NewErrRootCertificateIsNotSelfSigned() error
- func NewErrRootOfNocCertIsNotNoc(subject string, subjectKeyID string) error
- func NewErrUnauthorizedCertIssuer(subject string, subjectKeyID string) error
- func NewErrUnauthorizedCertOwner(subject string, subjectKeyID string) error
- func NewErrUnauthorizedCertVendor(ownerVid int32) error
- func NewErrUnauthorizedRole(transactionName string, requiredRole types.AccountRole) error
- func NewErrUnsupportedOperation(e interface{}) error
- func NewErrVidNotFound(e interface{}) error
- func NewErrWrongIssuerSubjectKeyIDFormat() error
- func NewErrWrongSubjectKeyIDFormat() error
Constants ¶
View Source
const ( // ModuleName defines the module name. ModuleName = "pki" // StoreKey defines the primary module store key. StoreKey = ModuleName // RouterKey is the message route for slashing. RouterKey = ModuleName // QuerierRoute defines the module's query routing key. QuerierRoute = ModuleName // MemStoreKey defines the in-memory store key. MemStoreKey = "mem_pki" )
View Source
const ( ApprovedRootCertificatesKeyPrefix = "ApprovedRootCertificates/value/" RevokedRootCertificatesKeyPrefix = "RevokedRootCertificates/value/" )
Variables ¶
View Source
var ( ErrProposedCertificateAlreadyExists = errors.Register(ModuleName, 401, "proposed certificate already exists") ErrProposedCertificateDoesNotExist = errors.Register(ModuleName, 402, "proposed certificate does not exist") ErrCertificateAlreadyExists = errors.Register(ModuleName, 403, "certificate already exists") ErrCertificateDoesNotExist = errors.Register(ModuleName, 404, "certificate does not exist") ErrProposedCertificateRevocationAlreadyExists = errors.Register(ModuleName, 405, "proposed certificate revocation already exists") ErrProposedCertificateRevocationDoesNotExist = errors.Register(ModuleName, 406, "proposed certificate revocation does not exist") ErrRevokedCertificateDoesNotExist = errors.Register(ModuleName, 407, "revoked certificate does not exist") ErrInappropriateCertificateType = errors.Register(ModuleName, 408, "inappropriate certificate type") ErrInvalidCertificate = errors.Register(ModuleName, 409, "invalid certificate") ErrInvalidDataDigestType = errors.Register(ModuleName, 410, "invalid data digest type") ErrInvalidRevocationType = errors.Register(ModuleName, 411, "invalid revocation type") ErrNotEmptyPid = errors.Register(ModuleName, 412, "pid is not empty") ErrNotEmptyVid = errors.Register(ModuleName, 413, "vid is not empty") ErrRootCertificateIsNotSelfSigned = errors.Register(ModuleName, 414, "Root certificate is not self-signed") ErrCRLSignerCertificatePidNotEqualRevocationPointPid = errors.Register(ModuleName, 415, "CRLSignerCertificate pid does not equal revocation point pid") ErrCRLSignerCertificateVidNotEqualRevocationPointVid = errors.Register(ModuleName, 416, "CRLSignerCertificate vid does not equal revocation point pid") ErrCRLSignerCertificatePidNotEqualMsgPid = errors.Register(ModuleName, 417, "CRLSignerCertificate pid does not equal message pid") ErrCRLSignerCertificateVidNotEqualMsgVid = errors.Register(ModuleName, 418, "CRLSignerCertificate vid does not equal message vid") ErrMessageVidNotEqualAccountVid = errors.Register(ModuleName, 419, "Message vid does not equal the account vid") ErrNonRootCertificateSelfSigned = errors.Register(ModuleName, 420, "Intermediate or leaf certificate must not be self-signed") ErrEmptyDataFileSize = errors.Register(ModuleName, 421, "empty data file size") ErrEmptyDataDigest = errors.Register(ModuleName, 422, "empty data digest") ErrEmptyDataDigestType = errors.Register(ModuleName, 423, "empty data digest type") ErrNotEmptyDataDigestType = errors.Register(ModuleName, 424, "not empty data digest type") ErrDataFieldPresented = errors.Register(ModuleName, 425, "one or more of DataDigest, DataDigestType, DataFileSize fields presented") ErrWrongSubjectKeyIDFormat = errors.Register(ModuleName, 426, "wrong SubjectKeyID format") ErrVidNotFound = errors.Register(ModuleName, 427, "vid not found") ErrPidNotFound = errors.Register(ModuleName, 428, "pid not found") ErrPemValuesNotEqual = errors.Register(ModuleName, 429, "pem values of certificates are not equal") ErrPkiRevocationDistributionPointAlreadyExists = errors.Register(ModuleName, 430, "pki revocation distribution point already exists") ErrPkiRevocationDistributionPointDoesNotExists = errors.Register(ModuleName, 431, "pki revocaition distribution point does not exist") ErrUnsupportedOperation = errors.Register(ModuleName, 432, "unsupported operation") ErrInvalidVidFormat = errors.Register(ModuleName, 433, "invalid vid format") ErrInvalidPidFormat = errors.Register(ModuleName, 434, "invalid pid format") ErrInvalidDataURLFormat = errors.Register(ModuleName, 435, "invalid data url format") ErrCertificateVidNotEqualMsgVid = errors.Register(ModuleName, 436, "certificate's vid is not equal to the message vid") ErrMessageVidNotEqualRootCertVid = errors.Register(ModuleName, 437, "Message vid is not equal to ledger's root certificate vid") ErrCertNotChainedBack = errors.Register(ModuleName, 438, "Certificate is not chained back to a root certificate on DCL") ErrCertVidNotEqualAccountVid = errors.Register(ModuleName, 439, "account's vid is not equal to certificate vid") ErrCertVidNotEqualToRootVid = errors.Register(ModuleName, 440, "certificate's vid is not equal to vid of root certificate ") ErrCRLSignerCertificateInvalidFormat = errors.Register(ModuleName, 441, "invalid CRLSignerCertificate certificate") ErrInvalidAuthorityKeyIDFormat = errors.Register(ModuleName, 442, "invalid AuthorityKeyID format") )
x/pki module sentinel errors.
View Source
var ( ApprovedRootCertificatesKey = []byte{0} RevokedRootCertificatesKey = []byte{0} )
Functions ¶
func NewErrCRLSignerCertDelegatorNotChainedBack ¶ added in v1.4.0
func NewErrCRLSignerCertDelegatorNotChainedBack() error
func NewErrCRLSignerCertNotChainedBackToDelegator ¶ added in v1.4.0
func NewErrCRLSignerCertNotChainedBackToDelegator() error
func NewErrCRLSignerCertificateInvalidFormat ¶ added in v1.4.0
func NewErrCRLSignerCertificatePidNotEqualRevocationPointPid ¶ added in v1.2.2
func NewErrCertNotChainedBack ¶
func NewErrCertNotChainedBack() error
func NewErrCertificateBySerialNumberDoesNotExist ¶ added in v1.4.0
func NewErrCertificateVidNotEqualMsgVid ¶
func NewErrCertificateVidNotEqualMsgVid(e interface{}) error
func NewErrEmptyDataDigest ¶
func NewErrEmptyDataDigest() error
func NewErrEmptyDataDigestType ¶
func NewErrEmptyDataDigestType() error
func NewErrInappropriateCertificateType ¶
func NewErrInappropriateCertificateType(e interface{}) error
func NewErrInvalidAddress ¶ added in v1.2.2
func NewErrInvalidAuthorityKeyIDFormat ¶ added in v1.4.0
func NewErrInvalidAuthorityKeyIDFormat() error
func NewErrInvalidCertificate ¶
func NewErrInvalidCertificate(e interface{}) error
func NewErrInvalidDataURLSchema ¶ added in v1.2.2
func NewErrInvalidDataURLSchema() error
func NewErrInvalidPidFormat ¶
func NewErrInvalidPidFormat(e interface{}) error
func NewErrInvalidVidFormat ¶
func NewErrInvalidVidFormat(e interface{}) error
func NewErrMessageExistingCertIsNotRoot ¶ added in v1.4.0
func NewErrMessageExpectedNonRoot ¶ added in v1.4.0
func NewErrMessageVidNotEqualAccountVid ¶ added in v1.2.2
func NewErrNocRootCertificateDoesNotExist ¶ added in v1.4.0
func NewErrNonEmptyDataDigest ¶
func NewErrNonEmptyDataDigest() error
func NewErrNonRootCertificateSelfSigned ¶
func NewErrNonRootCertificateSelfSigned() error
func NewErrNotEmptyDataDigestType ¶
func NewErrNotEmptyDataDigestType() error
func NewErrNotEmptyPidForNonRootCertificate ¶ added in v1.2.2
func NewErrNotEmptyPidForNonRootCertificate() error
func NewErrNotEmptyPidForRootCertificate ¶ added in v1.2.2
func NewErrNotEmptyPidForRootCertificate() error
func NewErrNotEmptyVid ¶
func NewErrNotEmptyVid(e interface{}) error
func NewErrPemValuesNotEqual ¶
func NewErrPidNotFoundInCertificateButProvidedInRevocationPoint ¶ added in v1.2.2
func NewErrPidNotFoundInCertificateButProvidedInRevocationPoint() error
func NewErrPidNotFoundInMessage ¶ added in v1.2.2
func NewErrPkiRevocationDistributionPointWithDataURLAlreadyExists ¶ added in v1.2.2
func NewErrPkiRevocationDistributionPointWithVidAndLabelAlreadyExists ¶ added in v1.2.2
func NewErrProvidedNocCertButExistingNotNoc ¶ added in v1.4.0
func NewErrProvidedNotNocCertButExistingNoc ¶ added in v1.4.0
func NewErrProvidedNotNocCertButRootIsNoc ¶ added in v1.4.0
func NewErrProvidedNotNocCertButRootIsNoc() error
func NewErrRevokeCertVidNotEqualToAccountVid ¶ added in v1.4.0
func NewErrRevokeRootCertVidNotEqualToAccountVid ¶ added in v1.4.0
func NewErrRootCertVidNotEqualToAccountVid ¶ added in v1.4.0
func NewErrRootCertVidNotEqualToCertVid ¶ added in v1.4.0
func NewErrRootCertificateDoesNotExist ¶ added in v1.2.2
func NewErrRootCertificateIsNotSelfSigned ¶
func NewErrRootCertificateIsNotSelfSigned() error
func NewErrRootOfNocCertIsNotNoc ¶ added in v1.4.0
func NewErrUnauthorizedCertIssuer ¶ added in v1.4.0
func NewErrUnauthorizedCertOwner ¶ added in v1.4.0
func NewErrUnauthorizedCertVendor ¶ added in v1.4.0
func NewErrUnauthorizedRole ¶ added in v1.2.2
func NewErrUnauthorizedRole(transactionName string, requiredRole types.AccountRole) error
func NewErrUnsupportedOperation ¶
func NewErrUnsupportedOperation(e interface{}) error
func NewErrVidNotFound ¶
func NewErrVidNotFound(e interface{}) error
func NewErrWrongIssuerSubjectKeyIDFormat ¶ added in v1.4.0
func NewErrWrongIssuerSubjectKeyIDFormat() error
func NewErrWrongSubjectKeyIDFormat ¶
func NewErrWrongSubjectKeyIDFormat() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.