EVALUATION
Solutiion: add a new method versionMatches(*,*), two kvno match if and only if:
1. Both are the same non-null and non-zero integer.
2. One of them is null or zero.
Zero is treated as zero because javax.security.auth.kerberos.KerberosKey's kvno is int (not Integer), therefore, is using zero when converting from a EncryptionKey with null kvno.
|
EVALUATION
This is a regression introduced by code changes for 6893158.
It seems in these tests, the keys on the KDC side have kvno info, but on the server side, keys are not read from keytab but generated with username/password pair and have no kvno info. Therefore, when the server receives a EncryptedData with kvno, it tries to locate a key in its keys set, and finds none with the same kvno value.
Add a fallback mechanism to the findKey() method.
|