Could the problem be that your "CSR string" contains Java characters (16-bit
UNICODE) when you really want 8-bit byte data? Instead of Runtime.exec'ing
the openssl.exe, why not run a test program that saves stdin to a file?
Then you could actually see what your sending to openssl instead of assuming
that it is correct.
If you can't find a good test program, then write one!
- Eric B
P.S. If that is indeed the problem, then look into the convertToBytes()
method. (I don't have my Java Almanac handy to offer better info. Darn.)
-----Original Message-----
From: Sabyasachi Gupta [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 3:29 PM
To: '[EMAIL PROTECTED]'
Subject: Problem generating certificate
Hi All,
I am doing a
c:\openssl\bin\openssl.exe x509 -req -CAkey c:\openssl\bin\ca.key
-CAcreateserial -CA c:\openssl\bin\ca.crt
from within my java program using Runtime.exec
I am streaming the CSR string from an html form to the inputstream of the
openssl
program.. But everytime I get the following error.
Loading 'screen' into random state - done ERROR>1692:error:0906D06C:PEM
routines:PEM_read_bio:no start line:.\crypto\pem\pem_lib.c:662:Expecting:
CERTIFICATE REQUEST ExitValue: 1
Now when I paste the same csr string in the command line of openssl x509
command then
it works and generates a certificate. It has everything at the correct
places.
I also tried inserting line breaks after each line of the csr string from my
java code
but nothing seems to work..Am I missing something..should I add some extra
characters to
make this work.
thanks,
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
======================= Confidentiality Statement =======================
The information contained in this message and any attachments is
intended only for the use of the individual or entity to which it is
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL
and exempt from disclosure under applicable law. If you have received
this message in error, you are prohibited from copying, distributing, or
using the information. Please contact the sender immediately by return
e-mail and delete the original message from your system.
===================== End Confidentiality Statement =====================
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]