Some CLI operations fail due to SSL handshake problem involving multiple request chunks. Here are the steps to reproduce:
% ./theme-build.sh % ./theme-install.sh % ./core-build.sh % ./core-install.sh % ./ds-create.sh % ./ca-create.sh
% ./cert-request-submit.sh cert-request.xml (note the Request ID) % ./cert-request-review.sh <Request ID> review.xml % ./cert-request-approve.sh review.xml
Both review and approve operations are done via SSL and they require client certificate authentication. However, the review works, but the approve fails with HTTP code 401 (Unauthorized). This is because the review is a GET operation which doesn't send any data, but the approve is a POST operation which sends a relatively large data.
These commands use Apache HTTP Client library which has a parameter called MIN_CHUNK_LIMIT (see http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/params/CoreConnectionPNames.html). The parameter is set to 512 bytes by default, so any request longer than that (such as the approve request) may be sent in multiple chunks.
It seems that the server doesn't properly handle a request sent in multiple chunks. Currently in Tomcat JSS the JSSSocketFactory.handshake() is not doing the handshake. The initial handshake is actually done when the server starts reading the data stream in NSS without asking for the client certificate. Then when the server needs to get the client certificate it will do an SSL renegotiation in JSSSupport.getPeerCertificateChain(). For some reason the renegotiation fails if the request is sent in multiple chunks.
attachment pki-certrequest.patch
This is a narrow problem and probably low level too. There's already a workaround, so it can be postponed.
Metadata Update from @edewata: - Issue set to the milestone: UNTRIAGED
Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.
This issue has been cloned to GitHub and is available here: https://github.com/dogtagpki/pki/issues/871
If you want to receive further updates on the issue, please navigate to the GitHub issue and click on Subscribe button.
Subscribe
Thank you for understanding, and we apologize for any inconvenience.
Metadata Update from @dmoluguw: - Issue close_status updated to: migrated - Issue status updated to: Closed (was: Open)