0

I've succeeded with creating a new DSA_PrivateKey and Botan::PKCS8::PEM_encode to save to a .pem file. Now I need to save the PublicKey to a separate .pem also. Anybody know how to copy the DSA_PrivateKey to a DSA_PublicKey? I tried many different things none worked.. Shall appreciate this, thanks!

asic
  • 53
  • 10

1 Answers1

0

Figured this out, use:

Botan::DSA_PublicKey(DL_Group, privatekey->get_y()); 

then

keystring = Botan::X509::PEM_encode(pubkey); 
asic
  • 53
  • 10