<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Hi there,</p>
<p><br>
</p>
<p>can anyone tell me how to parse a the Subject Directory Attribute Extension of a X509-Certificate in C++ with OpenSSL? I don't found any documentation or piece of code in the Github Repo of OpenSSL.</p>
<p><br>
</p>
<p>I read the Extension this way:</p>
<p></p>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><div>int loc = X509_get_ext_by_NID(cert, NID_subject_directory_attributes, -1);<br>X509_EXTENSION *ex = X509_get_ext(cert, loc);</div><div><br></div><div>But i stuck on how to continue and get the TypeValue-Stuff.</div><div>Would be very helpful if someone can help me.</div><div><br></div><div>thanks and best regards</div><div>Matthias</div></pre>
<br>
<p></p>
</div>
</body>
</html>