Sample code for 30+ languages & platforms
Xojo Plugin

Get JSON Details from the Last PFX Operation

See more PFX/P12 Examples

Demonstrates Pfx.GetLastJsonData, which replaces the contents of a JsonObject with structured JSON information from the most recent operation.

The file path is relative to the application's current working directory. An absolute path may also be used. Supply the path appropriate to your own environment.

Tip: Code to parse the returned JSON can be generated with Chilkat's online tool at https://tools.chilkat.io/jsonParse.

Background. The data is copied as a complete replacement and is never merged with existing members. The exact members depend on the operation that produced them.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim success As Boolean
success = False

Dim pfx As New Chilkat.Pfx

//  The file path is relative to the application's current working directory.  An absolute path
//  may also be used.  Supply the path appropriate to your own environment.
//  The PFX password should come from a secure source rather than being hard-coded.
Dim password As String
password = "myPfxPassword"
success = pfx.LoadPfxFile("qa_data/identity.pfx",password)
If (success = False) Then
    System.DebugLog(pfx.LastErrorText)
    Return
End If

//  Copy structured JSON information from the most recent operation into a JsonObject.  The contents
//  entirely replace anything already in the object.
Dim json As New Chilkat.JsonObject
pfx.GetLastJsonData json

json.EmitCompact = False
Dim jsonStr As String
jsonStr = json.Emit()
System.DebugLog(jsonStr)
//  JSON parsing code for this result can be generated at Chilkat's online tool:
//  https://tools.chilkat.io/jsonParse