Skip to content

Commit

Permalink
Remove serialization of pfx (#2721) (#2746)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuan-Ting Hsieh (謝沅廷) <[email protected]>
  • Loading branch information
IsaacYangSLA and YuanTingHsieh authored Jul 31, 2024
1 parent 3fdf4c1 commit 9d3e016
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions nvflare/lighter/impl/cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ def _build_write_cert_pair(self, participant, base_name, ctx):
with open(os.path.join(dest_dir, "server.key"), "wb") as f:
f.write(serialize_pri_key(tmp_pri_key))

pkcs12 = serialization.pkcs12.serialize_key_and_certificates(
subject.encode("ascii"), pri_key, cert, None, serialization.BestAvailableEncryption(subject.encode("ascii"))
)
with open(os.path.join(dest_dir, f"{base_name}.pfx"), "wb") as f:
f.write(pkcs12)
with open(os.path.join(dest_dir, "rootCA.pem"), "wb") as f:
f.write(self.serialized_cert)

Expand Down

0 comments on commit 9d3e016

Please sign in to comment.