On Wed, Nov 09, 2005, Ken Campbell wrote: > I'm trying to get started with SSL. I've installed Win32OpenSSL-v0.9.8a > on a Windows 2003 Server box with Apache 2.0.55 running. I've got as > far as: > > openssl req -new -key myserver.key -out myserver.csr (where > myserver.key exists) > > As soon as I get to the following prompt things get a little bizarre: > > Country Name (2 letter code) [AU]: > String is too short, it needs to be at least 2 bytes long > Country Name (2 letter code) [AU]:GB > String is too long, it needs to be less than 2 bytes long > Country Name (2 letter code) [AU]:. > 2712:error:0D11A09E:asn1 encoding routines:ASN1_mbstring_copy:illegal > characters:.\crypto\asn1\a_mbstr.c:162: > > Can anyone tell me what strings are >= 2 bytes & also < 2 bytes and how > I might get past this? >
I suspect that some additional characters are appearing when OpenSSL uses fgets() to prompt for the string. Possibly it puts CRLF at the end instead of just LF. You could try adding: if (buf[i-2] == '\r') i--; before the line: buf[--i]='\0'; in apps/req.c around line 1567. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]