tests: Copy subject from CSR to certificate

Instead of overriding the subject field with something arbitrary, use
the value that is included in the CSR now that there is something there.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-06-19 00:36:44 +03:00 committed by Jouni Malinen
parent a758a66725
commit 1046145093

View file

@ -5628,8 +5628,7 @@ def dpp_sign_cert(cacert, cakey, csr_der):
cert.gmtime_adj_notBefore(-10) cert.gmtime_adj_notBefore(-10)
cert.gmtime_adj_notAfter(100000) cert.gmtime_adj_notAfter(100000)
cert.set_pubkey(csr.get_pubkey()) cert.set_pubkey(csr.get_pubkey())
dn = cert.get_subject() dn = csr.get_subject()
dn.CN = "dpp-tls-test"
cert.set_subject(dn) cert.set_subject(dn)
cert.set_version(2) cert.set_version(2)
cert.add_extensions([ cert.add_extensions([