Documentation ¶
Overview ¶
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright 2023 Meta Platforms, Inc. and affiliates.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- Constants
- type CurrentKMID
- type ErrAlg
- type ErrAlignFirmwares
- type ErrCompilePCR0DATAMeasurement
- type ErrCurrentFirmware
- type ErrDump
- type ErrEventLog
- type ErrExpectedFirmware
- type ErrExpectedPCR0
- type ErrFetchTXTConfigSpace
- type ErrGetPCR0Measurements
- type ErrHostBootedUp
- type ErrHostFailedBootUp
- type ErrIncorrectEventLog
- type ErrKMIDMismatch
- type ErrLocalDMITable
- type ErrOrigFirmware
- type ErrOriginalPCR0
- type ErrPCR0Mismatch
- type ErrParseDMITable
- type ErrParseFirmware
- type ErrParsePCR0DATALog
- type ErrReadMSRRegisters
- type ErrReadTXTRegisters
- type ErrReconstructDigestMismatch
- type ErrReplayEventLog
- type ErrSELNotFound
- type ErrSetup
- type ErrStatusRegisters
- type ErrTPM
- type ErrUnexepectedSELFound
- type ErrValidator
- type ErrWrongPCR0DATALog
- type ExpectHostBootedUp
- type ExpectSEL
- type ExpectedFirmware
- type ExpectedPCR0
- type Firmware
- type FirmwareIntelStructs
- type PCR0DATALog
- type ReplayEventLog
- type TestCaseSetup
- type ValidationInfo
- type Validator
- type Validators
Constants ¶
const (
// EventLogPath is the path used to extract TPM EventLog.
EventLogPath = `/sys/kernel/security/tpm0/binary_bios_measurements`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurrentKMID ¶
type CurrentKMID struct{}
CurrentKMID validates if KMID of ACM_POLICY_STATUS matched the KMID of Key Manifest.
func (CurrentKMID) Validate ¶
func (CurrentKMID) Validate( ctx context.Context, info *ValidationInfo, ) error
Validate implements Validator.
type ErrAlignFirmwares ¶
type ErrAlignFirmwares struct {
Err error
}
ErrAlignFirmwares means it was unable to align firmware images to each other to use the same PCR measurements offsets.
func (ErrAlignFirmwares) Error ¶
func (err ErrAlignFirmwares) Error() string
Error implements error.
func (ErrAlignFirmwares) Unwrap ¶
func (err ErrAlignFirmwares) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrCompilePCR0DATAMeasurement ¶
type ErrCompilePCR0DATAMeasurement struct { PCR0Data *xtpmeventlog.PCR0DATALog HashAlgo tpm2.Algorithm Err error }
ErrCompilePCR0DATAMeasurement is an error. See the description in method Error.
func (ErrCompilePCR0DATAMeasurement) Error ¶
func (err ErrCompilePCR0DATAMeasurement) Error() string
Error implements error.
func (ErrCompilePCR0DATAMeasurement) Unwrap ¶
func (err ErrCompilePCR0DATAMeasurement) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrCurrentFirmware ¶
type ErrCurrentFirmware struct {
Err error
}
ErrCurrentFirmware is an error. See the description in method Error.
func (ErrCurrentFirmware) Error ¶
func (err ErrCurrentFirmware) Error() string
Error implements error.
func (ErrCurrentFirmware) Unwrap ¶
func (err ErrCurrentFirmware) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrDump ¶
type ErrDump struct {
Err error
}
ErrDump is an error. See the description in method Error.
func (ErrDump) Description ¶
Description explains how to interpret the error in details.
type ErrEventLog ¶
ErrEventLog is an error. See the description in method Error.
func (ErrEventLog) Unwrap ¶
func (err ErrEventLog) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrExpectedFirmware ¶
type ErrExpectedFirmware struct {
Err error
}
ErrExpectedFirmware is an error. See the description in method Error.
func (ErrExpectedFirmware) Error ¶
func (err ErrExpectedFirmware) Error() string
Error implements error.
func (ErrExpectedFirmware) Unwrap ¶
func (err ErrExpectedFirmware) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrExpectedPCR0 ¶
type ErrExpectedPCR0 struct { ErrPCR0Mismatch ExpectedMeasurementsLog string }
ErrExpectedPCR0 is an error. See the description in method Error.
func (ErrExpectedPCR0) Description ¶
func (err ErrExpectedPCR0) Description() string
Description implements Descriptioner.
func (ErrExpectedPCR0) Unwrap ¶
func (err ErrExpectedPCR0) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrFetchTXTConfigSpace ¶
type ErrFetchTXTConfigSpace struct {
Err error
}
ErrFetchTXTConfigSpace is an error. See the description in method Error.
func (ErrFetchTXTConfigSpace) Error ¶
func (err ErrFetchTXTConfigSpace) Error() string
Error implements error.
func (ErrFetchTXTConfigSpace) Unwrap ¶
func (err ErrFetchTXTConfigSpace) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrGetPCR0Measurements ¶
type ErrGetPCR0Measurements struct {
Err error
}
ErrGetPCR0Measurements is an error. See the description in method Error.
func (ErrGetPCR0Measurements) Error ¶
func (err ErrGetPCR0Measurements) Error() string
Error implements error.
func (ErrGetPCR0Measurements) Unwrap ¶
func (err ErrGetPCR0Measurements) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrHostBootedUp ¶
type ErrHostBootedUp struct { }
ErrHostBootedUp means that the host booted up, but it wasn't expected to do so.
func (ErrHostBootedUp) Error ¶
func (err ErrHostBootedUp) Error() string
type ErrHostFailedBootUp ¶
type ErrHostFailedBootUp struct { }
ErrHostFailedBootUp means that the host failed to boot up
func (ErrHostFailedBootUp) Error ¶
func (err ErrHostFailedBootUp) Error() string
type ErrIncorrectEventLog ¶
type ErrIncorrectEventLog struct {
Err error
}
ErrIncorrectEventLog is an error. See the description in method Error.
func (ErrIncorrectEventLog) Error ¶
func (err ErrIncorrectEventLog) Error() string
Error implements error.
func (ErrIncorrectEventLog) Unwrap ¶
func (err ErrIncorrectEventLog) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrKMIDMismatch ¶
ErrKMIDMismatch means KMID from ACM_POLICY_STATUS does not match the KMID from the Key Manifest.
type ErrLocalDMITable ¶
type ErrLocalDMITable struct {
Err error
}
ErrLocalDMITable is an error. See the description in method Error.
func (ErrLocalDMITable) Error ¶
func (err ErrLocalDMITable) Error() string
func (ErrLocalDMITable) Unwrap ¶
func (err ErrLocalDMITable) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrOrigFirmware ¶
type ErrOrigFirmware struct {
Err error
}
ErrOrigFirmware is an error. See the description in method Error.
func (ErrOrigFirmware) Unwrap ¶
func (err ErrOrigFirmware) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrOriginalPCR0 ¶
type ErrOriginalPCR0 struct { PCR0Data *xtpmeventlog.PCR0DATALog HashAlgo tpm2.Algorithm Expected []byte Actual []byte }
ErrOriginalPCR0 is an error. See the description in method Error.
type ErrPCR0Mismatch ¶
ErrPCR0Mismatch is an error. See the description in method Error.
func (ErrPCR0Mismatch) Error ¶
func (err ErrPCR0Mismatch) Error() string
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrParseDMITable ¶
type ErrParseDMITable struct {
Err error
}
ErrParseDMITable is an error. See the description in method Error.
func (ErrParseDMITable) Unwrap ¶
func (err ErrParseDMITable) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrParseFirmware ¶
type ErrParseFirmware struct {
Err error
}
ErrParseFirmware is an error. See the description in method Error.
func (ErrParseFirmware) Unwrap ¶
func (err ErrParseFirmware) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrParsePCR0DATALog ¶
type ErrParsePCR0DATALog struct {
Err error
}
ErrParsePCR0DATALog means the PCR0_DATA description in the EventLog is not parsable, by xtpmeventlog package.
func (ErrParsePCR0DATALog) Error ¶
func (err ErrParsePCR0DATALog) Error() string
Error implements error.
func (ErrParsePCR0DATALog) Unwrap ¶
func (err ErrParsePCR0DATALog) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrReadMSRRegisters ¶
type ErrReadMSRRegisters struct {
Err error
}
ErrReadMSRRegisters is an error. See the description in method Error.
func (ErrReadMSRRegisters) Error ¶
func (err ErrReadMSRRegisters) Error() string
Error implements error.
func (ErrReadMSRRegisters) Unwrap ¶
func (err ErrReadMSRRegisters) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrReadTXTRegisters ¶
type ErrReadTXTRegisters struct {
Err error
}
ErrReadTXTRegisters is an error. See the description in method Error.
func (ErrReadTXTRegisters) Error ¶
func (err ErrReadTXTRegisters) Error() string
Error implements error.
func (ErrReadTXTRegisters) Unwrap ¶
func (err ErrReadTXTRegisters) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrReconstructDigestMismatch ¶
type ErrReconstructDigestMismatch struct { PCR0Data *xtpmeventlog.PCR0DATALog HashAlgo tpm2.Algorithm Expected []byte Actual []byte }
ErrReconstructDigestMismatch is an error. See the description in method Error.
func (ErrReconstructDigestMismatch) Error ¶
func (err ErrReconstructDigestMismatch) Error() string
Error implements error.
type ErrReplayEventLog ¶
type ErrReplayEventLog struct { Err error Algo tpm2.Algorithm ReplayLog string MeasurementsLog string }
ErrReplayEventLog is an error. See the description in method Error.
func (ErrReplayEventLog) Description ¶
func (err ErrReplayEventLog) Description() string
Description implements Descriptioner.
func (ErrReplayEventLog) Error ¶
func (err ErrReplayEventLog) Error() string
Error implements error.
func (ErrReplayEventLog) Unwrap ¶
func (err ErrReplayEventLog) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrSELNotFound ¶
type ErrSELNotFound struct {
// contains filtered or unexported fields
}
ErrSELNotFound means that no matching SEL event was found
func (ErrSELNotFound) Error ¶
func (err ErrSELNotFound) Error() string
type ErrSetup ¶
type ErrSetup struct {
Err error
}
ErrSetup is an error. See the description in method Error.
type ErrStatusRegisters ¶
type ErrStatusRegisters struct {
Err error
}
ErrStatusRegisters is an error. See the description in method Error.
func (ErrStatusRegisters) Error ¶
func (err ErrStatusRegisters) Error() string
Error implements error.
func (ErrStatusRegisters) Unwrap ¶
func (err ErrStatusRegisters) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrTPM ¶
type ErrTPM struct {
Err error
}
ErrTPM is an error. See the description in method Error.
type ErrUnexepectedSELFound ¶
type ErrUnexepectedSELFound struct {
// contains filtered or unexported fields
}
ErrUnexepectedSELFound means that a SEL event was found that should not be generated
func (ErrUnexepectedSELFound) Error ¶
func (err ErrUnexepectedSELFound) Error() string
type ErrValidator ¶
ErrValidator is an error. See the description in method Error.
func (ErrValidator) Unwrap ¶
func (err ErrValidator) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ErrWrongPCR0DATALog ¶
type ErrWrongPCR0DATALog struct { Algo tpm2.Algorithm Logged *xtpmeventlog.PCR0DATALog Err error }
ErrWrongPCR0DATALog is an error. See the description in method Error.
func (ErrWrongPCR0DATALog) Description ¶
func (err ErrWrongPCR0DATALog) Description() string
Description implements Descriptioner.
func (ErrWrongPCR0DATALog) Error ¶
func (err ErrWrongPCR0DATALog) Error() string
Error implements error.
func (ErrWrongPCR0DATALog) Unwrap ¶
func (err ErrWrongPCR0DATALog) Unwrap() error
Unwrap is a standard method used by package "errors" to handle nested errors.
type ExpectHostBootedUp ¶
type ExpectHostBootedUp struct {
// contains filtered or unexported fields
}
ExpectHostBootedUp validates that the host is booted or not
func NewExpectHostBootedUp ¶
func NewExpectHostBootedUp(expectedToBoot bool) ExpectHostBootedUp
NewExpectHostBootedUp creates a new HostBootedValidator validator
func (ExpectHostBootedUp) Validate ¶
func (hb ExpectHostBootedUp) Validate( ctx context.Context, info *ValidationInfo, ) error
Validate implements Validator.
type ExpectSEL ¶
type ExpectSEL struct {
// contains filtered or unexported fields
}
ExpectSEL validates that SEL events contain the expected one
func MustExpectSEL ¶
MustExpectSEL creates a new ExpectSEL validator and panics if an error occures
func NewExpectSEL ¶
NewExpectSEL creates new matcher for a SEL event @positive is an optional SEL event should be found among all SELs @negative is an optional SEL event that should not be found before the positive SEL is found. If positive SEL is not specified, negative should not match any SEL event
type ExpectedFirmware ¶
type ExpectedFirmware struct{}
ExpectedFirmware checks if current firmware is the one we expect in this test case.
func (ExpectedFirmware) Validate ¶
func (ExpectedFirmware) Validate( ctx context.Context, info *ValidationInfo, ) error
Validate implements Validator.
type ExpectedPCR0 ¶
type ExpectedPCR0 struct{}
ExpectedPCR0 checks if current PCR0 value is the same as we expect for the current firmware image.
func (ExpectedPCR0) Validate ¶
func (ExpectedPCR0) Validate( ctx context.Context, info *ValidationInfo, ) error
Validate implements Validator.
type Firmware ¶
type Firmware struct { UEFI *uefi.UEFI DMITable *dmidecode.DMITable Intel *FirmwareIntelStructs }
Firmware contains all information about a firmware image commonly needed in validators.
type FirmwareIntelStructs ¶
type FirmwareIntelStructs struct { FIT fit.Table BPM *cbntbootpolicy.Manifest KM *cbntkey.Manifest }
FirmwareIntelStructs contains structures of a firmware image related to Intel CPUs.
type PCR0DATALog ¶
type PCR0DATALog struct{}
PCR0DATALog checks if TPM EventLog contains expected granular log for PCR0_DATA (CBnT).
func (PCR0DATALog) Validate ¶
func (PCR0DATALog) Validate( ctx context.Context, info *ValidationInfo, ) error
Validate implements Validator.
type ReplayEventLog ¶
type ReplayEventLog struct{}
ReplayEventLog checks if current PCR0 values could be reproduces by replaying the EventLog.
func (ReplayEventLog) Validate ¶
func (ReplayEventLog) Validate( ctx context.Context, info *ValidationInfo, ) error
Validate implements Validator.
type TestCaseSetup ¶
TestCaseSetup represents the Setup method of a testcase
type ValidationInfo ¶
type ValidationInfo struct { HostBooted bool SELs []types.SEL FirmwareCurrent Firmware FirmwareExpected Firmware FirmwareOriginal Firmware FirmwareAlignToCurrentOffset uint64 ExpectedBootResult *bootengine.BootProcess ExpectedTPMState *tpm.TPM StatusRegisters registers.Registers EventLog *tpmeventlog.TPMEventLog PCR0Current map[tpm2.Algorithm][]byte }
ValidationInfo is the prerequisites for any validation work.
func GetValidationInfo ¶
func GetValidationInfo( ctx context.Context, t TestCaseSetup, origImage []byte, opts types.Options, ) (*ValidationInfo, error)
GetValidationInfo extracts ValidationInfo from the local machine.
type Validator ¶
type Validator interface { // Validate returns nil if the feature works properly, and non-nil if // there is an problem. Validate(ctx context.Context, info *ValidationInfo) error }
Validator is a validation handler of a single feature.
type Validators ¶
type Validators []Validator
Validators is a set of Validator-s.
func CommonHostBootUpExpected ¶
func CommonHostBootUpExpected() Validators
CommonHostBootUpExpected is a set of Validator-s which are expected to be executed for any test case that expects the host to boot up
func CommonHostBootUpNotExpected ¶
func CommonHostBootUpNotExpected(extraValidators ...Validator) Validators
CommonHostBootUpNotExpected is a set of Validator-s which are expected to be executed for any test case that doesn't expect the host to boot up
func (Validators) Validate ¶
func (s Validators) Validate(ctx context.Context, info *ValidationInfo) error
Validate just calls Validate methods of each Validator until first error received. If no error received, then nil is returned.