---
name: "Tspi_TPM_OwnerGetSRKPubKey"
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_OwnerGetSRKPubKey"
---

# Tspi\_TPM\_OwnerGetSRKPubKey(3)

get public key of the SRK

TCG Software Stack Developer's Reference

## NAME

Tspi\_TPM\_OwnerGetSRKPubKey - get public key of the SRK

## SYNOPSIS

```

#include <tss/tspi.h>
TSS_RESULT Tspi_TPM_OwnerGetSRKPubKey(TSS_HTPM hTPM,
                                      UINT32*  pulPubKeyLength,
                                      BYTE**   prgbPubKey);
```

## DESCRIPTION

**Tspi\_TPM\_OwnerGetSRKPubKey** returns the public key of the key object using owner authorization. This can only be used on 1.2 TPMs, and only to return the public key of the SRK.

## PARAMETERS

### hTPM

The *hTPM* parameter is used to specify the handle of the TPM object.

### pulPubKeyLength

The *pulPubKeyLength* parameter is the length (in bytes) of the prgbPubKey parameter.

### prgbPubKey

The *prgbPubKey* parameter is the pointer to the memory block containing the public key blob retrieved for the key object referenced by hKey.

## RETURN CODES

**Tspi\_TPM\_OwnerGetSRKPubKey** returns TSS\_SUCCESS on success, otherwise one of the following values is returned:

- TSS\_E\_INVALID\_HANDLE

  *hTPM* is not a valid handle.

- TSS\_E\_BAD\_PARAMETER

  One or more parameters is bad.

- TSS\_E\_INTERNAL\_ERROR

  An internal SW error has been detected.

- TSS\_E\_TPM\_UNSUPPORTED

  The TPM is not version 1.2 or later - (Note: still unimplemented)

## CONFORMING TO

**Tspi\_TPM\_OwnerGetSRKPubKey** conforms to the Trusted Computing Group Software Specification version 1.2

## SEE ALSO

[**Tspi\_Context\_FreeMemory**(3)](/Tspi_Context_FreeMemory/3.md), [**Tspi\_Key\_GetPubKey**(3)](/Tspi_Key_GetPubKey/3.md).
