File: fips.py

package info (click to toggle)
m2crypto 0.20.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,360 kB
  • ctags: 3,566
  • sloc: python: 19,545; makefile: 69; 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