Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- TMP="./appraiser.hostnameOoooooOOO"
- cat /dev/null > $TMP
- appraiser_hostname()
- {
- dialog --no-cancel --no-ok --title "OpenAttestation" \
- --backtitle "OpenAttestation client installation" \
- --inputbox "Input OAT appraiser hostname:" 16 51 "" 2>$TMP
- clear
- }
- if [ $# -lt 1 ];then
- appraiser_hostname
- else
- echo "$1" > $TMP
- fi
- if [ ! -s $TMP ];then
- appraiser_hostname_str="APPRAISER_HOSTNAME"
- else
- appraiser_hostname_str="`cat $TMP`"
- fi
- #OAT.properties
- OATProperties()
- {
- echo "WebServiceUrl=https://$appraiser_hostname_str:8443/HisWebServices"
- echo "KeyAuth=1111111111111111111111111111111111111111"
- echo "KeyIndex=1"
- echo "TpmQuoteExecutableName=NIARL_TPM_Module"
- echo "SplashImage=OAT07.jpg"
- echo "TrustStore=/usr/share/oat-client/TrustStore.jks"
- }
- OATProperties > /etc/oat-client/OAT.properties
- if [ ! -s $TMP ];then
- echo "oat client attestation config ...FAILD"
- else
- echo "oat client attestation config ...ok"
- fi
- #OATprovisioner.properties
- OATprovisionerProperties()
- {
- echo "EcValidityDays = 3652"
- echo "TpmOwnerAuth = 3031323334353637383930313233343536373839"
- echo "HisIdentityLabel = HIS Identity Key"
- echo "HisIdentityIndex = 1"
- echo "HisIdentityAuth = 1111111111111111111111111111111111111111"
- echo "PrivacyCaCertFile = PrivacyCA.cer"
- echo "PrivacyCaUrl = https://$appraiser_hostname_str:8443/HisPrivacyCAWebServices2"
- echo "HisRegistrationUrl = https://$appraiser_hostname_str:8443/HisWebServices"
- echo "TrustStore = TrustStore.jks"
- echo "NtruBypass = true"
- echo "ClientPath = /usr/share/oat-client"
- echo "ecStorage = NVRAM"
- echo "ecSigningKeySize = 2048"
- }
- OATprovisionerProperties > /etc/oat-client/OATprovisioner.properties
- if [ ! -s $TMP ];then
- echo "oat client provisioner config ...FAILD"
- echo "oat client installation ...FAILD"
- echo "oat appraiser hostname is NULL"
- else
- echo "oat client provisioner config ...ok"
- echo "oat client installation ...ok"
- echo "oat appraiser hostname: $appraiser_hostname_str"
- fi
- rm -rf $TMP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement