errdef

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrorYubikeyNotOpen is thrown when the yubikey was not opened before use.
	ErrorYubikeyNotOpen = errwrap.ConstError("yubikey not open")
	// ErrorNoCertificateInSlot is thrown when the slot does not contain a certificate.
	ErrorNoCertificateInSlot = errwrap.ConstError("no certificate in slot")
	// ErrorIncorrectFormFactorBytes is thrown when the form factory could not be decoded (expects a byte length of 1).
	ErrorIncorrectFormFactorBytes = errwrap.ConstError("incorrect form factor bytes")
	// ErrorUnrecognizedTouchPolicy is thrown when the touch policy could not be decoded.
	ErrorUnrecognizedTouchPolicy = errwrap.ConstError("unrecognized touch policy")
	// ErrUnrecognizedPinPolicy is thrown when the pin policy could not be decoded.
	ErrUnrecognizedPinPolicy = errwrap.ConstError("unrecognized pin policy")
	// ErrUnexpectedKeyPolicyByteLen is thrown when the key policy could not be decoded (expects a byte length of 2).
	ErrUnexpectedKeyPolicyByteLen = errwrap.ConstError("unexpected key policy byte length")
	// ErrorSerialNumberNegative is thrown when the serial number is negative.
	ErrorSerialNumberNegative = errwrap.ConstError("serial number negative")
	// ErrorSerialNumberIsNotAsn1 is thrown when the serial number is not ASN.1.
	ErrorSerialNumberIsNotAsn1 = errwrap.ConstError("failed to parse serial number (not ASN.1)")
	// ErrorUnexpectedFWVersionBytes is thrown when the firmware version could not be decoded (expects a byte length of 3).
	ErrorUnexpectedFWVersionBytes = errwrap.ConstError("unexpected firmware version bytes")
	// ErrorCipherTextTooShort is thrown when the cipher text is too short (Smaller than the Nonce size).
	ErrorCipherTextTooShort = errwrap.ConstError("ciphertext too short")
	// ErrorSessionKeySizeInvalid is thrown when the session key size is not matching the expected size of the encryption algorithm (Ex: ChaCha20Poly1305: 32 byte).
	ErrorSessionKeySizeInvalid = errwrap.ConstError("session key size invalid")
	// ErrorUnknownPublicKeyAlgorithm is thrown when the public key algorithm is not supported (E.g. not RSA).
	ErrorUnknownPublicKeyAlgorithm = errwrap.ConstError("unknown public key algorithm")
	// ErrorLockedBufferIsNil is thrown when the enclave object failed to be decrypted.
	ErrorLockedBufferIsNil = errwrap.ConstError("locked buffer is nil")
	// ErrorSessionKeyIsNil is thrown when the session key is nil (This can happen, if there is not enough randomness).
	ErrorSessionKeyIsNil = errwrap.ConstError("session key is nil")
	// ErrorUnknownValidatorAlgorithm is thrown when the validator algorithm is not supported.
	ErrorUnknownValidatorAlgorithm = errwrap.ConstError("unknown validation algorithm")
	// ErrorSignatureIsEmpty is thrown when the signature is empty.
	ErrorSignatureIsEmpty = errwrap.ConstError("signature is nil")
	// ErrorPublicKeyIsNotRSA is thrown when the public key is not RSA.
	ErrorPublicKeyIsNotRSA = errwrap.ConstError("public key is not RSA")
	// ErrorDataIsEmpty is thrown when the data to decrypt/encrypt/sign is empty.
	ErrorDataIsEmpty = errwrap.ConstError("data is empty")
	// ErrorPrivateKeyIsNotASigner is thrown when the private key is not a signer (This shouldn't happen with RSA keys).
	ErrorPrivateKeyIsNotASigner = errwrap.ConstError("private key is not a signer")
	// ErrorPublicKeyIsNotASigner is thrown when the private key is not a signer (This shouldn't happen with RSA keys).
	ErrorPublicKeyIsNotASigner = errwrap.ConstError("public key is not a signer")
	// ErrorUnknownPrivateKeyAlgorithm is thrown when the private key algorithm is not supported (E.g. not RSA).
	ErrorUnknownPrivateKeyAlgorithm = errwrap.ConstError("unknown private key algorithm")
	// ErrorPEMContainedNotExactlyOneKey is thrown when the PEM file contains more than one key or none.
	ErrorPEMContainedNotExactlyOneKey = errwrap.ConstError("PEM contained not exactly one key")
	// ErrorFailedToDecodeCertificatePEM when the decoded PEM -> DER resulted in an empty byte array.
	ErrorFailedToDecodeCertificatePEM = errwrap.ConstError("failed to decode certificate PEM")
	// ErrorRestIsNotEmpty is thrown when the rest of the PEM decoding byte array is not empty.
	ErrorRestIsNotEmpty = errwrap.ConstError("rest is not zero")
	// ErrorSessionKeyEncryptionCertificateIsNil is thrown when the session key encryption certificate is nil.
	ErrorSessionKeyEncryptionCertificateIsNil = errwrap.ConstError("session key encryption certificate is nil")
	// ErrorTimeDifferenceIsGreaterThanOneHour is thrown when the time difference between the client and the server are greater than one hour.
	ErrorTimeDifferenceIsGreaterThanOneHour = errwrap.ConstError("time difference is greater than one hour")
	// ErrorReusedNonce is thrown when the nonce was already used.
	ErrorReusedNonce = errwrap.ConstError("reused nonce")
	// ErrorRSAInputMustBeHashedMessage is thrown when the RSA input is not a hashed message.
	ErrorRSAInputMustBeHashedMessage = errwrap.ConstError("RSA input must be hashed message")
	// ErrorRSAUnsupportedHashAlgorithm is thrown when the RSA hash algorithm is not supported.
	ErrorRSAUnsupportedHashAlgorithm = errwrap.ConstError("RSA unsupported hash algorithm")
	// RSAInternalError is thrown when the RSA internal error.
	RSAInternalError = errwrap.ConstError("RSA internal error")
	// ErrorSessionKeyNotFound is thrown when the session key was not found using the specified certificate.
	ErrorSessionKeyNotFound = errwrap.ConstError("session key not found")
	// ErrorUnknownOutformat is thrown when the outformat is not supported.
	ErrorUnknownOutformat = errwrap.ConstError("unknown outformat")
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL