diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-11-20 03:48:13 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-11-20 03:48:13 +0000 |
commit | e3c695278a95a5a9a1eaee9a5fc119fa480005ff (patch) | |
tree | 581938e972ae6cbd3a619e5a6a70165f17ca1995 /usr.sbin | |
parent | d2cebdb494885022537b71996fa40049720f1ff3 (diff) |
remove nt and lanman functions which aren't used. ok reyk yasuoka
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/npppd/npppd/chap_ms.c | 48 | ||||
-rw-r--r-- | usr.sbin/npppd/npppd/chap_ms.h | 6 |
2 files changed, 2 insertions, 52 deletions
diff --git a/usr.sbin/npppd/npppd/chap_ms.c b/usr.sbin/npppd/npppd/chap_ms.c index e38b4b6cd01..288016ff819 100644 --- a/usr.sbin/npppd/npppd/chap_ms.c +++ b/usr.sbin/npppd/npppd/chap_ms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chap_ms.c,v 1.6 2014/04/16 05:57:05 jsg Exp $ */ +/* $OpenBSD: chap_ms.c,v 1.7 2014/11/20 03:48:12 tedu Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -333,52 +333,6 @@ mschap_msk(u_int8_t *password, int passwordlen, } void -mschap_newkey(u_int8_t *startkey, u_int8_t *sessionkey, - long sessionkeylen, u_int8_t *key) -{ - EVP_MD_CTX ctx; - u_int8_t md[SHA_DIGEST_LENGTH]; - u_int mdlen; - - EVP_DigestInit(&ctx, EVP_sha1()); - EVP_DigestUpdate(&ctx, startkey, sessionkeylen); - EVP_DigestUpdate(&ctx, sha1_pad1, sizeof(sha1_pad1)); - EVP_DigestUpdate(&ctx, sessionkey, sessionkeylen); - EVP_DigestUpdate(&ctx, sha1_pad2, sizeof(sha1_pad2)); - EVP_DigestFinal(&ctx, md, &mdlen); - - memcpy(key, md, sessionkeylen); -} - -void -mschap_nt(u_int8_t *password_hash, u_int8_t *challenge) -{ - u_int8_t response[24]; - - mschap_challenge_response(challenge, password_hash, response); - memcpy(password_hash, response, sizeof(response)); - password_hash[24] = 1; /* NT-style response */ -} - -void -mschap_lanman(u_int8_t *digest, u_int8_t *challenge, u_int8_t *secret) -{ - static u_int8_t salt[] = "KGS!@#$%"; /* RASAPI32.dll */ - u_int8_t SECRET[14 + 1], *ptr, *end; - u_int8_t hash[MSCHAP_HASH_SZ]; - - bzero(&SECRET, sizeof(SECRET)); - end = SECRET + (sizeof(SECRET) - 1); - for (ptr = SECRET; *secret && ptr < end; ptr++, secret++) - *ptr = toupper(*secret); - - mschap_des_encrypt(salt, SECRET, hash); - mschap_des_encrypt(salt, SECRET + 7, hash + 8); - - mschap_challenge_response(challenge, hash, digest); -} - -void mschap_radiuskey(u_int8_t *plain, const u_int8_t *crypted, const u_int8_t *authenticator, const u_int8_t *secret) { diff --git a/usr.sbin/npppd/npppd/chap_ms.h b/usr.sbin/npppd/npppd/chap_ms.h index fee352cd30f..7ec0749ff32 100644 --- a/usr.sbin/npppd/npppd/chap_ms.h +++ b/usr.sbin/npppd/npppd/chap_ms.h @@ -1,4 +1,4 @@ -/* $OpenBSD: chap_ms.h,v 1.3 2010/09/22 11:48:38 yasuoka Exp $ */ +/* $OpenBSD: chap_ms.h,v 1.4 2014/11/20 03:48:12 tedu Exp $ */ /* $vantronix: chap_ms.h,v 1.6 2010/05/19 09:37:00 reyk Exp $ */ /* @@ -35,16 +35,12 @@ void mschap_nt_response(u_int8_t *, u_int8_t *, u_int8_t *, int, void mschap_auth_response(u_int8_t *, int, u_int8_t *, u_int8_t *, u_int8_t *, u_int8_t *, int, u_int8_t *); -void mschap_nt(u_int8_t *, u_int8_t *); -void mschap_lanman(u_int8_t *, u_int8_t *, u_int8_t *); - void mschap_ntpassword_hash(u_int8_t *, int, u_int8_t *); void mschap_challenge_hash(u_int8_t *, u_int8_t *, u_int8_t *, int, u_int8_t *); void mschap_asymetric_startkey(u_int8_t *, u_int8_t *, int, int, int); void mschap_masterkey(u_int8_t *, u_int8_t *, u_int8_t *); -void mschap_newkey(u_int8_t *, u_int8_t *, long, u_int8_t *); void mschap_radiuskey(u_int8_t *, const u_int8_t *, const u_int8_t *, const u_int8_t *); void mschap_msk(u_int8_t *, int, u_int8_t *, u_int8_t *); |