---
name: "Tspi_Key_CertifyKey"
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_Key_CertifyKey"
---

# Tspi\_Key\_CertifyKey(3)

sign a public key.

## NAME

Tspi\_Key\_CertifyKey - sign a public key.

## 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\_Key\_CertifyKey(TSS\_HKEY**        *hKey***, TSS\_HKEY** *hCertifyingKey***,**                                **TSS\_VALIDATION\*** *pValidationData***);**

## DESCRIPTION

**Tspi\_Key\_CertifyKey** signs a public key.

## PARAMETERS

### hKey

Handle of the key object to be loaded.

### hCertifyingKey

Handle to the certifying key used to sign the addressed by hKey.

### pValidationData

Pointer to a structure of the type TSS\_VALIDATION. After successful completion of the call the member rgbValidationData of this structure contains the signature data of the command. The member prgbData of the structure points to a buffer containing a TCPA\_CERTIFY\_INFO data stream as specified within the TCPA 1.1b Main Specification.

## RETURN CODES

**Tspi\_Key\_CertifyKey** returns TSS\_SUCCESS on success, otherwise one of the following values are returned: TSS\_E\_INVALID\_HANDLE - Either *hKey* or *hCertifyingKey* are invalid handles. TSS\_E\_BAD\_PARAMETER TSS\_E\_INTERNAL\_ERROR - An error occurred internal to the TSS.

## CONFORMING TO

**Tspi\_Key\_CertifyKey** conforms to the Trusted Computing Group Software Specification version 1.1 Golden

## SEE ALSO

[**Tspi\_Key\_CreateKey**(3)](/Tspi_Key_CreateKey/3.md), [**Tspi\_Key\_WrapKey**(3)](/Tspi_Key_WrapKey/3.md).
