<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Depends what you want it to print, I guess...  ASN1_STRING_print_ex() can print any ASN1_STRING (including an ASN1_BIT_STRING) but it'll come out binary packed.  If you want to do anything fancier like print individual bit values in a more human-readable way, you'll have to do it yourself, as far as I know.</div><div class=""><br class=""></div><div class="">  -Dave</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 16, 2018, at 10:32, Opa114 <<a href="mailto:Opa114@web.de" class="">Opa114@web.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0px; font-size: 15px; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif; color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" class=""><font face="Calibri,Helvetica,sans-serif" size="3" class=""><span style="margin: 0px; font-size: 12pt;" class="">Hi,</span></font></div><div style="margin: 0px; font-size: 15px; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif; color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" class=""><font face="Calibri,Helvetica,sans-serif" size="3" class=""><span style="margin: 0px; font-size: 12pt;" class=""><br class=""></span></font></div><div style="margin: 0px; font-size: 15px; font-family: 'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif; color: rgb(33, 33, 33); background-color: rgb(255, 255, 255);" class=""><font face="Calibri,Helvetica,sans-serif" size="3" class=""><span style="margin: 0px; font-size: 12pt;" class="">thanks for this - what about the ASN1_BIT_STRING? Is there such a predefined function?</span></font></div><br class=""></div><hr tabindex="-1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline-block; width: 1078px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""></span><div id="divRplyFwdMsg" dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">Von:</b><span class="Apple-converted-space"> </span>openssl-users <<a href="mailto:openssl-users-bounces@openssl.org" class="">openssl-users-bounces@openssl.org</a>> im Auftrag von Dave Coombs <<a href="mailto:dcoombs@carillon.ca" class="">dcoombs@carillon.ca</a>><br class=""><b class="">Gesendet:</b><span class="Apple-converted-space"> </span>Dienstag, 16. Oktober 2018 15:17 Uhr<br class=""><b class="">An:</b><span class="Apple-converted-space"> </span><a href="mailto:openssl-users@openssl.org" class="">openssl-users@openssl.org</a><br class=""><b class="">Betreff:</b><span class="Apple-converted-space"> </span>Re: [openssl-users] BIO_printf with ASN1_BIT_STRING and ASN1_INTEGER?</font><div class=""> </div></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word;"><div class="">Hi,</div><div class=""><br class=""></div><div class="">You can use i2a_ASN1_INTEGER() to print an ASN1_INTEGER to a BIO.</div><div class=""><br class=""></div><div class="">  -Dave</div><div class=""><br class=""></div><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Oct 16, 2018, at 05:37, Opa114 <<a href="mailto:Opa114@web.de" class="">Opa114@web.de</a>> wrote:</div><br class="x_Apple-interchange-newline"><div class=""><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">Hi there,</div><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br class=""></div><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">i have to print out some data, which is an ASN1_BIT_STRING and an ASN1_INTEGER with BIO_printf. For GENERAL_NAME for example there a predefined functions i can use like this: <span class="" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">GENERAL_NAME_print(bp, GENERAL_NAME_VAR) <= 0</span></div><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><span class="" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br class=""></span></div><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><span class="" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">But for ASN1_INTGER and ASN1_BIT_STRING i haven't found any predefined function like ASN1_INTEGER_PRINT or something similiar i can use. So can someone tell me how i print out these two data types with BIO_printf in the correct and actual way?</span></div><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><span class="" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br class=""></span></div><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><span class="" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">thanks a lot.</span></div><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; float: none; display: inline !important;">--<span class="x_Apple-converted-space"> </span></span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; float: none; display: inline !important;">openssl-users mailing list</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; float: none; display: inline !important;">To unsubscribe:<span class="x_Apple-converted-space"> </span></span><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">https://mta.openssl.org/mailman/listinfo/openssl-users</a></div></blockquote></div></div></div></blockquote></div><br class=""></body></html>