Understanding X.509 Self-Signed Certificates

Algorithm:

Extended Key Usage (EKU):

from the command line of a Apple macOS (or Linux) command line to create both the unifi.pem (public) and unifi.key (private) certificate parts.

openssl req -x509 -nodes -newkey rsa:2048 -sha256 -subj /CN=unifi -addext extendedKeyUsage=serverAuth -days 750 -out unifi.pem -keyout unifi.key

MOVE TO OWN INSTRUCTIONS

Microsoft Windows users have a few options: Install Windows Subsystem for Linux:: This will let you run openssl on a lightwight Linux virtual machine on your workstation. Use an Azure Key Vault to create the self signed certificate:: dsadsad Use the OpenSSL Installer for Windows:: Click on ‘Releases’ found to the right, open the ‘Assets’ chevron, download and run OpenSSL-x64-hybridCRT-4.0.1.msi (or the .exe). Use PowerShell and New-SelfSignedCertificate::

+ It is important though that you extract the certificate (public) and key (private) in PEM format so that both RADNAC and Ubiquiti’s equipment can use it.

Though untested by us, The process is outlined on Stack Overflow but in place of both their New-SelfSignedCertificate and Get-Item commands you should run:

The following is untested, but you may be able to build upon it:

$params = @{
  Type = 'Custom'
  Subject = 'CN=unifi'
  TextExtension = @(
    '2.5.29.37={text}1.3.6.1.5.5.7.3.2'
  )
  KeyUsage = 'DigitalSignature'
  KeyAlgorithm = 'RSA'
  KeyLength = 2048
  HashAlgorithm = 'SHA256'
  NotAfter = [datetime]::now.AddDays(750)
  CertStoreLocation = 'Cert:\CurrentUser\My'
}
New-SelfSignedCertificate @params

Next step is to immediately add to your calendar a reminder for 720 days (a month earlier than the expiry) to renew this certificate otherwise your service will stop working.