Re: Fwd: TLS/SSH bugs

Peter Gutmann <[email protected]> Mon, 15 Dec 2014 01:00:11 +1300
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
David Harris <[email protected]> writes:

>Any program I write now routinely takes either the ACP or Unicode data from
>the Windows dialogs and converts it into UTF-8 before storing or actioning it
>- in e-mail and almost anything to do with the web this is just what you have
>to do these days.

In your case it works because you know you're getting Unicode or ACP data from
a Windows dialog (or whatever) and can convert it as appropriate, but all
cryptlib gets is a byte string.  For an 8-bit character string passed to a
cryptlib API function there's no way to tell what a particular non-ASCII
string value is supposed to represent.  In this case I've been told it's CP
1251, but I can't handle that in a portable manner because mbstowcs() doesn't
allow me to specify a code page, it just uses the system default.  I'll ask
the OP whether he can pass the string to mbstowcs() and see if it's converted
to Unicode correctly...

Peter.



_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.