<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>yes i can do this. I do it as github issue then. I hope i find time this evening to do this otherwise tomorrow.</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> openssl-users <openssl-users-bounces@openssl.org> im Auftrag von Richard Levitte <levitte@openssl.org><br>
<b>Gesendet:</b> Dienstag, 11. Juli 2017 09:19:04<br>
<b>An:</b> openssl-users@openssl.org<br>
<b>Betreff:</b> Re: [openssl-users] OpenSSL 1.1.0 providing new OIDs to source code</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">This all sounds a bit mysterious...<br>
<br>
would you mind sharing a test program that shows the problem, with<br>
detailed step by step instructions (among others what libraries you're<br>
running against each time)?  Preferably as a github issue, but here is<br>
fine as well...<br>
<br>
Cheers,<br>
Richard<br>
<br>
In message <DB6P195MB0182A9C918B5D06CF9A12FD8FBA90@DB6P195MB0182.EURP195.PROD.OUTLOOK.COM> on Mon, 10 Jul 2017 16:47:28 +0000, Matthias Ballreich <Matthias.Ballreich@outlook.de> said:<br>
<br>
Matthias.Ballreich> Yes, MY_NID is really NID_whatever. I tried it with putting<br>
Matthias.Ballreich> OPENSSL_init_crypto(0, NULL); at start of my main().<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> Did not make any difference…<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> The Integer value of MY_NID will be printed out and is the correct<br>
Matthias.Ballreich> integer value.<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> And i tried another thing. I replaced the two dll-libraries with the<br>
Matthias.Ballreich> new created ones and then i run my Code and there all will be printed<br>
Matthias.Ballreich> out correctly. BUT the whole time i used some older dll-libraries of<br>
Matthias.Ballreich> openssl, (1.1.0f) and for development i used the latest 1.1.1-dev and<br>
Matthias.Ballreich> then i build this, which has added a new x509 extension (Admission),<br>
Matthias.Ballreich> which has a new OID (NID_extX509Admission, etc.) and there the short<br>
Matthias.Ballreich> and long name will be printed out correctly after Building the Code.<br>
Matthias.Ballreich> So this is a Little bit strange.<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> Or must i replace the dll-libraries every time i build the Code? But<br>
Matthias.Ballreich> when, why has it worked with the old ones and the 1.1.1-dev (master<br>
Matthias.Ballreich> branch)?<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> Best regards<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> Matthias<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> Von: Richard Levitte<br>
Matthias.Ballreich> Gesendet: Montag, 10. Juli 2017 06:14<br>
Matthias.Ballreich> An: openssl-users@openssl.org<br>
Matthias.Ballreich> Betreff: Re: [openssl-users] OpenSSL 1.1.0 providing new OIDs to<br>
Matthias.Ballreich> source code<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> In message<br>
Matthias.Ballreich> <AM5P195MB018008B87ACD89D37B629CF3FBAB0@AM5P195MB0180.EURP195.PROD.OUTLOOK.COM><br>
Matthias.Ballreich> on Sat, 8 Jul 2017 23:31:00 +0000, Matthias Ballreich<br>
Matthias.Ballreich> <matthias.ballreich@outlook.de> said:<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> matthias.ballreich> Hi there,<br>
Matthias.Ballreich> matthias.ballreich><br>
Matthias.Ballreich> matthias.ballreich> i want to contribute some more OIDs. Therefore i<br>
Matthias.Ballreich> added the OIDs inside<br>
Matthias.Ballreich> matthias.ballreich> the „Objects.txt“ inside /crypto/objects<br>
Matthias.Ballreich> matthias.ballreich><br>
Matthias.Ballreich> matthias.ballreich> Then i run these commands:<br>
Matthias.Ballreich> matthias.ballreich><br>
Matthias.Ballreich> matthias.ballreich> perl objects.pl objects.txt obj_mac.num .<br>
Matthias.Ballreich> matthias.ballreich> ./../include/openssl/obj_mac.h<br>
Matthias.Ballreich> matthias.ballreich><br>
Matthias.Ballreich> matthias.ballreich> perl obj_dat.pl ../../include/openssl/obj_mac.h<br>
Matthias.Ballreich> obj_dat.h<br>
Matthias.Ballreich> matthias.ballreich><br>
Matthias.Ballreich> matthias.ballreich> perl objxref.pl obj_mac.num obj_xref.txt ><br>
Matthias.Ballreich> obj_xref.h<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> Sure, that looks fine to me<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> matthias.ballreich> The files are generated / updated. Then i build<br>
Matthias.Ballreich> the source which<br>
Matthias.Ballreich> matthias.ballreich> builds fine without any exceptions. Then i tried<br>
Matthias.Ballreich> to use the generated<br>
Matthias.Ballreich> matthias.ballreich> NIDs in my Code. For test purposes i tried to<br>
Matthias.Ballreich> print out the short and<br>
Matthias.Ballreich> matthias.ballreich> Long Name of my new oid with OBJ_nid2sn(MY_NID)<br>
Matthias.Ballreich> and OBJ_nid2(MY_NID).<br>
Matthias.Ballreich> matthias.ballreich> But here it prints out an empty string.<br>
Matthias.Ballreich> matthias.ballreich><br>
Matthias.Ballreich> matthias.ballreich> When o try to use my NID with X509_get_ext_by_NID<br>
Matthias.Ballreich> (cert, MY_NID, -1)<br>
Matthias.Ballreich> matthias.ballreich> the Output is -2.<br>
Matthias.Ballreich> matthias.ballreich><br>
Matthias.Ballreich> matthias.ballreich> So where is the Problem or what i’m doing wrong<br>
Matthias.Ballreich> here? Thanks!<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> If you've come that far, MY_NID (which I assume is really<br>
Matthias.Ballreich> NID_whatever) obviously exists, or your code wouldn't even have<br>
Matthias.Ballreich> compiled. One possibility remains, that for some reason, libcrypto<br>
Matthias.Ballreich> hasn't been initialised like it should. This can happen if you only<br>
Matthias.Ballreich> call a very select set of OpenSSL functions. What happens if you add<br>
Matthias.Ballreich> this at the start of your main()?<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> OPENSSL_init_crypto(0, NULL);<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> (note, that should be seen as a temporary measure, as this is called<br>
Matthias.Ballreich> internally in quite a number of spots, so for larger uses of OpenSSL<br>
Matthias.Ballreich> functionality, you shouldn't need that)<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> Cheers,<br>
Matthias.Ballreich> Richard<br>
Matthias.Ballreich> <br>
Matthias.Ballreich> --<br>
Matthias.Ballreich> Richard Levitte levitte@openssl.org<br>
Matthias.Ballreich> OpenSSL Project <a href="http://www.openssl.org/~levitte/">http://www.openssl.org/~levitte/</a><br>
Matthias.Ballreich> --<br>
Matthias.Ballreich> openssl-users mailing list<br>
Matthias.Ballreich> To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users">
https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
Matthias.Ballreich> <br>
-- <br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users">
https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
</div>
</span></font>
</body>
</html>