diff options
author | Rob Austein <sra@hactrn.net> | 2014-02-25 20:46:05 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-02-25 20:46:05 +0000 |
commit | de95fb9525bf5f1ced2fb90924b31b78494e1e87 (patch) | |
tree | 7c529a242b334e38a0d78761a0dfad12c452bfcf /rpkid/tests/smoketest.py | |
parent | bf0b63854ec52df692a503eb78e270363f31ebfd (diff) |
Something broke MySQLdb on my laptop during a recent upgrade, and I
have better things to do than shaving that particular yak today. So
I'm committing untested changes (to a development branch that nobody
but me is using) so I can test them on a working development platform.
svn path=/branches/tk671/; revision=5682
Diffstat (limited to 'rpkid/tests/smoketest.py')
-rw-r--r-- | rpkid/tests/smoketest.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/rpkid/tests/smoketest.py b/rpkid/tests/smoketest.py index b81117ae..1d9e600a 100644 --- a/rpkid/tests/smoketest.py +++ b/rpkid/tests/smoketest.py @@ -396,20 +396,20 @@ class router_cert(object): self.keypair = rpki.x509.ECDSA.generate(self.ecparams()) self.pkcs10 = rpki.x509.PKCS10.create( keypair = self.keypair, - cn = "ROUTER-%d" % self.asn[0].min, - sn = self.router_id, eku = (rpki.oids.id_kp_bgpsec_router,)) self.gski = self.pkcs10.gSKI() + self.cn = "ROUTER-%08x" % self.asn[0].min + self.sn = "%08x" % self.router_id def __eq__(self, other): - return self.asn == other.asn and self.router_id == other.router_id and self.gski == other.gski + return self.asn == other.asn and self.sn == other.sn and self.gski == other.gski def __hash__(self): v6 = tuple(self.v6) if self.v6 is not None else None - return tuple(self.asn).__hash__() + router_id.__hash__() + self.gski.__hash__() + return tuple(self.asn).__hash__() + sn.__hash__() + self.gski.__hash__() def __str__(self): - return "%s: %s: %s" % (self.asn, self.router_id, self.gski) + return "%s: %s: %s" % (self.asn, self.cn, self.sn, self.gski) @classmethod def parse(cls, yaml): @@ -817,9 +817,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, router_id, valid_until) " - "VALUES (%s, %s, %s, %s, %s)", - (s.name, r.pkcs10.get_DER(), r.gski, r.router_id, s.resources.valid_until)) + 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)) 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)) |