Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/ntp/ntpd/ntp_proto.c
Show First 20 Lines • Show All 643 Lines • ▼ Show 20 Lines | #endif /* OPENSSL */ | ||||
* purge it immediately, since we won't be needing it | * purge it immediately, since we won't be needing it | ||||
* again. If the packet is authentic, it can mobilize an | * again. If the packet is authentic, it can mobilize an | ||||
* association. Note that there is no key zero. | * association. Note that there is no key zero. | ||||
*/ | */ | ||||
if (!authdecrypt(skeyid, (u_int32 *)pkt, authlen, | if (!authdecrypt(skeyid, (u_int32 *)pkt, authlen, | ||||
has_mac)) { | has_mac)) { | ||||
is_authentic = AUTH_ERROR; | is_authentic = AUTH_ERROR; | ||||
sys_badauth++; | sys_badauth++; | ||||
return; | |||||
} else { | } else { | ||||
is_authentic = AUTH_OK; | is_authentic = AUTH_OK; | ||||
} | } | ||||
#ifdef OPENSSL | #ifdef OPENSSL | ||||
if (skeyid > NTP_MAXKEY) | if (skeyid > NTP_MAXKEY) | ||||
authtrust(skeyid, 0); | authtrust(skeyid, 0); | ||||
#endif /* OPENSSL */ | #endif /* OPENSSL */ | ||||
#ifdef DEBUG | #ifdef DEBUG | ||||
▲ Show 20 Lines • Show All 2,791 Lines • Show Last 20 Lines |