Webserver+3d print
snmp_usm.c File Reference
User-based Security Model (USM) for SNMPv3. More...
Go to the source code of this file.
Functions | |
error_t | snmpGenerateKey (SnmpAuthProtocol authProtocol, const char_t *password, const uint8_t *engineId, size_t engineIdLen, SnmpKey *key) |
Password to key algorithm. | |
error_t | snmpCheckSecurityParameters (const SnmpUserInfo *user, SnmpMessage *message, const uint8_t *engineId, size_t engineIdLen) |
Check security parameters. | |
error_t | snmpAuthOutgoingMessage (const SnmpUserInfo *user, SnmpMessage *message) |
Authenticate outgoing SNMP message. | |
error_t | snmpAuthIncomingMessage (const SnmpUserInfo *user, SnmpMessage *message) |
Authenticate incoming SNMP message. | |
error_t | snmpEncryptData (const SnmpUserInfo *user, SnmpMessage *message, uint64_t *salt) |
Data encryption. | |
error_t | snmpDecryptData (const SnmpUserInfo *user, SnmpMessage *message) |
Data decryption. |
Detailed Description
User-based Security Model (USM) for SNMPv3.
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Description
This module implements the User-based Security Model (USM) for Simple Network Management Protocol (SNMP) version 3. Refer to the following RFCs for complete details:
- RFC 3414: User-based Security Model (USM) for SNMPv3
- RFC 3826: AES Cipher Algorithm in the SNMP User-based Security Model
- RFC 7860: HMAC-SHA-2 Authentication Protocols in the User-based Security Model
- Version:
- 1.7.6
Definition in file snmp_usm.c.
Function Documentation
error_t snmpAuthIncomingMessage | ( | const SnmpUserInfo * | user, |
SnmpMessage * | message | ||
) |
Authenticate incoming SNMP message.
- Parameters:
-
[in] user Security profile of the user [in] message Pointer to the incoming SNMP message
- Returns:
- Error code
Definition at line 339 of file snmp_usm.c.
error_t snmpAuthOutgoingMessage | ( | const SnmpUserInfo * | user, |
SnmpMessage * | message | ||
) |
Authenticate outgoing SNMP message.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the outgoing SNMP message
- Returns:
- Error code
Definition at line 237 of file snmp_usm.c.
error_t snmpCheckSecurityParameters | ( | const SnmpUserInfo * | user, |
SnmpMessage * | message, | ||
const uint8_t * | engineId, | ||
size_t | engineIdLen | ||
) |
Check security parameters.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the incoming SNMP message [in] engineId Pointer to the authoritative engine ID [in] engineIdLen Length of the authoritative engine ID
- Returns:
- Error code
Definition at line 190 of file snmp_usm.c.
error_t snmpDecryptData | ( | const SnmpUserInfo * | user, |
SnmpMessage * | message | ||
) |
Data decryption.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the incoming SNMP message
- Returns:
- Error code
Definition at line 594 of file snmp_usm.c.
error_t snmpEncryptData | ( | const SnmpUserInfo * | user, |
SnmpMessage * | message, | ||
uint64_t * | salt | ||
) |
Data encryption.
- Parameters:
-
[in] user Security profile of the user [in,out] message Pointer to the outgoing SNMP message [in,out] salt Pointer to the salt integer
- Returns:
- Error code
Definition at line 455 of file snmp_usm.c.
error_t snmpGenerateKey | ( | SnmpAuthProtocol | authProtocol, |
const char_t * | password, | ||
const uint8_t * | engineId, | ||
size_t | engineIdLen, | ||
SnmpKey * | key | ||
) |
Password to key algorithm.
- Parameters:
-
[in] authProtocol Authentication protocol (MD5 or SHA-1) [in] password NULL-terminated string that contains the password [in] engineId Pointer to the engine ID [in] engineIdLen Length of the engine ID [out] key Pointer to the resulting key
- Returns:
- Error code
Definition at line 77 of file snmp_usm.c.
Generated on Tue Jul 12 2022 17:10:22 by
