#[repr(u16)]pub enum BaseError {
Show 53 variants
GeneralFailure = 1,
NotImplemented = 2,
BadContext = 3,
AbiMismatch = 4,
BadReference = 5,
InsufficientBuffer = 6,
BadSequence = 7,
NoConnection = 8,
TryAgain = 9,
IoError = 10,
BadValue = 11,
NotPermitted = 12,
InvalidSessions = 13,
NoDecryptParam = 14,
NoEncryptParam = 15,
BadSize = 16,
MalformedResponse = 17,
InsufficientContext = 18,
InsufficientResponse = 19,
IncompatibleTcti = 20,
NotSupported = 21,
BadTctiStructure = 22,
Memory = 23,
BadTr = 24,
MultipleDecryptSessions = 25,
MultipleEncryptSessions = 26,
RspAuthFailed = 27,
NoConfig = 28,
BadPath = 29,
NotDeletable = 30,
PathAlreadyExists = 31,
KeyNotFound = 32,
SignatureVerificationFailed = 33,
HashMismatch = 34,
KeyNotDuplicable = 35,
PathNotFound = 36,
NoCert = 37,
NoPcr = 38,
PcrNotResettable = 39,
BadTemplate = 40,
AuthorizationFailed = 41,
AuthorizationUnknown = 42,
NvNotReadable = 43,
NvTooSmall = 44,
NvNotWriteable = 45,
PolicyUnknown = 46,
NvWrongType = 47,
NameAlreadyExists = 48,
NoTpm = 49,
BadKey = 50,
NoHandle = 51,
NotProvisioned = 52,
AlreadyProvisioned = 53,
}Expand description
Enum representing the base error values for the TSS return code.
§Details
These values are only returned by non TPM layers of the software stack. For some layers only a subset of these are used.
Note: In order to create a complete TSS return value for non TPM layers. This error code needs to be combined with the information about the layer that produced it.
TCG TSS 2.0 Overview and Common Structures Specification:
“For return values other than SUCCESS, the second most significant byte of the return value is a layer code indicating the software layer that generated the error.”
“Base return codes. These base codes indicate the error that occurred. They are logical-ORed with a layer code to produce the TSS2 return value.”
Variants§
GeneralFailure = 1
Catch all for all errors not otherwise specified.
NotImplemented = 2
If called functionality isn’t implemented.
BadContext = 3
A context structure is bad.
AbiMismatch = 4
Passed in ABI version doesn’t match called module’s ABI version.
BadReference = 5
A pointer is NULL that isn’t allowed to be NULL.
InsufficientBuffer = 6
A buffer isn’t large enough.
BadSequence = 7
Function called in the wrong order.
NoConnection = 8
Fails to connect to next lower layer.
TryAgain = 9
Operation timed out; function must be called again to be completed.
IoError = 10
IO failure.
BadValue = 11
A parameter has a bad value.
NotPermitted = 12
Operation not permitted.
InvalidSessions = 13
The TPM command doesn’t use the number of sessions provided by the caller.
NoDecryptParam = 14
A session with decrypt set in its SessionAttributes
(TPMA_SESSION_DECRYPT bit set) was passed to a TPM command that doesn’t support encryption
of the first command parameter.
NoEncryptParam = 15
A session with encrypt set in its SessionAttributes
(TPMA_SESSION_ENCRYPT bit set) was passed to a TPM command that doesn’t support encryption
of the first response parameter.
BadSize = 16
If size of a parameter is incorrect.
MalformedResponse = 17
Response is malformed.
InsufficientContext = 18
Context not large enough.
InsufficientResponse = 19
Response is not long enough.
IncompatibleTcti = 20
Unknown or unusable TCTI version.
NotSupported = 21
Functionality not supported.
BadTctiStructure = 22
TCTI context is bad.
Memory = 23
Memory allocation failed.
BadTr = 24
Invalid ObjectHandle (ESYS_TR handle).
MultipleDecryptSessions = 25
More than one session with decrypt set in its SessionAttributes
(TPMA_SESSION_DECRYPT bit set).
MultipleEncryptSessions = 26
More than one session with encrypt set its SessionAttributes (TPMA_SESSION_ENCRYPT bit set).
RspAuthFailed = 27
Authorizing the TPM response failed.
NoConfig = 28
No config is available.
BadPath = 29
The provided path is bad.
NotDeletable = 30
The object is not deletable.
PathAlreadyExists = 31
The provided path already exists.
KeyNotFound = 32
The key was not found.
SignatureVerificationFailed = 33
Signature verification failed.
HashMismatch = 34
Hash mismatch.
KeyNotDuplicable = 35
Key is not duplicatable.
PathNotFound = 36
The path was not found.
NoCert = 37
No certificate.
NoPcr = 38
No PCR.
PcrNotResettable = 39
PCR not resettable.
BadTemplate = 40
The template is bad.
AuthorizationFailed = 41
Authorization failed.
AuthorizationUnknown = 42
Authorization is unknown.
NvNotReadable = 43
NV is not readable.
NvTooSmall = 44
NV is too small.
NvNotWriteable = 45
NV is not writable.
PolicyUnknown = 46
The policy is unknown.
NvWrongType = 47
The NV type is wrong.
NameAlreadyExists = 48
The name already exists.
NoTpm = 49
No TPM available.
BadKey = 50
The key is bad.
NoHandle = 51
No handle provided.
NotProvisioned = 52
Provisioning was not executed.
AlreadyProvisioned = 53
Already provisioned.
Trait Implementations§
Source§impl From<BaseError> for BaseReturnCode
impl From<BaseError> for BaseReturnCode
Source§impl From<BaseReturnCode> for BaseError
impl From<BaseReturnCode> for BaseError
Source§fn from(base_response_code: BaseReturnCode) -> Self
fn from(base_response_code: BaseReturnCode) -> Self
Source§impl From<EsapiReturnCode> for BaseError
impl From<EsapiReturnCode> for BaseError
Source§fn from(esapi_return_code: EsapiReturnCode) -> Self
fn from(esapi_return_code: EsapiReturnCode) -> Self
Source§impl From<FapiReturnCode> for BaseError
impl From<FapiReturnCode> for BaseError
Source§fn from(fapi_return_code: FapiReturnCode) -> Self
fn from(fapi_return_code: FapiReturnCode) -> Self
Source§impl From<MuapiReturnCode> for BaseError
impl From<MuapiReturnCode> for BaseError
Source§fn from(muapi_return_code: MuapiReturnCode) -> Self
fn from(muapi_return_code: MuapiReturnCode) -> Self
Source§impl From<SapiReturnCode> for BaseError
impl From<SapiReturnCode> for BaseError
Source§fn from(sapi_return_code: SapiReturnCode) -> Self
fn from(sapi_return_code: SapiReturnCode) -> Self
Source§impl From<TctiReturnCode> for BaseError
impl From<TctiReturnCode> for BaseError
Source§fn from(tcti_return_code: TctiReturnCode) -> Self
fn from(tcti_return_code: TctiReturnCode) -> Self
Source§impl FromPrimitive for BaseError
impl FromPrimitive for BaseError
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl ToPrimitive for BaseError
impl ToPrimitive for BaseError
Source§fn to_i64(&self) -> Option<i64>
fn to_i64(&self) -> Option<i64>
self to an i64. If the value cannot be
represented by an i64, then None is returned.Source§fn to_u64(&self) -> Option<u64>
fn to_u64(&self) -> Option<u64>
self to a u64. If the value cannot be
represented by a u64, then None is returned.Source§fn to_isize(&self) -> Option<isize>
fn to_isize(&self) -> Option<isize>
self to an isize. If the value cannot be
represented by an isize, then None is returned.Source§fn to_i8(&self) -> Option<i8>
fn to_i8(&self) -> Option<i8>
self to an i8. If the value cannot be
represented by an i8, then None is returned.Source§fn to_i16(&self) -> Option<i16>
fn to_i16(&self) -> Option<i16>
self to an i16. If the value cannot be
represented by an i16, then None is returned.Source§fn to_i32(&self) -> Option<i32>
fn to_i32(&self) -> Option<i32>
self to an i32. If the value cannot be
represented by an i32, then None is returned.Source§fn to_i128(&self) -> Option<i128>
fn to_i128(&self) -> Option<i128>
self to an i128. If the value cannot be
represented by an i128 (i64 under the default implementation), then
None is returned. Read moreSource§fn to_usize(&self) -> Option<usize>
fn to_usize(&self) -> Option<usize>
self to a usize. If the value cannot be
represented by a usize, then None is returned.Source§fn to_u8(&self) -> Option<u8>
fn to_u8(&self) -> Option<u8>
self to a u8. If the value cannot be
represented by a u8, then None is returned.Source§fn to_u16(&self) -> Option<u16>
fn to_u16(&self) -> Option<u16>
self to a u16. If the value cannot be
represented by a u16, then None is returned.Source§fn to_u32(&self) -> Option<u32>
fn to_u32(&self) -> Option<u32>
self to a u32. If the value cannot be
represented by a u32, then None is returned.Source§fn to_u128(&self) -> Option<u128>
fn to_u128(&self) -> Option<u128>
self to a u128. If the value cannot be
represented by a u128 (u64 under the default implementation), then
None is returned. Read more