# Full Chain PFX File Creation Guide

## 1. CSR (Certificate Signing Request)

First, you need to create a CSR file. You can use OpenSSL for this process. The following command creates the CSR and private key using a 2048-bit RSA key:

Linux Bash Code

```
openssl req -new -newkey rsa:2048 -nodes -keyout privatekey.key -out myrequest.csr
```

**Windows CMD Code**

1. OpenSSLInstall (For example, Win64 OpenSSL).
2. Open Command Prompt and run the following command:

**Cmd Code**

```
openssl req -new -newkey rsa:2048 -nodes -keyout privatekey.key -out myrequest.csr

```

After running the command, you will be asked to enter your certificate information as follows:

**PlainText**

```
Country Name (2 letter code) [OTHER
State or Province Name (full name) [Some-State]:Istanbul
Locality Name (eg, city) []:Istanbul
Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company
Organizational Unit Name (eg, section) []:IT Department
Common Name (e.g. server FQDN or YOUR name) []:www.example.com
Email Address []:admin@example.com


Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
```

Once these steps are completed, \`<mark style="color:orange;">**privatekey.keyA**</mark> private key file named \` and \`<mark style="color:orange;">**myrequest.csrA**</mark> CSR file named \` will be created.

***

## 2. Submitting the CSR File to the GlobalSign Certificate Authority (CA)

Send the CSR file you created to GlobalSign. GlobalSign will provide you with a certificate using your CSR file. After completing the GlobalSign checking processes, it will provide you with the necessary certificates.

***

## 3. Get Certificates

GlobalSign will provide you with the following files:

* Your own certificate (<mark style="color:orange;">**example.com.crt**</mark>)
* Intermediate certificates (<mark style="color:orange;">**intermediate1.crt, intermediate2.crt**</mark>)
* Root certificate (<mark style="color:orange;">**root.crt**</mark>)

***

## &#x20;4. Merge Certificates

You need to combine all certificates into a single file. This can be done using the \`<mark style="color:orange;">**cat**</mark>\` command:

**Linux Bash Code**

```
cat example.com.crt intermediate1.crt intermediate2.crt root.crt > fullchain.crt
```

This command returns all certificates to \`<mark style="color:orange;">**fullchain.crt**</mark> Combines into a file named \`.

**Windows**

1. Open Notepad and follow these steps:
   * <mark style="color:orange;">**example.com.crt**</mark> copy and paste its contents.
   * <mark style="color:orange;">**intermediate1.crt, intermediate2.crt**</mark> ve <mark style="color:orange;">**root.crt**</mark> copy and paste its contents sequentially.
   * Combine all content <mark style="color:orange;">**fullchain.crt**</mark> Save as.
2. Alternatively, **WindowsPowerShell** You can combine files using:

**Powershell**

```
Get-Content example.com.crt, intermediate1.crt, intermediate2.crt, root.crt | Set-Content fullchain.crt

```

***

## &#x20;5. Creating the PFX File

Using OpenSSL, create the **PFX** file using the private key and the merged certificate file:

**Linux Bash Code**

```
openssl pkcs12 -export -out fullchain.pfx -inkey privatekey.key -in fullchain.crt -certfile intermediate1.crt -certfile intermediate2.crt -certfile root.crt

```

**Windows**

Open Command Prompt and run the following command:

**Cmd**

```
openssl pkcs12 -export -out fullchain.pfx -inkey privatekey.key -in fullchain.crt -certfile intermediate1.crt -certfile intermediate2.crt -certfile root.crt
```

This command is \`<mark style="color:orange;">**fullchain.pfx**</mark> Creates a PFX file named \`. You will be asked to enter a password when creating the PFX file. This password is used to secure the PFX file.

***

## &#x20;6. Verifying the PFX File

You can use the following command to verify that the PFX file you created was created correctly:

**Linux Bash Code**

```
openssl pkcs12 -info -in fullchain.pfx
```

**Windows Cmd Code**

Open Command Prompt and run the following command:

**Cmd**

```
openssl pkcs12 -info -in fullchain.pfx
```

{% hint style="danger" %}
This command displays the contents and information of the PFX file.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autommate.com/userguide/installation-setup/full-chain-pfx-file-creation-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
