23 lines
1.6 KiB
Bash
Executable file
23 lines
1.6 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
source ./login.bash
|
|
|
|
# Make OCSP request
|
|
echo -e "Updating OCSP Client Profile"
|
|
CRUD="Create" # This can be Create or Edit
|
|
OCSP_PRIMARY_URL="[2001:420:27ff:fff9::7]:5000"
|
|
OCSP_SERVICE_NAME="ggg"
|
|
SELECTED_ITEM_NAME="ggg" # This one is needed when you edit an existing OCSP service
|
|
curl -k 'https://diorite.cisco.com/admin/ocspServicesAction.do' -X POST \
|
|
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0' \
|
|
-H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' \
|
|
-H 'Accept-Encoding: gzip, deflate, br, zstd' \
|
|
-H '_QPH_: Y29tbWFuZD1zYXZl' -H 'Content-Type: application/x-www-form-urlencoded' \
|
|
-H 'X-Requested-With: XMLHttpRequest, XMLHttpRequest' \
|
|
-H "OWASP_CSRFTOKEN: ${CSRFTOKEN}" \
|
|
-H 'Connection: keep-alive' \
|
|
-H "Cookie: APPSESSIONID=${APPSESSIONID}; MNTLA_JWT_TOKEN=${JWT_TOKEN}" \
|
|
--data-raw "crud=$CRUD&selectedItemName=$SELECTED_ITEM_NAME&ocspServicesStub.failoverToSecondary=false&ocspServicesStub.alwaysAccessPrimaryFirst=true&ocspServicesStub.primaryNonceExtensions=true&ocspServicesStub.primaryValidateResponseSignature=true&ocspServicesStub.secondaryNonceExtensions=true&ocspServicesStub.secondaryValidateResponseSignature=true&ocspServicesStub.selectedOCSPConfig=OCSP_RESPONDER&ocspServicesStub.enableNonceExtensionSupportAia=true&ocspServicesStub.validateResponseSignatureAia=true&ocspServicesStub.name=$OCSP_SERVICE_NAME&ocspServicesStub.description=&ocspServicesStub.primaryURL=$OCSP_PRIMARY_URL&primaryNonceExtensionsCB=on&primaryValidateResponseSignatureCB=on&ocspServicesStub.cacheTimeout=1440" 2>/dev/null | jq
|
|
|
|
source ./logout.bash
|
|
|