Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
4cadcccc
Commit
4cadcccc
authored
Apr 29, 2014
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch pycrypto warning about gmp and show a nice warning on stderr
parent
dcd471b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
lib/ansible/utils/__init__.py
+15
-3
No files found.
lib/ansible/utils/__init__.py
View file @
4cadcccc
...
...
@@ -44,6 +44,7 @@ import getpass
import
sys
import
textwrap
import
json
import
warnings
#import vault
from
vault
import
VaultLib
...
...
@@ -75,9 +76,20 @@ except:
KEYCZAR_AVAILABLE
=
False
try
:
import
keyczar.errors
as
key_errors
from
keyczar.keys
import
AesKey
KEYCZAR_AVAILABLE
=
True
from
Crypto.pct_warnings
import
PowmInsecureWarning
with
warnings
.
catch_warnings
(
record
=
True
)
as
warning_handler
:
warnings
.
simplefilter
(
"error"
,
PowmInsecureWarning
)
try
:
import
keyczar.errors
as
key_errors
from
keyczar.keys
import
AesKey
except
PowmInsecureWarning
:
display
(
"The version of gmp you have installed has a known issue regarding timing vulnerabilities when used with pycrypto. "
+
\
"If possible, you should update it (ie. yum update gmp)."
,
color
=
"purple"
,
stderr
=
True
)
warnings
.
resetwarnings
()
warnings
.
simplefilter
(
"ignore"
)
import
keyczar.errors
as
key_errors
from
keyczar.keys
import
AesKey
KEYCZAR_AVAILABLE
=
True
except
ImportError
:
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment