[PATCH] switch from sha.new() to hashlib.sha1()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 certmaster/certmaster.py |    6 +++---
 scripts/certmaster-sync  |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/certmaster/certmaster.py b/certmaster/certmaster.py
index 9548b8b..af35ea4 100644
--- a/certmaster/certmaster.py
+++ b/certmaster/certmaster.py
@@ -22,7 +22,7 @@ import traceback
 import os
 import os.path
 from OpenSSL import crypto
-import sha
+import hashlib
 import glob
 import socket
 import exceptions
@@ -123,10 +123,10 @@ class CertMaster(object):
         if os.path.exists(csrfile):
             oldfo = open(csrfile)
             oldcsrbuf = oldfo.read()
-            oldsha = sha.new()
+            oldsha = hashlib.sha1()
             oldsha.update(oldcsrbuf)
             olddig = oldsha.hexdigest()
-            newsha = sha.new()
+            newsha = hashlib.sha1()
             newsha.update(csrbuf)
             newdig = newsha.hexdigest()
             if not newdig == olddig:
diff --git a/scripts/certmaster-sync b/scripts/certmaster-sync
index bd27af5..c44bba1 100644
--- a/scripts/certmaster-sync
+++ b/scripts/certmaster-sync
@@ -7,7 +7,7 @@
 
 import os
 import sys
-import sha
+import hashlib
 import xmlrpclib
 from glob import glob
 from time import sleep
@@ -72,7 +72,7 @@ def local_certs():
     return results
 
 def checksum(f):
-    thissum = sha.new()
+    thissum = hashlib.sha1()
     if os.path.exists(f):
         fo = open(f, 'r')
         data = fo.read()
-- 
1.6.6.1

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux