<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Matt,</div><div>        So you are saying configuring with "<span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)">enable-deprecated" or not won't make the build different, they are all actually support the deprecated functions, right ? If yes, then in my application , if  I have "<span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)">OPENSSL_USE_DEPRECATED" defined, the depecated functions in my application should still work, right?  But it does not work. And as I imagine, in the openssl header files(after a successful build), it should have some "#if defines <span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)">OPENSSL_USE_DEPRECATED" like statement, but I don't see it anywhere, can you tell me how it works?</span></span></span></div><div><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><br></span></span></span></div><div><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)">Thanks!</span></span></span></div><div><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><br></span></span></span></div><div><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)"><span style="font:small/1.5 Arial,Helvetica,sans-serif;text-align:left;color:rgb(34,34,34);text-transform:none;text-indent:0px;letter-spacing:normal;text-decoration:none;word-spacing:0px;display:inline;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)">Peter</span></span></span></div></div></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Mon, Sep 16, 2019 at 10:52 AM Matt Caswell <<a href="mailto:matt@openssl.org">matt@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><br>
<br>
On 16/09/2019 15:44, Peter Sui wrote:<br>
> Hi,<br>
>        From the openssl website, I got the folloeing instruction:<br>
> "<br>
> Access to deprecated functions/macros has been removed by default. To enable<br>
> access you must do two things. 1) Build OpenSSL with deprecation support (pass<br>
> "enable-deprecated" as an argument to config) 2) Applications must define<br>
> "OPENSSL_USE_DEPRECATED" before including OpenSSL header files.<br>
> "<br>
> But, after I followed the instructions, it did not work. I searched all the<br>
> files(.h, .cpp, .c), I did not see the "OPENSSL_USE_DEPRECATED"  anywhere. And<br>
> in the make file generated, I found it's using the<br>
> flag -D"_CRT_SECURE_NO_DEPRECATE", does it mean no deprecated functions<br>
> available in the library built?  I also compared all the binary and header files<br>
> between the build without "enable-deprecated" and the build<br>
> with "enable-deprecated", there is no difference.<br>
> The command I used is:<br>
> perl Configure VC-WIN32 enable-deprecated<br>
> --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015<br>
> nmake<br>
> <br>
<br>
That CHANGES entry is incorrect and out-of-date. It should probably be removed.<br>
The original CHANGES entry said this:<br>
<br>
  *) config has been changed so that by default OPENSSL_NO_DEPRECATED is used.<br>
     Access to deprecated functions can be re-enabled by running config with<br>
     "enable-deprecated". In addition applications wishing to use deprecated<br>
     functions must define OPENSSL_USE_DEPRECATED. Note that this new behaviour<br>
     will, by default, disable some transitive includes that previously existed<br>
     in the header files (e.g. ec.h will no longer, by default, include bn.h)<br>
     [Matt Caswell]<br>
<br>
That CHANGES entry was added while 1.1.0 was being developed. However before<br>
1.1.0 was released we changed our mind and added this CHANGES entry:<br>
<br>
  *) Revert default OPENSSL_NO_DEPRECATED setting.  Instead OpenSSL<br>
     continues to support deprecated interfaces in default builds.<br>
     However, applications are strongly advised to compile their<br>
     source files with -DOPENSSL_API_COMPAT=0x10100000L, which hides<br>
     the declarations of all interfaces deprecated in 0.9.8, 1.0.0<br>
     or the 1.1.0 releases.<br>
<br>
     In environments in which all applications have been ported to<br>
     not use any deprecated interfaces OpenSSL's Configure script<br>
     should be used with the --api=1.1.0 option to entirely remove<br>
     support for the deprecated features from the library and<br>
     unconditionally disable them in the installed headers.<br>
     Essentially the same effect can be achieved with the "no-deprecated"<br>
     argument to Configure, except that this will always restrict<br>
     the build to just the latest API, rather than a fixed API<br>
     version.<br>
<br>
     As applications are ported to future revisions of the API,<br>
     they should update their compile-time OPENSSL_API_COMPAT define<br>
     accordingly, but in most cases should be able to continue to<br>
     compile with later releases.<br>
<br>
     The OPENSSL_API_COMPAT versions for 1.0.0, and 0.9.8 are<br>
     0x10000000L and 0x00908000L, respectively.  However those<br>
     versions did not support the OPENSSL_API_COMPAT feature, and<br>
     so applications are not typically tested for explicit support<br>
     of just the undeprecated features of either release.<br>
     [Viktor Dukhovni]<br>
<br>
Regards<br>
<br>
Matt<br>
</blockquote></div>