On Sat, Aug 27, 2005, SPE - Stani's Python Editor wrote:

> Hi,
> I try to create a certificate request with 'Certificate Authority' as 
> CN. If fails with the crypto error: ('asn1 encoding routines', 
> 'ASN1_mbstring_ncopy', 'invalid universalstring length') What does this 
> mean? Does anybody knows how this could be solved or point me in the 
> direction?
> Thanks,
> Stani
> 
> http://pythonide.stani.be
> 
> PS I used pyOpenSSL, but this problem is probably generic. This is the 
> python traceback:
> Traceback (most recent call last):
> 
>  File "C:\Python24\Scripts\webcleaner-certificates", line 113, in ?
> 
>    main(sys.argv[1:])
> 
>  File "C:\Python24\Scripts\webcleaner-certificates", line 105, in main
> 
>    install_ssl_certs(configdir)
> 
>  File "C:\Python24\Scripts\webcleaner-certificates", line 61, in 
> install_ssl_certs
> 
>    wc.proxy.ssl.create_certificates(configdir)
> 
>  File "C:\Python24\Lib\site-packages\wc\proxy\ssl.py", line 109, in 
> create_certificates
> 
>    careq = createCertRequest(cakey, CN='Certificate Authority')
> 
>  File "C:\Python24\Lib\site-packages\wc\proxy\ssl.py", line 179, in 
> createCertRequest
> 
>    setattr(subj, key, value)
> 
> OpenSSL.crypto.Error: [('asn1 encoding routines', 'ASN1_mbstring_ncopy', 
> 'invalid universalstring length')]
> 

That report doesn't help much unfortunately. A UniveralString must be a
multiple of 4 octets in length, which is the cause of that error.

However in normal usage UniversalStrings should almost never be encountered,
so I suspect some odd or invalid calls are being made by the wrapper.

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]

Reply via email to