---
name: "Tspi_TPM_LoadMaintenancePubKey"
section: "3"
platform: "linux"
package: "libtspi-dev"
version: "0.3.15-0.4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Tspi_TPM_LoadMaintenancePubKey"
---

# Tspi\_TPM\_LoadMaintenancePubKey(3)

TCG Software Stack Developer's Reference

## NAME

Tspi\_TPM\_LoadMaintenancePubKey- load the public maintenance key into the TPM

## SYNOPSIS

**#include \<tss/platform.h\>** **#include \<tss/tcpa\_defines.h\>** **#include \<tss/tcpa\_typedef.h\>** **#include \<tss/tcpa\_struct.h\>** **#include \<tss/tss\_typedef.h\>** **#include \<tss/tss\_structs.h\>** **#include \<tss/tspi.h\>** **TSS\_RESULT Tspi\_TPM\_LoadMaintenancePubKey(TSS\_HTPM**        *hTPM***, TSS\_HKEY** *hMaintenanceKey***,**                                           **TSS\_VALIDATION\*** *pValidationData***);**

## DESCRIPTION

**Tspi\_TPM\_LoadMaintenancePubKey** loads the public maintenance key into the TPM. The maintenance key can only be loaded once; any subsequent calls to this function will fail. The key information for loading the maintenance public key must be set in the key object by Tspi\_SetAttribData before this method is called. If *pValidationData* is NULL, the TSS service provider proofs the digest got internally from the TPM. Otherwise, the caller has to proof the digest by its own.

## PARAMETERS

### hTPM

Handle of the TPM object

### hMaintenanceKey

Handle of the maintenance key object

### pValidationData

Validation data structure. \[IN\] Provide externalData information required to compute the signature. \[OUT\] On successful completion of the ocmmand, the structure provides a buffer containing the validation data and a buffer containing the data the validation data was computed from.

## RETURN CODES

**Tspi\_TPM\_LoadMaintenancePubKey** returns TSS\_SUCCESS on success, otherwise one of the following values are returned: TSS\_E\_INVALID\_HANDLE *hTPM* or *hMaintenanceKey* is not a valid handle. TSS\_E\_INTERNAL\_ERROR An internal SW error has been detected. TSS\_E\_BAD\_PARAMETER One or more of the parameters is incorrect. TSS\_E\_NOTIMPL The command is not implemented.

## CONFORMING TO

**Tspi\_TPM\_LoadMaintenancePubKey** conforms to the Trusted Computing Group Software Specification version 1.1 Golden

## SEE ALSO

[**Tspi\_TPM\_CheckMaintenancePubKey**(3)](/Tspi_TPM_CheckMaintenancePubKey/3.md), [**Tspi\_TPM\_KillMaintenanceFeature**(3)](/Tspi_TPM_KillMaintenanceFeature/3.md), [**Tspi\_TPM\_CreateMaintenanceArchive**(3)](/Tspi_TPM_CreateMaintenanceArchive/3.md).
