At 15:55 19.01.00 -0500, you wrote:
Hello,
(sorry for my last mail, mixed cancel with send...)
>I'm using openssl-0.9.4 on solirs 2.6 on a Sun E3500 (sparc)
>with the egcs gcc compiler v. 2.91.60. The application is multithreaded
>using pthreads.
>
>Anyway, when I run my app, I call n = SSL_read( ssl, (char *)&ch, 1 );
>to retrieve a byte into an int named ch. I find that my correct byte is
>returned in the most significant byte of the int. This seems to indicate
>that I have some sort of an alignment issue. I could use help solving this
>problem.
This is the famous Little_endian <-> big_endial difference...
address: 0 1 2 3
big endian: Hi Lo
small e: lo hi
you give a pointer to a 4 byte area.
SSL_read reads 1 char and stores it at the first address.
but in big endian there is the hi byte of the int...
By
Goetz
--
Goetz Babin-Ebell, TC TrustCenter GmbH, http://www.trustcenter.de
Sonninstr. 24-28, 20097 Hamburg, Germany
Tel.: +49-(0)40 80 80 26 -0, Fax: +49-(0)40 80 80 26 -126
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]