Hi,
Thanks for the hint. Now, I make with curl the same queries than "a pki -U
http://dogtag.org:8080 -C nss_pwd -n caadmin ca-cert-request-review 8 --action approve" (I'm using unsecure port to be able to capture unencrypted queries to the API):
I start with a login and a review to get a nonce:
curl -s --cert-type P12 --cert ca_admin_cert.p12:<pkc12pwd>
https://dogtag.org:8443/ca/rest/account/logincurl -s -H "Accept: application/xml" --cert-type P12 --cert ca_admin_cert.p12:<pkc12pwd>
https://dogtag.org:8443/ca/rest/agent/certrequests/08 | xmllint --format - > 08.xml
The nonce is well generated:
$ grep nonce 08.xml
<nonce>-8605088983470492766</nonce>
Then, I do a curl/POST to /ca/rest/agent/certrequests/8/approve, but the request returns the error "Nonce for cert-request 8 does not exist"
curl -X POST --cert-type P12 --cert ca_admin_cert.p12:<pkc12pwd>
https://dogtag.org:8443/ca/rest/agent/certrequests/8/approve --header "Content-Type:application/xml" -H "Accept: application/json"
{
"Attributes": {
"Attribute": []
},
"ClassName": "com.netscape.certsrv.base.BadRequestException",
"Code": 400,
"Message": "Nonce for cert-request 8 does not exist"
}
Something is missing... any ideas?
BR