![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(PowerBuilder) Duplicate openssl pkey -in private.pem -pubout -out pubkey.pemHow 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 Note: This example requires Chilkat v11.0.0 or greater.
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 |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.