Create the PEM File¶
Each TLS-enabled daemon needs to present a valid X.509 certificate to the peer.
The .PEM file must contain:
- An unencrypted private key
- A signed certificate (not a certificate request)
-----BEGIN RSA PRIVATE KEY-----
[encoded key]
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
[encoded certificate]
-----END CERTIFICATE-----
Create the .PEM file for Stunnel and remove the group and world permissions.
$ SET DEF STUNNEL$ROOT:[ETC]
$ COPY/CONCATENATE SERVER.KEY,SERVER.CRT STUNNEL.PEM
$ SET SECURITY/PROTECTION=(G,W) STUNNEL.PEM
Verify the file protection:
$ DIRECTORY/SECURITY STUNNEL.PEM;1
Directory STUNNEL$ROOT:[000000.etc]
Stunnel.pem;1 [SYSTEM] (RWED,RWED,,)
Total of 1 file.