657c9ab79a00a2003f7c02c535418896cacc410a
fe0b1a212b0448d5c34deac9ad8a30f45c7f0a65
If a non-PEM file was passed into add-scep-ca it would accept it without question but later fail with:
status: CA_UNREACHABLE ca-error: Error: failed to verify signature on server response.
Try to do basic validation of user-provided PEM files by:
This isn't fool-proof but it at least does some basic sanity checking to ensure the file(s) exist and appear to be PEM files.
The unit tests use some Let's Encrypt CA certificates.
https://bugzilla.redhat.com/show_bug.cgi?id=1492112
Signed-off-by: Rob Crittenden rcritten@redhat.com
Ran this change through Coverity. Addressing some issues it turned up.
rebased onto d9e1e2808c251abb8257998979b125ba87184c31
rebased onto 94e09df2a6baf50558cf66ac9c035fb0865d8b43
rebased onto f986d5a1468101b33b2ad0044fd2ca0bb9a738a0
rebased onto fe0b1a212b0448d5c34deac9ad8a30f45c7f0a65
Pull-Request has been merged by rcritten
If a non-PEM file was passed into add-scep-ca it would
accept it without question but later fail with:
status: CA_UNREACHABLE
ca-error: Error: failed to verify signature on server response.
Try to do basic validation of user-provided PEM files by:
This isn't fool-proof but it at least does some basic
sanity checking to ensure the file(s) exist and appear
to be PEM files.
The unit tests use some Let's Encrypt CA certificates.
https://bugzilla.redhat.com/show_bug.cgi?id=1492112
Signed-off-by: Rob Crittenden rcritten@redhat.com