# When use SSL in Arduino issue

**URL:** <https://forum.amebaiot.com/t/when-use-ssl-in-arduino-issue/535>\
**Category:** WiFi\
**Tags:** rtl872xd\
**Created:** [May 16, 2021, 11:08am UTC](https://forum.amebaiot.com/t/when-use-ssl-in-arduino-issue/535 "2021-05-16T11:08:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alphi\_Jiang](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/alphi_jiang/32/379_2.png) [@Alphi\_Jiang](https://forum.amebaiot.com/u/Alphi_Jiang)\
**Post date:** [May 16, 2021, 11:08am UTC](https://forum.amebaiot.com/t/when-use-ssl-in-arduino-issue/535/1 "2021-05-16T11:08:26Z")

</div>

When I use the third-party library in Arduino, I find that the first Byte data always is wrong. I traced the code and found it in the SSLDrv::getDataBuf() function in cores\arduino\ssl\_drv.cpp

 ![圖片 1](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/8901710c1948043a5884f6660de169d06af4b241.png)

point 1: assign the value of c[0] to \_data[0]  
poiint2:According to the first point, the \_data should be offset by 1 byte, shouldn’t it?

In fact, change code as below , i got correct data

 ![圖片 2](https://us1.discourse-cdn.com/flex016/uploads/ameba/original/1X/cedd7df82fdd876366fd761dba0304f2f90cf877.png)

I am not sure if this is the right solution. Or maybe RealTek has other considerations

---

<div class="post-metadata">

**Author:** ![wyy](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wyy](https://forum.amebaiot.com/u/wyy)\
**Post date:** [May 21, 2021, 7:14am UTC](https://forum.amebaiot.com/t/when-use-ssl-in-arduino-issue/535/2 "2021-05-21T07:14:24Z")

</div>

It looks like you are correct, this should be corrected in the next release.

Thanks for pointing out the mistake.
