Page 1 of 1

Error: The input file does not appear to be a certificate request. Aborting import.

Posted: Tue Jun 28, 2022 12:42 pm
by snwl
Hi,

I am using windows x64. Following the steps in the
link: https://community.openvpn.net/openvpn/w ... nVPN-Howto
I encountered this error under the PKI procedure at step 5.

I have built the CA cert, server keypair and request, client keypair and request separately on the same machine and saved elsewhere separately before deleting (except for CA cert) after creating each one. I then downloaded the server keypair and request, client keypair and request back into the machine and tried too import each entity request file accordingly to step 5.

I used the command "easyasr import-req /path/to/received.req UNIQUE_SHORT_FILE_NAME" in EasyRSA-Start.ba" in the command line interface as an administrator in order to perform step 5. However, I received the error, "The input file does not appear to be a certificate request. Aborting import." I have also unblocked the files before the command

Does anybody know why the error occurred or can provide advice on what I should check for in order to fix the error? Please do also tell me if the procedure I followed above is not right.

Thanks.

Re: Error: The input file does not appear to be a certificate request. Aborting import.

Posted: Tue Jun 28, 2022 1:42 pm
by TinCanTech
snwl wrote:
Tue Jun 28, 2022 12:42 pm
I have built the CA cert, server keypair and request, client keypair and request separately on the same machine and saved elsewhere separately before deleting (except for CA cert) after creating each one. I then downloaded the server keypair and request, client keypair and request back into the machine and tried too import each entity request file accordingly to step 5.
The file has probably been corrupted by a copy operation.

Re: Error: The input file does not appear to be a certificate request. Aborting import.

Posted: Tue Jun 28, 2022 2:07 pm
by snwl
Hi,

Just to confirm, I received the same error for both client and server request files. If the files have really been corrupted by a copy operation, may I ask if such a corruption is common and how I should save / move / copy the files to avoid the corruption.

Thanks.

Re: Error: The input file does not appear to be a certificate request. Aborting import.

Posted: Tue Jun 28, 2022 4:35 pm
by TinCanTech
Maybe line endings: CRLF vs NL.

I suppose that you did use EasyRSA to generate the requests ?

Re: Error: The input file does not appear to be a certificate request. Aborting import.

Posted: Tue Jun 28, 2022 4:43 pm
by snwl
Yes I did. Thanks.

Re: Error: The input file does not appear to be a certificate request. Aborting import.

Posted: Tue Jun 28, 2022 5:06 pm
by TinCanTech
If EasyRSA says that the .req is not a request fle then it has probably been corrupted.

Re: Error: The input file does not appear to be a certificate request. Aborting import.

Posted: Wed Jun 29, 2022 3:19 pm
by snwl
Hi, I have realised why there is an error. It was the simple mistake of not enclosing the path in the command "easyasr import-req /path/to/received.req UNIQUE_SHORT_FILE_NAME" in quotation marks (" "). Thank you very much for the help.