# Important! 
Place in this directory the certificate exposed by the **Local Print Server** when its console page is accessed from web browsers.
You can find a **DEMO** one (self signed and **valid for localhost only**) already there.
**Please replace it with your own!**

## How to generate your own certificate with openssl
1. Generate certificate with a pair of public/private keys, valid for 10 years, valid for domain **localhost** or ip **192.168.69.185**:
```
openssl req -x509 -newkey rsa:4096 -keyout LocalPrintServer.key -out LocalPrintServer.crt -days 3650 -addext "subjectAltName=IP:192.168.69.185,DNS:localhost"
```
##### You will be asked to fill several fields. Make sure you fill the Common Name the **DNS** address the server will use (**localhost** in our case)!!!
2. Convert the pair of public/private keys to a single file (a keystore with extension **.p12**):
```
openssl pkcs12 -export -out LocalPrintServer.p12 -inkey LocalPrintServer.key -in LocalPrintServer.crt
```
3. Change the alias of the created certificate from **1** (it is default created with this alias name) to **localprintserver**:
```
keytool -changealias -alias "1" -destalias "LocalPrintServer" -keystore LocalPrintServer.p12
```
4. Check that the alias has been successfully created:
```
keytool -list -keystore LocalPrintServer.p12
```
It should display something starting with the desired alias name (**localprintserver** in our case):
```
localprintserver, current_date, PrivateKeyEntry,
```