On Mon, Jun 30, 2003, Oliver Foden wrote:
> Hello all im a newbie with a problem.
>
> Im trying to run the example 10-5 (generate a
> certificate request) from the code at
> www.opensslbook.com (I enclose the code and my pivate
> key).
>
> However I get this error when I try to run the
> program:
>
> [EMAIL PROTECTED]:~$ gcc -o EX10-5 EX10-5.c -lssl
> [EMAIL PROTECTED]:~$ ./EX10-5
> ** EX10-5.c:93 Error creating Name entry from NID
> 13831:error:0D11A0A3:asn1 encoding
> routines:ASN1_mbstring_copy:string too
> long:a_mbstr.c:154:maxsize=2
>
> Is it something to do with this:
>
> OBJ_txt2nid() or
> X509_NAME_ENTRY_create_by_NID ()
>
> ???
>
No its this:
> {"countryName", "FINLAND"},
countryName must be the two character country code. It must be exactly two
characters long, this is defined in various standards including RFC3280.
Also there is a better example of how to create a certificate request in
demos/x509/mkreq.c
Steve.
--
Dr Stephen N. Henson.
Core developer of the OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email: [EMAIL PROTECTED], PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]