PowerBuilder
PowerBuilder
Duplicate openssl pkey -in private.pem -pubout -out pubkey.pem
See more OpenSSL Examples
How to output the public part of a private key: Demonstrates how to duplicate this OpenSSL command:openssl pkey -in private.pem -pubout -out pubkey.pem
Chilkat PowerBuilder Downloads
integer li_rc
integer li_Success
oleobject loo_Pkey
oleobject loo_PubKey
li_Success = 0
loo_Pkey = create oleobject
li_rc = loo_Pkey.ConnectToNewObject("Chilkat.PrivateKey")
if li_rc < 0 then
destroy loo_Pkey
MessageBox("Error","Connecting to COM object failed")
return
end if
// Load the private key from an PEM file:
li_Success = loo_Pkey.LoadPemFile("private.pem")
if li_Success = 0 then
Write-Debug loo_Pkey.LastErrorText
destroy loo_Pkey
return
end if
loo_PubKey = create oleobject
li_rc = loo_PubKey.ConnectToNewObject("Chilkat.PublicKey")
loo_Pkey.ToPublicKey(loo_PubKey)
li_Success = loo_PubKey.SavePemFile(0,"pubKey.pem")
if li_Success <> 1 then
Write-Debug loo_PubKey.LastErrorText
destroy loo_PubKey
destroy loo_Pkey
destroy loo_PubKey
return
end if
Write-Debug "Success."
destroy loo_Pkey
destroy loo_PubKey