Description of problem: When an attempt is made to have a certificate issued via scep from the Redwax Interop server, the following error is logged: Feb 26 22:33:41 bob certmonger[3888]: 2020-02-26 22:33:41 [3888] Error while starting helper "/usr/libexec/certmonger/scep-submit -u https://interop.redwax.eu/test/simple/scep -R /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ": Argument list too long. Version-Release number of selected component (if applicable): certmonger 0.79.7-3.el8 How reproducible: Always. Steps to Reproduce: 1. Add the Redwax Interop CA as follows: getcert add-scep-ca -c "Redwax Interop" -u https://interop.redwax.eu/test/simple/scep -R /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem 2. Request a certificate as follows: getcert request -f /etc/pki/interop/test.example.com.cert -k /etc/pki/interop/test.example.com.key -c "Redwax Interop" -I test.example.com -D test.example.com -G rsa -g 4096 -u digitalSignature -u keyEncipherment -L challenge -v Actual results: Certificate is stuck in status NEED_TO_SUBMIT with no obvious clue as to why it is stuck: [root@bob ~]# getcert list Number of certificates and requests being tracked: 1. Request ID 'test.example.com': status: NEED_TO_SUBMIT The following error is logged periodically in /var/log/messages: Feb 26 22:39:32 bob certmonger[3888]: 2020-02-26 22:39:32 [3888] Error while starting helper "/usr/libexec/certmonger/scep-submit -u https://interop.redwax.eu/test/simple/scep -R /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ": Argument list too long. Expected results: Certificate successfully issued. Additional info:
It doesn't like something about /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem. It is intended to pass in just the certs required for validation and not an entire bundle of unrelated CAs.
Not seeing how an incorrectly specified certificate could lead to "Argument list too long", especially when the argument consists of 140 characters?
certmonger passes the value of -R as an environment variable and 200k is too big.
This problem is related to https://bugzilla.redhat.com/show_bug.cgi?id=1808613. If an attempt is made to set the CA certificate bundle for the https connection using -R, this bundle overrides the CA certificate that is discovered through SCEP, and in turn breaks SCEP, unless by accident the two CA certs are the same. To fix this, we need a separate command line option that is used for https CA certificates (as well as options for specifying a cert and key for https, because it's incomplete not to). The second command line option must be passed by filename, not through the raw certificate in an environment variable, so that we can support large CA lists as well as directory paths.
I'm not able to reproduce this on Fedora 34 with current certmonger, 0.79.14. I suppose its possible that some other SCEP-related change addressed this but I'm not sure. I used the reproducer steps, basically cut-n-paste, and was able to get a certificate.
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.