# How to check a signed CSR with openssl?

I just learned that a CSR can be signed. See this Why is a CSR signed and which key is used for signing?

I tried to check the csr with below openssl command, but failed with errors "139942025398160:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: CERTIFICATE REQUEST"

openssl req -in signed_csr_file.scsr -noout -verify

Does anyone know how to check signed csr with openssl ?

Thanks

• Please show a test CSR. Note that questions about command line usage belong on the superuser site instead. – Maarten Bodewes Dec 5 '18 at 23:11

First, there are several certificate-request schemes (and formats) in use. Are you sure this file is supposed to be a CSR in the specific format supported by req namely PKCS10/rfc2986 et pred?

Second, what is actually in the file? Is it actually in PEM format as described in wikipedia's second paragraph i.e. a five-dashes-BEGIN-something line, some base64, and a five-dashes-END-something line, and if so what exactly is the 'something'? Is it CERTIFICATE REQUEST or NEW CERTIFICATE REQUEST or something else? Is the PEM format exactly correct (no missing, altered, or extra characters within the lines of the PEM block -- extra lines before or after are okay)?

If the file is not PEM format, what is it? If it contains unprintable characters, use a hex dump or similar. If you don't recognize it, post it, or at least the first 50-100 bytes, for us to look at.

• Thanks for the reminder. Yes you are right, I didn't notice that the file is a base64 encoded xml payload, which contains the actual csr request. Thanks, Please ignore my question. – Feng Xi Dec 6 '18 at 2:32