<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div dir="ltr" data-setdir="false"><div><div>Hi Experts,</div><div><br></div><div>I am using openssl 1.0.2 </div><div><br></div><div>I recently moved my app from a PPC to x86 platform (application is compiled on the respective platform) where I met an issue with BIO_read(). </div><div><br></div><div>I read a 20bytes of data using BIO_read like following..</div><div><br></div><div>int    res = BIO_read(bio, buf, 20);</div><div dir="ltr" data-setdir="false">char *ptr = buf;</div><div><br></div><div>The content that I send as input is a signed file content that I get from a different source. The issue is that the output 'buf' is not as expected on my x86. The behavior is different on different architectures. </div><div><br></div><div>For e.g. on intel x86 platform I get the following output with additional 0xffffff padded.>> For me this is not the expected result. </div><div>22,ffffff82,2b,28,06,09,2a,ffffff86,48,ffffff86,fffffff7,0d,02,09,02,ffffffa0,ffffff82,3b,12,30</div><div><br></div><div>This is what I was getting on my PPC platform which is as expected with the same app code.</div><div>22,82,2b,28,06,09,2a,86,48,86,f7,0d,02,09,02,a0,82,3b,12,30</div><div><br></div><div>Ofcourse, I need to further check on the source where/how the signed file was generated, but does anyone have any idea if BIO_read() has any specific handling with repsect to architectures?. I'd rule out the endianess factor as I would expect the entire byte order to be reversed if so. </div><div><br></div><div>I print the above output using the following code. <br></div></div><div dir="ltr" data-setdir="false"><div><div><span style="white-space: pre-wrap;">      </span>INFO( STR(" ..> Header@%02d: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,"</div><div>                                    "%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x",</div><div>                     ptr-buf, *(ptr+0),*(ptr+1),*(ptr+2),*(ptr+3),*(ptr+4),</div><div>                              *(ptr+5),*(ptr+6),*(ptr+7),*(ptr+8),*(ptr+9),</div><div>                              *(ptr+10),*(ptr+11),*(ptr+12),*(ptr+13),*(ptr+14),</div><div>                              *(ptr+15),*(ptr+16),*(ptr+17),*(ptr+18),*(ptr+19))); </div></div><br></div><br></div></div></body></html>