# How to create an self-signed Certificate with Openssl?

## Step-by-step

Open a terminal window on your system and follow these steps:

1.- Create a new private key

```shell
sudo openssl genrsa -aes256 -out private.key
```

2.- Generate a certificate

```shell
sudo openssl req -x509 -days 1000 -new -key private.key -out iam-sync-tenantidp3.soffidnet.pem
```

3.- Export to PKCS12

```shell
sudo openssl pkcs12 -export -in iam-sync-tenantidp3.soffidnet.pem -inkey private.key -out iam-sync-tenantidp3.soffidnet.pfx
```

[![image-1679586862338.png](https://bookstack.soffid.com/uploads/images/gallery/2023-03/scaled-1680-/image-1679586862338.png)](https://bookstack.soffid.com/uploads/images/gallery/2023-03/image-1679586862338.png)