~ubuntu-branches/ubuntu/saucy/m2crypto/saucy

« back to all changes in this revision

Viewing changes to tests/fips.py

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-06 01:28:39 UTC
  • mfrom: (2.2.5 sid)
  • Revision ID: james.westby@ubuntu.com-20091106012839-zjjugwmj8zggokqh
Tags: 0.20.1-1ubuntu1
* Merge from debian testing, remaining changes:
  - debian/rules; enable testsuite, add more files to "clean" rule.
  - tests/test_ssl.py: use signal 9 to kill old s_server processes
    to work around build HUP signal-ignore-mask (LP: #451998).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
try:
 
2
    f = open('/proc/sys/crypto/fips_enabled')
 
3
    try:
 
4
        fips_mode = int(f.read())
 
5
    finally:
 
6
        f.close()
 
7
except Exception, e:
 
8
    fips_mode = 0