On 03/10/2019 11:10, Nagalakshmi V J wrote: > Hi Matthias, > > > > Please find my response for your queries below. > > > > It would be more helpful if you would tell us *why* you are including ssl_locl.h > and what you are trying to achieve. Then we might be able to tell you how you > could achieve your goal using the officially supported API. > > [Nagalakshmi]: > > In our product code, we are using the structures 'ssl_st' and 'ssl_session_st' > which were defined in ssl.h file in Openssl 1.0.2.j version. > > Since the structure definitions are made opaque in openssl 1.1.1c, we used > ssl_locl.h where the structure definitions are available. > > > > Please note that many of the OpenSSL structures were made opaque in version > 1.1.0. This means that there are only forward declarations of the structures in > the public headers and the compiler does not get to see the structure members. > Instead of directly accessing the members, it is now necessary to use accessor > functions (a.k.a. getters and setters). > > [Nagalakshmi]: > > Regarding usage of accessor functions, I got the following APIs. > > SSL_get_session(s) > > SSL_SESSION_get_master_key(). > > > > If we use those APIs, I am again getting errors like the below. > > /.\odlibPrf_OSSL.h(164) : error C2027: use of undefined type 'ssl_session_st'/ > > / ..\..\OpenSSL\openssl-1.1.1c\include\openssl/ssl.h(213) : see > declaration of 'ssl_session_st'/ > > /.\odlibPrf_OSSL.h(164) : error C2227: left of '->SSL_SESSION_get_master_key' > must point to class/struct/union/ This at least looks like a syntax error. > > /.\odlibPrf_OSSL.h(167) : error C2027: use of undefined type 'ssl_st'/ > > / ..\..\OpenSSL\openssl-1.1.1c\include\openssl/ossl_typ.h(147) : see > declaration of 'ssl_st'/ > > /.\odlibPrf_OSSL.h(167) : error C2227: left of '->session' must point to > class/struct/union/ > > /.\odlibPrf_OSSL.h(167) : error C2227: left of '->master_key' must point to > class/struct/union/ These suggest you're still trying to direct access structure members. > > /.\odlibPrf_OSSL.h(168) : error C2027: use of undefined type 'ssl_st'/ Please show us the source code for the lines these error message correspond to. Matt > > > > Can you help me to get the corresponding accessor functions for these 2 structures. > > > > Thanks and regards, > > Nagalakshmi > > > > -----Original Message----- > From: Nagalakshmi V J <nagalakshmi.j@xxxxxxxxxx> > Sent: Tuesday, October 1, 2019 6:33 PM > To: Dr. Matthias St. Pierre <Matthias.St.Pierre@xxxxxxxxx>; Nagalakshmi V J > <nagalakshmi.j@xxxxxxxxxx> > Cc: openssl-users@xxxxxxxxxxx; Umamaheswari Nagarajan > <umamaheswari.nagarajan@xxxxxxxxxx> > Subject: RE: OpenSSL compilation errors in Windows > > > > Thank you Matthias for the explanation. I am going through my code to understand > why ssl_locl.h is included. I will check and get back on this ASAP. Also if > there is other way to achieve that I will use the same. > > > > Thanks and regards, > > Nagalakshmi > > > > -----Original Message----- > > From: Dr. Matthias St. Pierre <Matthias.St.Pierre@xxxxxxxxx > <mailto:Matthias.St.Pierre@xxxxxxxxx>> > > Sent: Tuesday, October 1, 2019 4:43 PM > > To: Nagalakshmi V J <nagalakshmi.j@xxxxxxxxxx <mailto:nagalakshmi.j@xxxxxxxxxx>> > > Cc: openssl-users@xxxxxxxxxxx <mailto:openssl-users@xxxxxxxxxxx>; Umamaheswari > Nagarajan <umamaheswari.nagarajan@xxxxxxxxxx > <mailto:umamaheswari.nagarajan@xxxxxxxxxx>> > > Subject: AW: OpenSSL compilation errors in Windows > > > > ** This mail has been sent from an external source ** > > > > > >> We are using OpenSSL APIs in our product code. We are not making any changes > in OpenSSL. > >> Our product code is a C++ code and it makes use of openSSL APIs for some > functionality. > > > > Local headers (like "ssl_locl.h" and "packet_locl.h") are *NOT* part of the > official OpenSSL API. > > Please don't expect any support w.r.t. compilation or compatibility problems if > you do include them in your application, even more if it's compiled using a C++ > compiler. > > > > It would be more helpful if you would tell us *why* you are including ssl_locl.h > and what you are trying to achieve. Then we might be able to tell you how you > could achieve your goal using the officially supported API. > > > > Please note that many of the OpenSSL structures were made opaque in version > 1.1.0. This means that there are only forward declarations of the structures in > the public headers and the compiler does not get to see the structure members. > Instead of directly accessing the members, it is now necessary to use accessor > functions (a.k.a. getters and setters). If this is the reason why you are > including private OpenSSL headers then you should adopt you application to use > the new accessors instead, instead of forcing the impossible to circumvent the > new policy. > > > > For more information, see > > > > https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.openssl.org_index.php_OpenSSL-5F1.1.0-5FChanges&d=DwIGaQ&c=cxWN2QSDopt5SklNfbjIjg&r=zbjUR56YPF3jaTRTjX4KZlHM9-LmYAuR5atSqEGOnpA&m=wpEV8Q2RDZjERhtJGZl9HajV9jd2dJFF10J30_YrPQo&s=sX1YilJaXloAQDzrjD3Lz-I6DOej3QduhsAanXOYxVM&e= > > > > Matthias > > > > > > > > > > > > Dr. Matthias St. Pierre > > Senior Software Engineer > > matthias.st.pierre@xxxxxxxxx <mailto:matthias.st.pierre@xxxxxxxxx> > > Phone: +49 911 9968-0 > > www.ncp-e.com <http://www.ncp-e.com> > > > > Headquarters Germany: NCP engineering GmbH • Dombuehler Str. 2 • 90449 • > Nuremberg North American HQ: NCP engineering Inc. • 678 Georgia Ave. • > Sunnyvale, CA 94085 East Coast Office: NCP engineering Inc. • 601 Cleveland > Str., Suite 501-25 • Clearwater, FL 33755 > > > > Authorized representatives: Peter Soell, Patrick Oliver Graf, Beate Dietrich > Registry Court: Lower District Court of Nuremberg Commercial register No.: HRB > 7786 Nuremberg, VAT identification No.: DE 133557619 > > > > This e-mail message including any attachments is for the sole use of the > intended recipient(s) and may contain privileged or confidential information. > Any unauthorized review, use, disclosure or distribution is prohibited. If you > are not the intended recipient, please immediately contact the sender by reply > e-mail and delete the original message and destroy all copies thereof. > > ===================================================== > > Please refer to https://northamerica.altran.com/email-disclaimer > > for important disclosures regarding this electronic communication. > > ===================================================== > > ===================================================== > Please refer to https://northamerica.altran.com/email-disclaimer > for important disclosures regarding this electronic communication. > =====================================================