Update certs directory on UDM Pro, Add -legacy to pkcs12 so it works in Configurator

This commit is contained in:
Luke Schweickart 2024-02-17 20:29:58 -06:00 committed by GitHub
parent 8b697d661d
commit f4041c238a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,17 +1,17 @@
#!/bin/bash
#
#update these variables accordingly:
#update these variables accordingly
udmproaddress=plt-udm
udmproaddress=192.168.1.1
country=DE
organisation='Jollys Network'
organisation='My Private Network'
certificatename='HomePod'
password='password'
scp -r root@${udmproaddress}:/mnt/data/udapi-config/raddb/certs certs
scp -r root@${udmproaddress}:/data/udapi-config/raddb/certs .
cd certs
openssl req -subj "/C=${country}/O=${organisation}/CN=${certificatename}" -out myclient.csr -new -newkey rsa:4096 -nodes -keyout myclient.key
openssl x509 -req -days 365 -in myclient.csr -CA server.pem -CAkey server-key.pem -CAcreateserial -out myclient.crt -sha256
openssl pkcs12 -passout "pass:${password}" -export -in myclient.crt -inkey myclient.key -out ../"${certificatename} Certificate.pfx"
openssl pkcs12 -passout "pass:${password}" -export -in myclient.crt -inkey myclient.key -out ../"${certificatename} Certificate.pfx" -legacy # -legacy Required to enter password in Apple Configurator
cp server.pem ../"Radius Server Certificate.crt"