HMAC is deprecated in 3.0 getting error 'HMAC' was not declared in this scope

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

HMAC is deprecated in 3.0 getting error 'HMAC' was not declared in this scope

Narayana, Sunil Kumar

Hi,

                We are trying to upgrade our application from openssl usage of 1.0.2 to openssl 3.0, during which we observe following errors.

Need help to identify the alternatives.

 

Error1 :  error: 'HMAC' was not declared in this scope HMAC(EVP_sha1(), (const void*) cookie_secret, COOKIE_SECRET_LENGTH,

  • HMAC is deprecated in 3.0 but not finding the suitable replacement to use in application.
  • We feel we can use EVP_MAC API’s, but not sure the exact API which replaces HMAC

 

 

Error2 : error: invalid use of incomplete type 'SSL' {aka 'struct ssl_st'} ssl->d1->mtu = MAX_SEND_PKT_SIZE;

  • Our application is trying to set the MTU size but can not access d1 of 'struct ssl_st'.
  • Any utility exposed to applications similar to API dtls1_ctrl which is mostly an internal one

 

 

Regards,

Sunil




Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.
Reply | Threaded
Open this post in threaded view
|

Re: HMAC is deprecated in 3.0 getting error 'HMAC' was not declared in this scope

Dr Paul Dale
There is no direct replacement for the MHAC call at this point, EVP_MAC needs to be used.  I’d suggest reading the EVP_MAC(3) man page.  There is an example down the bottom.

Does SSL_set_mtu() do what you require?


Pauli
-- 
Dr Paul Dale | Distinguished Architect | Cryptographic Foundations 
Phone +61 7 3031 7217
Oracle Australia




On 27 Nov 2020, at 3:32 am, Narayana, Sunil Kumar <[hidden email]> wrote:

Hi,
                We are trying to upgrade our application from openssl usage of 1.0.2 to openssl 3.0, during which we observe following errors.
Need help to identify the alternatives.
 
Error1 :  error: 'HMAC' was not declared in this scope HMAC(EVP_sha1(), (const void*) cookie_secret, COOKIE_SECRET_LENGTH,
  • HMAC is deprecated in 3.0 but not finding the suitable replacement to use in application.
  • We feel we can use EVP_MAC API’s, but not sure the exact API which replaces HMAC
 
 
Error2 : error: invalid use of incomplete type 'SSL' {aka 'struct ssl_st'} ssl->d1->mtu = MAX_SEND_PKT_SIZE;
  • Our application is trying to set the MTU size but can not access d1 of 'struct ssl_st'.
  • Any utility exposed to applications similar to API dtls1_ctrl which is mostly an internal one
 
 
Regards,
Sunil 



Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.

Reply | Threaded
Open this post in threaded view
|

Re: HMAC is deprecated in 3.0 getting error 'HMAC' was not declared in this scope

Matt Caswell-2
In reply to this post by Narayana, Sunil Kumar


On 26/11/2020 17:32, Narayana, Sunil Kumar wrote:
> Error2 : error: invalid use of incomplete type 'SSL' {aka 'struct
> ssl_st'} ssl->d1->mtu = MAX_SEND_PKT_SIZE;

Use SSL_set_mtu(ssl, MAX_SEND_PKT_SIZE) instead.

Matt