# getCertificateAttrs

## Content

# Function: getCertificateAttrs()

```ts
function getCertificateAttrs(certificatePem): X509CertificateAttrs;
```

Extracts basic attributes from an X.509 certificate in PEM format.

## Parameters

### certificatePem

`string`

The X.509 certificate encoded in PEM format.

## Returns

[`X509CertificateAttrs`](../type-aliases/X509CertificateAttrs)

A [X509CertificateAttrs](../type-aliases/X509CertificateAttrs) object containing the parsed certificate attributes.

## Throws

Will throw an error if the certificate cannot be parsed.
