File: fips.py

package info (click to toggle)
m2crypto 0.21.1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,416 kB
  • sloc: python: 19,564; makefile: 21; ansic: 18; sh: 17
file content (8 lines) | stat: -rw-r--r-- 164 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
try:
    f = open('/proc/sys/crypto/fips_enabled')
    try:
        fips_mode = int(f.read())
    finally:
        f.close()
except Exception, e:
    fips_mode = 0