From: François Cami <fcami@xxxxxxxxxxxxxxxxx> --- 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..7eae64c 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.new('sha') oldsha.update(oldcsrbuf) olddig = oldsha.hexdigest() - newsha = sha.new() + newsha = hashlib.new('sha') newsha.update(csrbuf) newdig = newsha.hexdigest() if not newdig == olddig: diff --git a/scripts/certmaster-sync b/scripts/certmaster-sync index bd27af5..48a753e 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.new('sha') 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