KdcServer config = tgsContext.getConfig();
if ( config.isBodyChecksumVerified() )
{
byte[] bodyBytes = tgsContext.getRequest().getBodyBytes();
Checksum authenticatorChecksum = tgsContext.getAuthenticator().getChecksum();
if ( authenticatorChecksum == null || authenticatorChecksum.getChecksumType() == null
|| authenticatorChecksum.getChecksumValue() == null || bodyBytes == null )
{
throw new KerberosException( ErrorType.KRB_AP_ERR_INAPP_CKSUM );
}
LOG.debug( "Verifying body checksum type '{}'.", authenticatorChecksum.getChecksumType() );
checksumHandler.verifyChecksum( authenticatorChecksum, bodyBytes, null, KeyUsage.NUMBER8 );
}
}