- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- problem with MD5 protocol
Operating System - HP-UX
1754014
Members
7562
Online
108811
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2001 11:17 PM
11-07-2001 11:17 PM
problem with MD5 protocol
Hi I facing different problem.
the code below is working fine on one HPUX11.00 system fine and giveing segmentation fault on another HPUX11.00 with (aCC: HP ANSI C++ B3910B A.03.13. on bothe the servers.)
code is like this in snmp++ sources:(Iam usinf snmp++3.0 beta version sources)
int apPasswordToKeyMD5(
unsigned char *password, /* IN */
int passwordlen, /* IN */
unsigned char *engineID, /* IN - pointer to snmpEngineID */
int engineIDLength, /* IN - length of snmpEngineID */
unsigned char *key) /* OUT - pointer to caller 16-octet buffer */
{
MD5_CTX MD;
unsigned char *cp, password_buf[65];
unsigned long password_index = 0;
unsigned long count = 0, i;
MD5Init (&MD); /* initialize MD5 */
/* Use while loop until we've done 1 Megabyte */
while (count < 1048576) {
cp = password_buf;
for (i = 0; i < 64; i++) {
*cp++ = password[password_index++ % passwordlen];
}
MD5Update (&MD, password_buf, 64);
count += 64;
}
MD5Final (key, &MD); /* tell MD5 we're done */
memcpy(password_buf,key,16);
memcpy(password_buf + 16,engineID, engineIDLength);
memcpy(password_buf + 16 + engineIDLength, key,16);
MD5Init(&MD);
MD5Update(&MD, password_buf, 32 + engineIDLength);
MD5Final(key, &MD);
return SNMPv3_USM_OK;
}
It calulates key but at time of return it is giving sementation fault on system and success on another system.Is there any patches required to use MD5 auth protocol?
Please suggest the if any body find s solution.
W/love
Sri
the code below is working fine on one HPUX11.00 system fine and giveing segmentation fault on another HPUX11.00 with (aCC: HP ANSI C++ B3910B A.03.13. on bothe the servers.)
code is like this in snmp++ sources:(Iam usinf snmp++3.0 beta version sources)
int apPasswordToKeyMD5(
unsigned char *password, /* IN */
int passwordlen, /* IN */
unsigned char *engineID, /* IN - pointer to snmpEngineID */
int engineIDLength, /* IN - length of snmpEngineID */
unsigned char *key) /* OUT - pointer to caller 16-octet buffer */
{
MD5_CTX MD;
unsigned char *cp, password_buf[65];
unsigned long password_index = 0;
unsigned long count = 0, i;
MD5Init (&MD); /* initialize MD5 */
/* Use while loop until we've done 1 Megabyte */
while (count < 1048576) {
cp = password_buf;
for (i = 0; i < 64; i++) {
*cp++ = password[password_index++ % passwordlen];
}
MD5Update (&MD, password_buf, 64);
count += 64;
}
MD5Final (key, &MD); /* tell MD5 we're done */
memcpy(password_buf,key,16);
memcpy(password_buf + 16,engineID, engineIDLength);
memcpy(password_buf + 16 + engineIDLength, key,16);
MD5Init(&MD);
MD5Update(&MD, password_buf, 32 + engineIDLength);
MD5Final(key, &MD);
return SNMPv3_USM_OK;
}
It calulates key but at time of return it is giving sementation fault on system and success on another system.Is there any patches required to use MD5 auth protocol?
Please suggest the if any body find s solution.
W/love
Sri
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP