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

Verify MD5 is available #807

Merged
merged 4 commits into from
Feb 25, 2016
Merged

Conversation

JordonPhillips
Copy link
Contributor

On some systems, such as a FIPS enabled system, MD5 hashing is unavailable. This commit will detect when that is the case, avoiding it where possible and raising a better error otherwise.

cc @jamesls @rayluo @kyleknap

On some systems, such as a FIPS enabled system, MD5 hashing is
unavailable. This commit will detect when that is the case, avoiding it
where possible and raising a better error otherwise.
have access to it for various reasons, such as FIPS mode being enabled.
:return: True if md5 is available. False if not.
"""
try:
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to check this each time. It's either available on the system or not. I'd prefer to just move this to a constant in this module.

@JordonPhillips JordonPhillips added pr/needs-review This PR needs a review from a member of the team. and removed incorporating-feedback labels Feb 24, 2016
MD5_AVAILABLE = False


def get_md5(raise_error_if_unavailable=True, *args, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

After discussing, we can remove the raise_error_if_unavailable argument implemented for the CLI and update the CLI code to not compute MD5's if it's not possible.

@jamesls
Copy link
Member

jamesls commented Feb 25, 2016

Looks good, just had that small comment about removing raise_error_if_unavailable for now.

@jamesls
Copy link
Member

jamesls commented Feb 25, 2016

:shipit:

JordonPhillips added a commit that referenced this pull request Feb 25, 2016
@JordonPhillips JordonPhillips merged commit 39a3c3e into boto:develop Feb 25, 2016
@JordonPhillips JordonPhillips deleted the check-md5 branch March 21, 2016 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/needs-review This PR needs a review from a member of the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants