<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Century;
        panose-1:2 4 6 4 5 5 5 2 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi Matt,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Could you please help to get any clue on the ACCESSOR APIs of the following.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried searching APIs. Not getting exact matches. Referred the below links.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_set_info_callback.html">https://www.openssl.org/docs/man1.1.1/man3/SSL_set_info_callback.html</a><o:p></o:p></p>
<p class="MsoNormal"><a href="https://www.openssl.org/docs/man1.1.1/man3/EVP_md5.html">https://www.openssl.org/docs/man1.1.1/man3/EVP_md5.html</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Getting similar error for the below code.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">tls1_PRF<span style="color:red">(s->ctx->md5,s->ctx->sha1</span>,buf,(<span style="color:blue">int</span>)(p-buf),<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">         pGenerator->master_secret,<span style="color:blue">sizeof</span>(pGenerator->master_secret),<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Century",serif">         km,tmp,num);</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Struct <span style="font-size:12.0pt;font-family:"Century",serif">
ssl_ctx_st {<o:p></o:p></span></p>
<p class="MsoNormal">…<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif;color:blue">const</span><span style="font-size:12.0pt;font-family:"Century",serif"> EVP_MD *md5;         
<span style="color:green">/* For SSLv3/TLSv1 'ssl3-md5' */<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Century",serif;color:blue">const</span><span style="font-size:12.0pt;font-family:"Century",serif"> EVP_MD *sha1;        
<span style="color:green">/* For SSLv3/TLSv1 'ssl3->sha1' */<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Century",serif;color:green">…</span><o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif;color:blue">struct</span><span style="font-size:12.0pt;font-family:"Century",serif"> evp_md_st {<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> type;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> pkey_type;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> md_size;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">unsigned</span> <span style="color:blue">long</span> flags;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> (*init) (EVP_MD_CTX *ctx);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> (*update) (EVP_MD_CTX *ctx, <span style="color:blue">
const</span> <span style="color:blue">void</span> *data, size_t count);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> (*final) (EVP_MD_CTX *ctx, <span style="color:blue">
unsigned</span> <span style="color:blue">char</span> *md);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> (*copy) (EVP_MD_CTX *to, <span style="color:blue">
const</span> EVP_MD_CTX *from);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> (*cleanup) (EVP_MD_CTX *ctx);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> block_size;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> ctx_size;               <span style="color:green">/* how big does the ctx->md_data need to be */<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:green">/* control function */<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Century",serif">   
<span style="color:blue">int</span> (*md_ctrl) (EVP_MD_CTX *ctx, <span style="color:blue">
int</span> cmd, <span style="color:blue">int</span> p1, <span style="color:blue">
void</span> *p2);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Century",serif">}
<span style="color:green">/* EVP_MD */</span> ;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Century",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks and regards,<o:p></o:p></p>
<p class="MsoNormal">Nagalakshmi<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Nagalakshmi V J <nagalakshmi.j@altran.com> <br>
<b>Sent:</b> Tuesday, October 22, 2019 9:39 AM<br>
<b>To:</b> Matt Caswell <matt@openssl.org>; Nagalakshmi V J <nagalakshmi.j@altran.com>; openssl-users@openssl.org<br>
<b>Subject:</b> Re: OpenSSL compilation errors in Windows<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Matt,<br>
<br>
Yes. Exactly we followed the same and able to resolve errors. Thank you so much for the support and guidance. I'll get back if any further errors.<br>
<br>
Thanks & Regards,<br>
Nagalakshmi V J <o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Matt Caswell <<a href="mailto:matt@openssl.org">matt@openssl.org</a>><br>
<b>Sent:</b> 21 October 2019 21:26:32<br>
<b>To:</b> Nagalakshmi V J <<a href="mailto:nagalakshmi.j@altran.com">nagalakshmi.j@altran.com</a>>;
<a href="mailto:openssl-users@openssl.org">openssl-users@openssl.org</a> <<a href="mailto:openssl-users@openssl.org">openssl-users@openssl.org</a>><br>
<b>Subject:</b> Re: OpenSSL compilation errors in Windows</span> <o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">** This mail has been sent from an external source **<br>
<br>
<br>
On 20/10/2019 08:43, Nagalakshmi V J wrote:<br>
> Hi Matt,<br>
><br>
> This link is having few APIS. But for getting master_key_length, I don't<br>
> find any API. Not sure if we need to use getMasterKey API for that.<br>
<br>
You can use SSL_SESSION_get_master_key() for this.<br>
<br>
Note this comment in the RETURN VALUES section:<br>
<br>
"For the other functions, if outlen is greater than 0 then these<br>
functions return the number of bytes actually copied, which will be less<br>
than or equal to outlen. If outlen is 0 then these functions return the<br>
maximum number of bytes they would copy -- that is, the length of the<br>
underlying field."<br>
<br>
So to discover the master_key_length call the function with outlen to<br>
zero. You can then allocate an appropriate sized buffer and call the<br>
function again in order to get the actual master key.<br>
<br>
Matt<br>
<br>
<br>
><br>
> I will try to use these APIs and get back.<br>
><br>
> Thanks & Regards,<br>
> Nagalakshmi V J<br>
> ------------------------------------------------------------------------<br>
> *From:* Matt Caswell <<a href="mailto:matt@openssl.org">matt@openssl.org</a>><br>
> *Sent:* 18 October 2019 14:48:33<br>
> *To:* Nagalakshmi V J <<a href="mailto:nagalakshmi.j@altran.com">nagalakshmi.j@altran.com</a>>;<br>
> <a href="mailto:openssl-users@openssl.org">openssl-users@openssl.org</a> <<a href="mailto:openssl-users@openssl.org">openssl-users@openssl.org</a>><br>
> *Subject:* Re: OpenSSL compilation errors in Windows<br>
><br>
> ** This mail has been sent from an external source **<br>
><br>
><br>
> On 18/10/2019 11:49, Nagalakshmi V J wrote:<br>
>> Now the issue is SSL_session structure is also having accessor APIs<br>
>> which I am not aware of. So I need to get the APIs for accessing the<br>
>> master_key_length,etc.. given in the above code. Those are not listed<br>
>> in the openssl link referred.<br>
><br>
> On this page look a the various functions beginning with "SSL_SESSION_"<br>
> in the name:<br>
><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.openssl.org_docs_man1.1.1_man3_&d=DwICaQ&c=cxWN2QSDopt5SklNfbjIjg&r=zbjUR56YPF3jaTRTjX4KZlHM9-LmYAuR5atSqEGOnpA&m=MZhYFrTAuuHOqAirPiGbT1CY6HDdH2U_CWYq12626Ts&s=gE0JHTVoToRHQRu5h2amvKa5WzyXsortlw0IoQd3VG4&e=">
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.openssl.org_docs_man1.1.1_man3_&d=DwICaQ&c=cxWN2QSDopt5SklNfbjIjg&r=zbjUR56YPF3jaTRTjX4KZlHM9-LmYAuR5atSqEGOnpA&m=MZhYFrTAuuHOqAirPiGbT1CY6HDdH2U_CWYq12626Ts&s=gE0JHTVoToRHQRu5h2amvKa5WzyXsortlw0IoQd3VG4&e=</a><br>
><br>
> From the code sample you gave you are probably mostly interested in the<br>
> functions on this page:<br>
><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.openssl.org_docs_man1.1.1_man3_SSL-5FSESSION-5Fget-5Fmaster-5Fkey.html&d=DwICaQ&c=cxWN2QSDopt5SklNfbjIjg&r=zbjUR56YPF3jaTRTjX4KZlHM9-LmYAuR5atSqEGOnpA&m=MZhYFrTAuuHOqAirPiGbT1CY6HDdH2U_CWYq12626Ts&s=XTuEzS7qyBvIHc_qWJYoh3JVC4zPCzvUzNPStW_SvLI&e=">
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.openssl.org_docs_man1.1.1_man3_SSL-5FSESSION-5Fget-5Fmaster-5Fkey.html&d=DwICaQ&c=cxWN2QSDopt5SklNfbjIjg&r=zbjUR56YPF3jaTRTjX4KZlHM9-LmYAuR5atSqEGOnpA&m=MZhYFrTAuuHOqAirPiGbT1CY6HDdH2U_CWYq12626Ts&s=XTuEzS7qyBvIHc_qWJYoh3JVC4zPCzvUzNPStW_SvLI&e=</a><br>
><br>
> Matt<br>
><br>
> =====================================================<br>
> Please refer to <a href="https://northamerica.altran.com/email-disclaimer">https://northamerica.altran.com/email-disclaimer</a><br>
> for important disclosures regarding this electronic communication.<br>
> =====================================================<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">=====================================================<br>
<span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Please refer to
<a href="https://northamerica.altran.com/email-disclaimer">https://northamerica.altran.com/email-disclaimer</a><br>
for important disclosures regarding this electronic communication.<br>
</span>=====================================================<o:p></o:p></p>
</div>
=====================================================<br>
<font face="Arial" color="Black" size="2">Please refer to https://northamerica.altran.com/email-disclaimer<br>
for important disclosures regarding this electronic communication.<br>
</font>=====================================================<br>
</body>
</html>