Fixed extraction of easyroam commonName
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# At first, you have to generate an easyroam profile on https://www.easyroam.de/ that
|
||||
# is generating an pkcs12 file as input for this script.
|
||||
|
||||
# Usage: bash configure-eduroam-with-easyroam.sh <YOUR-PKCS12-File>
|
||||
# Usage: bash configure-eduroam-with-easyroam <YOUR-PKCS12-File>
|
||||
|
||||
set -e
|
||||
|
||||
@@ -68,7 +68,7 @@ ConfDir="$HOME/.easyroam"
|
||||
openssl pkcs12 -in "$InputFile" $LegacyOption -nokeys -passin pass: -out "$ConfDir/easyroam_client_cert.pem"
|
||||
openssl pkcs12 -in "$InputFile" $LegacyOption -nocerts -passin pass: -passout pass:"$Pwd" -out "$ConfDir/easyroam_client_key.pem"
|
||||
openssl pkcs12 -info -in "$InputFile" $LegacyOption -nokeys -passin pass: -out "$ConfDir/easyroam_root_ca.pem" > /dev/null 2>&1
|
||||
Identity=$(openssl x509 -noout -in "$ConfDir/easyroam_client_cert.pem" -subject | awk -F \, '{print $1}' | sed -e 's/.*=//' -e 's/\s*//')
|
||||
Identity=$(openssl x509 -noout -in "$ConfDir/easyroam_client_cert.pem" -subject -nameopt multiline | awk -F' = ' '/commonName/ {print $2}')
|
||||
|
||||
# Remove existing connections
|
||||
|
||||
|
||||
Reference in New Issue
Block a user