diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-04-25 15:51:10 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-04-25 15:51:10 +0200 |
commit | 5f4e6a0dab6a8dc3ae125a6ca776d210fb9a3b07 (patch) | |
tree | 6417503cd365a7b7eaa10d1006e35ee3eec9b555 /lib | |
parent | ee1ed425edf110979bfa45abeaaf43b9d2919356 (diff) | |
download | gnutls-5f4e6a0dab6a8dc3ae125a6ca776d210fb9a3b07.tar.gz |
Change PSK key derivation algorithm.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gnutls_psk_netconf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gnutls_psk_netconf.c b/lib/gnutls_psk_netconf.c index eeb6f5880d..37c39a6926 100644 --- a/lib/gnutls_psk_netconf.c +++ b/lib/gnutls_psk_netconf.c @@ -58,7 +58,7 @@ gnutls_psk_netconf_derive_key (const char *password, int rc; /* - * PSK = SHA-1(SHA-1(password + psk_identity + "Key Pad for Netconf") + + * PSK = SHA-1(SHA-1(psk_identity + "Key Pad for Netconf" + password) + * psk_identity_hint) * */ @@ -70,7 +70,7 @@ gnutls_psk_netconf_derive_key (const char *password, return rc; } - rc = _gnutls_hash (&dig, password, strlen (password)); + rc = _gnutls_hash (&dig, psk_identity, strlen (psk_identity)); if (rc) { gnutls_assert (); @@ -78,7 +78,7 @@ gnutls_psk_netconf_derive_key (const char *password, return rc; } - rc = _gnutls_hash (&dig, psk_identity, strlen (psk_identity)); + rc = _gnutls_hash (&dig, netconf_key_pad, strlen (netconf_key_pad)); if (rc) { gnutls_assert (); @@ -86,7 +86,7 @@ gnutls_psk_netconf_derive_key (const char *password, return rc; } - rc = _gnutls_hash (&dig, netconf_key_pad, strlen (netconf_key_pad)); + rc = _gnutls_hash (&dig, password, strlen (password)); if (rc) { gnutls_assert (); |