Running Plex on a FreeBSD host (currently running version 1.18.1.1973), like others who have attempted to use a custom SSL/TLS certificate, I cannot get PLEX to use my certificate.
First, let’s validate that the certificate is a PKCS12 DER-encoded certificate and private key in a PFX file:
$ openssl pkcs12 -info -nodes -in mycert.pfx
Enter Import Password:
MAC: sha1, Iteration 1
MAC length: 20, salt length: 8
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
Bag Attributes
localKeyID: AB CD EF 00 11 22 33 44 55 66 77 88 99 DE AD BE EF 60 0D 18
subject=CN = my.plexserver.domain
issuer=C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
Bag Attributes
localKeyID: AB CD EF 00 11 22 33 44 55 66 77 88 99 DE AD BE EF 60 0D 18
Key Attributes: <No Attributes>
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
Okay, that looks normal and good. I launch PLEX, notice it is NOT using this certificate, so I look at the logs and discover:
$ grep CERT Plex\ Media\ Server.log
Oct 31, 2019 13:49:30.977 [0x8027bd000] DEBUG - CERT: Installed certificate with fingerprint de:ad:be:ef:15:60:0d:de:a
1:70:5e:e2:00:11:22:33:44:55:66:77.
Oct 31, 2019 13:49:30.977 [0x8027bd000] DEBUG - CERT: Installed new private key.
Oct 31, 2019 13:49:30.977 [0x8027bd000] DEBUG - CERT: Subject name is /C=US/ST=California/L=Los Gatos/O=Plex, Inc./CN=
*.718825f9b570481f9e42a6a95f718f01.plex.direct
Oct 31, 2019 13:49:30.977 [0x8027bd000] DEBUG - CERT: OCSP requests for stapling will be made to 'http://ocspx.digicer
t.com/'.
Oct 31, 2019 13:49:30.977 [0x8027bd000] VERBOSE - CERT: Successfully generated OCSP stapling request
Oct 31, 2019 13:49:30.977 [0x8027bd000] DEBUG - CERT: Installed intermediate certificate.
Oct 31, 2019 13:49:30.977 [0x8027bd000] ERROR - CERT: Found a user-provided certificate, but couldn't install it.
Oct 31, 2019 13:49:37.990 [0x80f78a100] DEBUG - CERT: Certificate will not expire soon.
Oct 31, 2019 13:49:37.991 [0x80b3e3c00] DEBUG - CERT: Installed certificate with fingerprint 09:bf:f5:6e:a0:0a:c7:36:0
e:19:80:70:6f:b7:b9:15:d4:21:86:9f.
Oct 31, 2019 13:49:37.991 [0x80b3e3c00] DEBUG - CERT: Installed new private key.
Oct 31, 2019 13:49:37.991 [0x80b3e3c00] DEBUG - CERT: Subject name is /C=US/ST=California/L=Los Gatos/O=Plex, Inc./CN=
*.718825f9b570481f9e42a6a95f718f01.plex.direct
Oct 31, 2019 13:49:37.991 [0x80b3e3c00] DEBUG - CERT: OCSP requests for stapling will be made to 'http://ocspx.digicer
t.com/'.
Oct 31, 2019 13:49:37.991 [0x80b3e3c00] VERBOSE - CERT: Successfully generated OCSP stapling request
Oct 31, 2019 13:49:37.991 [0x80b3e3c00] DEBUG - CERT: Installed intermediate certificate.
Oct 31, 2019 13:49:37.991 [0x80b3e3c00] ERROR - CERT: Found a user-provided certificate, but couldn't install it.
Nope, the installed certificate is the PLEX auto-magic *.plex.direct certificate. As for the certificate I wanted insalled, I see:
ERROR - CERT: Found a user-provided certificate, but couldn’t install it
Okay, not very helpful. Why not a nice DEBUG-level message saying WHY it couldn’t be installed. It obviously found the file just fine. There is no password encrypting the private key, and the PLEX configuration screen shows an empty field:
Custom certificate location: /path/to/mycert.pfx
Custom certificate encryption key: [empty field]
Custom certificate domain: my.plexserver.domain
Any way to convince PLEX to log MORE verbosely the certificate rejection reason?
Puzzled and frustrated,
–Astounding