summaryrefslogtreecommitdiffstats
path: root/libntp/authusekey.c
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
committerroberto <roberto@FreeBSD.org>2013-12-04 21:33:17 +0000
commitd54cfbdce4a9878ef65216dea36b62cf6646b84b (patch)
treea618007bb41d13153794a598e3d904ace2976324 /libntp/authusekey.c
parentfd23eea016bd30c806a3ee90eb6f397470c2fa46 (diff)
downloadFreeBSD-src-d54cfbdce4a9878ef65216dea36b62cf6646b84b.zip
FreeBSD-src-d54cfbdce4a9878ef65216dea36b62cf6646b84b.tar.gz
Virgin import of ntpd 4.2.6p5.
When the series of commits is complete, things like https://cert.litnet.lt/en/docs/ntp-distributed-reflection-dos-attacks should be fixed. PR: bin/148836 (except that we import a newer version) Asked by: Too many MFC after: 2 weeks
Diffstat (limited to 'libntp/authusekey.c')
-rw-r--r--libntp/authusekey.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/libntp/authusekey.c b/libntp/authusekey.c
index 40dd373..bef7b84 100644
--- a/libntp/authusekey.c
+++ b/libntp/authusekey.c
@@ -15,9 +15,6 @@
* high order bit of each byte a parity bit. "Ascii" means a 1-to-8
* character string whose ascii representation is used as the key.
*/
-
-#define KEY_TYPE_MD5 4
-
int
authusekey(
keyid_t keyno,
@@ -31,17 +28,8 @@ authusekey(
cp = str;
len = strlen((const char *)cp);
if (len == 0)
- return 0;
-
- switch(keytype) {
- case KEY_TYPE_MD5:
- MD5auth_setkey(keyno, str, (int)strlen((const char *)str));
- break;
-
- default:
- /* Oh, well */
return 0;
- }
+ MD5auth_setkey(keyno, keytype, str, (int)strlen((const char *)str));
return 1;
}
OpenPOWER on IntegriCloud