Hi Sukeerthi,

You're looking at the code that is used when NETSNMP_USE_PKCS11 is
defined.  The SHA2 hashes such as SHA256 are only available with OpenSSL,
in which case we use sc_get_openssl_hashfn() to pick the hash function that
corresponds with the configured hash algorithm.

  Bill


On Fri, May 17, 2024 at 7:44 AM sukeerthi bj <sukeerth...@gmail.com> wrote:

> Hi,
>
> I see AES192 and SHA256 support in SNMP, but wanted to understand if below
> code is doing right? Here for pcks_generate_ku only CKM_SHA_1 is passed.
> For SHA256 should not CKM_SHA256 be passed here instead?
> Can anyone have a look into this and explain?
>
> #ifndef NETSNMP_DISABLE_MD5
> if (NETSNMP_USMAUTH_HMACMD5 == auth_type)
> return pkcs_generate_Ku(CKM_MD5, P, pplen, Ku, kulen);
> else
> #endif
> if (NETSNMP_USMAUTH_HMACSHA1 == auth_type)
> return pkcs_generate_Ku(CKM_SHA_1, P, pplen, Ku, kulen);
> else {
> return (SNMPERR_GENERR);
> _______________________________________________
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to