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

Migrate OTP import script to python-cryptography #486

Closed
wants to merge 1 commit into from

Conversation

npmccallum
Copy link
Contributor

@npmccallum
Copy link
Contributor Author

This is an old patch I found on my system that doesn't appear to be merged.

@tiran
Copy link
Member

tiran commented Feb 20, 2017

Thanks Indiana Nathaniel, good code archaeology. The ticket aligns nicely with https://fedorahosted.org/freeipa/ticket/6650

iv = data[:algo.block_size / 8]
data = data[len(iv):]

cipher = Cipher(algo(self.__key), mode(iv))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing backend here.

length=klen,
salt=salt,
iterations=itrs
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backend is missing here as well.

@stlaz
Copy link
Contributor

stlaz commented Feb 21, 2017

Thanks for the patch, less nss is always good. It seems that python-cryptography might have added the backend attribute to some constructors since the patch was created, our tests found two of such spots, if you could perhaps add it there.
I personally don't care much for the pep8 errors, IMHO the code reads better this way.

@stlaz stlaz added the rejected Pull Request has been rejected label Feb 27, 2017
@stlaz
Copy link
Contributor

stlaz commented Feb 27, 2017

Fixed in #509

@stlaz stlaz closed this Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejected Pull Request has been rejected
Projects
None yet
3 participants