|
From: | Elias Önal |
Subject: | [lwip-devel] SNMPv3 implementation WIP |
Date: | Fri, 4 Mar 2016 21:00:19 +0800 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
Then there is also the need for cryptography, the polarSSL bits in LwIP don't cut it for everything that's needed. (like DES-CBC, AES-CFB, HMAC) So I came up with the following defines (and more) for my lwipopts.h:#ifndef LWIP_SNMPV3_GET_ENGINE_BOOTS #warning RFC3414 complicance requires a persistent boot count #define LWIP_SNMPV3_GET_ENGINE_BOOTS() 0 #endif
#define LWIP_DES_CBC_ENCRYPT_HANDLE mbedtls_des_context #define LWIP_DES_CBC_ENCRYPT_INIT(dh, key) (mbedtls_des_init(dh), mbedtls_des_setkey_enc(dh, key)) #define LWIP_DES_CBC_ENCRYPT_UPDATE(dh, len, iv, in, out) mbedtls_des_crypt_cbc(dh, MBEDTLS_DES_ENCRYPT, len, iv, in, out)As a fallback I would just generate a warning and disable the cryptographic functionality, since SNMPv3 can still operate without it. I have implemented Authentication (MD5/SHA1) as well as Privacy with DES so far, and I've planned to do AES next. The new MIB (SNMP-USER-BASED-SM-MIB) is still completely missing, but since it's pretty isolated I'd like to upstream the other changes upfront.#define LWIP_DES_CBC_ENCRYPT_FINAL(dh) mbedtls_des_free(dh)
-Elias
[Prev in Thread] | Current Thread | [Next in Thread] |