diff options
Diffstat (limited to 'rpkid/tests')
-rw-r--r-- | rpkid/tests/old_irdbd.sql | 4 | ||||
-rw-r--r-- | rpkid/tests/smoketest.py | 11 | ||||
-rw-r--r-- | rpkid/tests/yamltest.py | 4 |
3 files changed, 8 insertions, 11 deletions
diff --git a/rpkid/tests/old_irdbd.sql b/rpkid/tests/old_irdbd.sql index cef319a4..e773bb2e 100644 --- a/rpkid/tests/old_irdbd.sql +++ b/rpkid/tests/old_irdbd.sql @@ -109,9 +109,9 @@ CREATE TABLE ee_certificate ( self_handle VARCHAR(255) NOT NULL, pkcs10 LONGBLOB NOT NULL, gski VARCHAR(27) NOT NULL, - cn VARCHAR(64), + cn VARCHAR(64) NOT NULL, sn VARCHAR(64), - eku TEXT, + eku TEXT NOT NULL, valid_until DATETIME NOT NULL, PRIMARY KEY (ee_certificate_id), UNIQUE (self_handle, gski) diff --git a/rpkid/tests/smoketest.py b/rpkid/tests/smoketest.py index 1d9e600a..28bedaa4 100644 --- a/rpkid/tests/smoketest.py +++ b/rpkid/tests/smoketest.py @@ -394,12 +394,11 @@ class router_cert(object): self.asn = rpki.resource_set.resource_set_as("".join(str(asn).split())) self.router_id = router_id self.keypair = rpki.x509.ECDSA.generate(self.ecparams()) - self.pkcs10 = rpki.x509.PKCS10.create( - keypair = self.keypair, - eku = (rpki.oids.id_kp_bgpsec_router,)) + self.pkcs10 = rpki.x509.PKCS10.create(keypair = self.keypair) self.gski = self.pkcs10.gSKI() self.cn = "ROUTER-%08x" % self.asn[0].min self.sn = "%08x" % self.router_id + self.eku = rpki.oids.id_kp_bgpsec_router def __eq__(self, other): return self.asn == other.asn and self.sn == other.sn and self.gski == other.gski @@ -817,9 +816,9 @@ class allocation(object): ((roa_request_id, x.prefix, x.prefixlen, x.max_prefixlen, version) for x in prefix_set)) for r in s.router_certs: - cur.execute("INSERT ee_certificate (self_handle, pkcs10, gski, cn, sn, valid_until) " - "VALUES (%s, %s, %s, %s, %s, %s)", - (s.name, r.pkcs10.get_DER(), r.gski, r.cn, r.sn, s.resources.valid_until)) + cur.execute("INSERT ee_certificate (self_handle, pkcs10, gski, cn, sn, eku, valid_until) " + "VALUES (%s, %s, %s, %s, %s, %s, %s)", + (s.name, r.pkcs10.get_DER(), r.gski, r.cn, r.sn, r.eku, s.resources.valid_until)) ee_certificate_id = cur.lastrowid cur.executemany("INSERT ee_certificate_asn (ee_certificate_id, start_as, end_as) VALUES (%s, %s, %s)", ((ee_certificate_id, a.min, a.max) for a in r.asn)) diff --git a/rpkid/tests/yamltest.py b/rpkid/tests/yamltest.py index 9525a048..5eb3bd2f 100644 --- a/rpkid/tests/yamltest.py +++ b/rpkid/tests/yamltest.py @@ -129,9 +129,7 @@ class router_cert(object): self.asn = rpki.resource_set.resource_set_as("".join(str(asn).split())) self.router_id = router_id self.keypair = rpki.x509.ECDSA.generate(self.ecparams()) - self.pkcs10 = rpki.x509.PKCS10.create( - keypair = self.keypair, - eku = (rpki.oids.id_kp_bgpsec_router,)) + self.pkcs10 = rpki.x509.PKCS10.create(keypair = self.keypair) self.gski = self.pkcs10.gSKI() def __eq__(self, other): |