Reputation: 21
I am Using OpenSSL "Win32OpenSSL_Light-1_0_1j" on Windows XP Machine. I have created the following keys and certificates
The root CA, I have stored the client (target board).
After this I am giving a command from the command prompt to connect to client (target broad).
But I am getting error.
s_server -accept 443 -cert server-certificate.crt -CAfile RootCA-cert.crt -key servertest.key
Enter pass phrase for servertest.key:
Loading 'screen' into random state - done
15424:error:02001002:system library:fopen:No such file or directory:.\crypto\bio\bss_file.c:169:fopen('RootCA-cert.crt','r')
15424:error:2006D080:BIO routines:BIO_new_file:no such file:.\crypto\bio\bss_file.c:172:
15424:error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:.\crypto\x509\by_file.c:274:
Using default temp DH parameters
Using default temp ECDH parameters
ACCEPT
I am using the default .cfg file when the OpenSSL is installed. I have the check the path set for the openssl.cfg
file in the environmental path setting. It is OPENSSL_SSL = C:\OpenSSLWin32\bin\openssl.cfg
which gets set when OpenSSL gets installed.
The extension for the configuration file is .cfg and not **cnf or conf.
Kindly help me on this.
Upvotes: 2
Views: 3727
Reputation: 123260
RootCA-cert.pem - Root certificate
OpenSSL> s_server -accept 443 -cert server-certificate.crt -CAfile RootCA-cert.crt -key servertest.key
... fopen:No such file or directory:.\crypto\bio\bss_file.c:169:fopen('RootCA-cert.crt','r')
Your file is *.pem
but you specify *.crt
on the command line. No wonder it can not find the file.
Upvotes: 1