Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In v8, GetEncryptionKey does not return latest key, when kvno = 0 #395

Closed
mrjackbo opened this issue Jul 8, 2020 · 1 comment · Fixed by #396
Closed

In v8, GetEncryptionKey does not return latest key, when kvno = 0 #395

mrjackbo opened this issue Jul 8, 2020 · 1 comment · Fixed by #396
Assignees
Labels

Comments

@mrjackbo
Copy link

mrjackbo commented Jul 8, 2020

The comment here

// If the kvno is zero then the latest kvno will be returned. The kvno is also returned for
states that the latest key will be returned if knvo is zero. This appears to be false: if knvo=0 then the function returns the key contained in the first entry of kt with matching principal and enctype, because of the assignment here:
kvno = int(k.KVNO)

As a consequence, the same function returns different keys in v7 and v8.
A solution would be to use a separate variable for the knvo of the returned key.

I noticed this since migration to v8 broke the clients in a library of mine. Connection with v7 is possible without problems, v8 fails.

@jcmturner
Copy link
Owner

@mrjackbo thanks for spotting this and letting me know. A fix will be integrated shortly...

@jcmturner jcmturner added the bug label Jul 9, 2020
@jcmturner jcmturner self-assigned this Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants