# Setting Up OCSP

The Manage OCSP Certificate feature in emCA allows users to configure the created OCSP certificate at the specified URL. This is useful for deploying the OCSP certificate to a public-facing web server or other device where it can be accessed by clients.

## Create OCSP Certificate Profile

As step 1, Officer needs to use the OCSP profile created by CA Administrator. CA Administrator OCSP Profile creation steps are covered under [Configuring Certificate Profiles - OCSP Certificate Profile](https://emca.emudhra.com/getting-started/configuring-certificate-profiles#ocsp-certificate-profile).

## Generate Key Pair

As step 2, Officer need to Generate a new Key Pair

Click on "Generate Key Pair " to open the following dialog:

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FRFIm1Wkto5v30qqAV5Ov%2Fimage.png?alt=media&#x26;token=cff2dfc4-17d2-4308-869c-a79dd0f6799e" alt=""><figcaption></figcaption></figure>

Enter the number of keys that you want to generate. In general, you will need 1 key for 1 CA and 1 more key, if that CA will receive an OCSP certificate.

Select the "Key Profile" you want to use from the first dropdown list.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2Fd8qUwN5iCiZK5Mws5x3X%2Fimage.png?alt=media&#x26;token=94da3767-7ef7-4d85-b220-a7c0bd6e168e" alt=""><figcaption></figcaption></figure>

Choose the "Algorithm" from the drop-down

Select the "Signature algorithm". This will filter the element for the third dropdown list accordingly.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FGZvy9I6okw6ej0BzxJRG%2Fimage.png?alt=media&#x26;token=6a50a0a8-ccd1-428c-bbad-e807c180e359" alt=""><figcaption></figcaption></figure>

Select the "Key Algorithm" and "Key Size"

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FAzDY4En5UBxXsqGMkRTN%2Fimage.png?alt=media&#x26;token=9fad6836-0132-4877-b89e-f9244ae50fb7" alt=""><figcaption></figcaption></figure>

Press "Proceed" to continue and authenticate the action via Username & Password or Hard/ Soft token basis.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FhMMczkTagP2gG3XZAFeD%2Fimage.png?alt=media&#x26;token=36a9fcb5-bffd-40a1-8527-e8eeb77d8c6c" alt=""><figcaption></figcaption></figure>

Click on "Generate Key Pair(s)" to generate the keys

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2Fe81o9GsTOSpljcXprY2Z%2Fimage.png?alt=media&#x26;token=0bffdb7f-6937-4a77-b8ee-24743a613949" alt=""><figcaption></figcaption></figure>

After the successful generation of the key pair, click on "View all" or "+ New" to continue with the new Key Pair creation.

## Generate CA Certificate

After creating a key pair, select the "Generate Certificate" option available in the "Action" column of the created key pair.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FHXepe9V2zl0ZLIwhS7SB%2Fimage.png?alt=media&#x26;token=be43a5bb-7a65-46ff-ab7e-4409e1e4ab75" alt=""><figcaption></figcaption></figure>

Click on  !\[A black flag on a white background

AI-generated content may be incorrect.]\(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAkACQAAD/2wBDAAoHBwkHBgoJCAkLCwoMDxkQDw4ODx4WFxIZJCAmJSMgIyIoLTkwKCo2KyIjMkQyNjs9QEBAJjBGS0U+Sjk/QD3/2wBDAQsLCw8NDx0QEB09KSMpPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT3/wAARCAA0ADgDASIAAhEBAxEB/8QAHwAAAQUBAQEBA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eiigAooooAKKKKAILv/j3aiiigD//2Q==) to start generating a CA certificate.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FPLTQaKA8lzzqw07K1NWK%2Fimage.png?alt=media&#x26;token=68516875-6cbc-469a-93b7-56bb448aa963" alt=""><figcaption></figcaption></figure>

The above window opens after clicking on “Action”.

There are two different options available for generation:

* Certificate – use the key to generate a new CA certificate directly.
* CSR – use the key to generate a Certificate Signing Request (CSR).

Choose "Certificate" if you want to directly generate a new CA certificate. This option is applicable if the CA is "self-signed" or the "issuing CA" is in the same instance

Choose "CSR" if the issuing CA is not on the same instance. This is the case if ROOT and SUB CAs are not operated on the same system.

{% hint style="info" %}
Note: You can operate CAs using the appliance functionalities that have their trust anchored outside the Appliance using the option CSR.
{% endhint %}

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FQRMHK9ifbx8spzJVTCN2%2Fimage.png?alt=media&#x26;token=04de7980-b02a-4963-bda7-3a53c629802e" alt=""><figcaption></figcaption></figure>

CA Administrator created certificate profiles will be available under “Certificate profile” dropdown.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FiRqf7Rrenyh2RuFuaBDS%2Fimage.png?alt=media&#x26;token=71c2ac97-6c89-45ec-a7e3-79426c3f5c08" alt=""><figcaption></figcaption></figure>

For "Subject DN Details", enter all Subject Distinguished Name (Subject DN) information for the CA as per the certificate profile selection.

Press "Proceed" to continue. You will be prompted to authenticate the action using your officer token/ username & password. Press "Authenticate" to proceed.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2F65r0qbpEWjnTaB9vXVid%2Fimage.png?alt=media&#x26;token=4da0bd89-9a93-48f3-b925-b184936308c8" alt=""><figcaption></figcaption></figure>

Officer is required to successfully authenticate and continue with “Create”.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2F9f2O21z348l182L5aS0S%2Fimage.png?alt=media&#x26;token=7dc8d48c-f5c6-447a-a772-0f97c9da6ae5" alt=""><figcaption></figcaption></figure>

The "Certificate" will be created and downloadable.

## **Configure OCSP Certificates**

An Officer can manage the Online Certificate Status Protocol (OCSP) certificates of CAs in his/her own group using the following UI.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FuHHiheFlXCE0s4UI910G%2Fimage.png?alt=media&#x26;token=7283bcc6-ada0-4e50-acb1-cbc73812a544" alt=""><figcaption></figcaption></figure>

After generation, OCSP certificates must be manually mapped to the corresponding CA.

To map the OCSP certificate to an existing CA, simply click on "OCSP Config".

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FAv28KCE0ArQOkye52wBm%2Fimage.png?alt=media&#x26;token=f7529ac8-242c-4580-aff4-7be1d22e7822" alt=""><figcaption></figcaption></figure>

Select the CA to which the OCSP certificate should be mapped.

Enter the URL to your OCSP Core Responder in the OCSP URL.

For the emCA application with an internal OCSP Core Responder, this URL will be

```
https://<application_net_address>/ocsprespondercore/
```

where `<application_net_address>` is the Application Network address of your emCA application.

An example of a user interface can be seen in the image below.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2Faux3PU98PfFwME1nqxuf%2Fimage.png?alt=media&#x26;token=083a76f3-04ff-4514-8f68-63c351fd76c4" alt="" width="351"><figcaption></figcaption></figure>

Inspect the CA's certificate by clicking "View" next to the registered CA. The OCSP certificate can also be inspected by clicking "View" next to the desired certificate.

To view the details of the OCSP certificate, please click on<img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FXebnSynmoVTGNe2CKFN2%2Fimage.png?alt=media&#x26;token=554db252-2918-41bb-bd0e-57871547ec7b" alt="" data-size="line"> icon.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FmXffNlVk03f3u5eDm3L6%2Fimage.png?alt=media&#x26;token=84fe0e9f-9e17-4516-8fda-a8bbf52c8d55" alt=""><figcaption></figcaption></figure>

Please click on the download <img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FRUSyh5tVBDo4J3zYz3qI%2Fimage.png?alt=media&#x26;token=aa7a49ee-4c27-4041-a90a-cce06a099456" alt="" data-size="line"> Icon to obtain the OCSP certificate.

* DER-encoded X.509 certificate (.cer)
* Base64-encoded X.509 certificate (.cer)
* Cryptographic Message Syntax Standard PKCS#7 certificate (.p7b)

&#x20;![](https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FKWg5HADz7VZVuUIr1I8E%2Fimage.png?alt=media\&token=ccf22658-2a42-4f9b-884b-0a9222dc3561)

Select the export format of your choice and click "Download" to start the download of the user certificate. The user certificate will be downloaded to the standard download location of your OS.
