]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Copy subject from CSR to certificate
authorJouni Malinen <jouni@codeaurora.org>
Thu, 18 Jun 2020 21:36:44 +0000 (00:36 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 18 Jun 2020 21:36:44 +0000 (00:36 +0300)
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>
tests/hwsim/test_dpp.py

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