v.licheni.net
/
stack
/
cam.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
537b055
)
switch the digest default to SHA2
author
ale
<ale@incal.net>
Sat, 27 Sep 2014 08:35:00 +0000
(09:35 +0100)
committer
ale
<ale@incal.net>
Sat, 27 Sep 2014 08:35:00 +0000
(09:35 +0100)
cam/ca.py
patch
|
blob
|
history
cam/tests/test_ca.py
patch
|
blob
|
history
diff --git
a/cam/ca.py
b/cam/ca.py
index
3344c43
..
043cc7e
100644
(file)
--- a/
cam/ca.py
+++ b/
cam/ca.py
@@
-28,7
+28,7
@@
class CA(object):
self.basedir = basedir
self.config = {'basedir': basedir, 'default_days': '365', 'ou': 'CA',
'days': '3650', 'country': 'XX', 'crl_url': '',
self.basedir = basedir
self.config = {'basedir': basedir, 'default_days': '365', 'ou': 'CA',
'days': '3650', 'country': 'XX', 'crl_url': '',
- 'signature_algorithm': 'sha
1
', 'bits': '2048'}
+ 'signature_algorithm': 'sha
256
', 'bits': '2048'}
self.config.update(config)
self.files = _CAFiles(basedir,
conf='conf/ca.conf',
self.config.update(config)
self.files = _CAFiles(basedir,
conf='conf/ca.conf',
diff --git
a/cam/tests/test_ca.py
b/cam/tests/test_ca.py
index
748326f
..
fdcd238
100644
(file)
--- a/
cam/tests/test_ca.py
+++ b/
cam/tests/test_ca.py
@@
-53,15
+53,15
@@
class CATest(unittest.TestCase):
self.assertTrue(os.path.exists(cert.public_key_file))
self.assertTrue(os.path.exists(cert.private_key_file))
self.assertTrue(os.path.exists(cert.public_key_file))
self.assertTrue(os.path.exists(cert.private_key_file))
- def test_create_cert_with_
sha2_signatur
e(self):
- self.ca.config['signature_algorithm'] = '
sha256
'
+ def test_create_cert_with_
digest_overrid
e(self):
+ self.ca.config['signature_algorithm'] = '
md5
'
self.ca.create()
cert = CertStub('test', 'www.test.com', self.tmpdir)
self.ca.generate(cert)
self.assertTrue(os.path.exists(cert.public_key_file))
self.assertTrue(os.path.exists(cert.private_key_file))
self.assertTrue(
self.ca.create()
cert = CertStub('test', 'www.test.com', self.tmpdir)
self.ca.generate(cert)
self.assertTrue(os.path.exists(cert.public_key_file))
self.assertTrue(os.path.exists(cert.private_key_file))
self.assertTrue(
- 'Signature Algorithm:
sha256
WithRSAEncryption' in subprocess.check_output(
+ 'Signature Algorithm:
md5
WithRSAEncryption' in subprocess.check_output(
['openssl', 'x509', '-text', '-noout', '-in', cert.public_key_file]))
def test_revoke(self):
['openssl', 'x509', '-text', '-noout', '-in', cert.public_key_file]))
def test_revoke(self):