This commit is contained in:
Maximilian Hils 2014-07-17 01:47:24 +02:00
parent 24ef9c61a3
commit 55c2133b69
2 changed files with 8 additions and 1 deletions

View File

@ -67,6 +67,13 @@ class TestCertStore:
c3 = ca.get_cert("bar.com", [])
assert not c1 == c3
def test_sans_change(self):
with tutils.tmpdir() as d:
ca = certutils.CertStore.from_store(d, "test")
_ = ca.get_cert("foo.com", ["*.bar.com"])
cert, key = ca.get_cert("foo.bar.com", ["*.baz.com"])
assert "*.baz.com" in cert.altnames
def test_overrides(self):
with tutils.tmpdir() as d:
ca1 = certutils.CertStore.from_store(os.path.join(d, "ca1"), "test")

View File

@ -1,5 +1,5 @@
import cStringIO, Queue, time, socket, random
from netlib import tcp, certutils, test
from netlib import tcp, certutils, test, certffi
import mock
import tutils
from OpenSSL import SSL