<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 16, 2019 at 3:17 AM Tobias Wolf <<a href="mailto:wolf.tobias@gmx.net">wolf.tobias@gmx.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="DE"><div class="gmail-m_3576722110045227568WordSection1"><p class="MsoNormal"><span lang="EN-US">I`d like to understand how a memory bio can be reseted with the internal read counter back to zero for further reusage.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">e.g. <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I want to try to read first der and then pem<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><a href="https://www.openssl.org/docs/man1.1.1/man3/d2i_X509.html" target="_blank"><span style="font-size:14pt;font-family:Georgia,serif;color:rgb(1,129,235);border:1pt none windowtext;padding:0cm;background:rgb(248,248,248)">d2i_X509</span></a><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">and then:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><a href="https://www.openssl.org/docs/man1.1.1/man3/PEM_read_X509.html" target="_blank"><span style="font-size:14pt;font-family:Georgia,serif;color:rgb(1,129,235);border:1pt none windowtext;padding:0cm;background:rgb(217,240,255)">PEM_read_X509</span></a><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-US">Then the second call will fail because the bio has already read some bytes, when I call each function with a newly created bio it is working fine.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I already tried with BIO_seek, BIO_tell (returns 0?!), BIO_reset.</span></p></div></div></blockquote><div><br></div><div>After reset did you also refill it?  </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="DE"><div class="gmail-m_3576722110045227568WordSection1"><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div></blockquote></div></div>