Xbase++ Requires Chilkat v11.0.0+
Xbase++
Transition from Cert.ExportPublicKey to Cert.GetPublicKey
Provides instructions for replacing deprecated ExportPublicKey method calls with GetPublicKey.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oCert
LOCAL oPublickeyObj
LOCAL oPublickeyOut
nSuccess := 0
oCert := CreateObject("Chilkat.Cert")
// ------------------------------------------------------------------------
// The ExportPublicKey method is deprecated:
oPublickeyObj := oCert:ExportPublicKey()
IF (oCert:LastMethodSuccess == 0)
? oCert:LastErrorText
oCert:destroy()
RETURN
ENDIF
// ...
// ...
oPublickeyObj:destroy()
// ------------------------------------------------------------------------
// Do the equivalent using GetPublicKey.
// Your application creates a new, empty PublicKey object which is passed
// in the last argument and filled upon success.
oPublickeyOut := CreateObject("Chilkat.PublicKey")
nSuccess := oCert:GetPublicKey(oPublickeyOut)
IF (nSuccess == 0)
? oCert:LastErrorText
oCert:destroy()
oPublickeyOut:destroy()
RETURN
ENDIF
oCert:destroy()
oPublickeyOut:destroy()