forked from URZ-Public/easyroam
Merge pull request 'Fixed extraction of easyroam commonName' (#1) from schleedej/easyroam:main into main
Reviewed-on: URZ-Public/easyroam#1
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# At first, you have to generate an easyroam profile on https://www.easyroam.de/ that
|
# 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.
|
# 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
|
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 -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 -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
|
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
|
# Remove existing connections
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user