unit Chilkat.Pem;

{
  Pascal wrapper for Chilkat Pem.
  Auto-generated by PascalWrapperGenerator -- do not edit manually.
}

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

interface

uses
  SysUtils,
  Chilkat.Base;

type

  { TPem wraps CkPem via the C bridge layer. }
  TPem = class(TChilkatBase)
  private
    function  GetLastErrorHtml: string;
    function  GetLastErrorText: string;
    function  GetLastErrorXml: string;
    function  GetVersion: string;
    function  GetDebugLogFilePath: string;
    procedure SetDebugLogFilePath(AValue: string);
    function  GetVerboseLogging: Boolean;
    procedure SetVerboseLogging(AValue: Boolean);
    function  GetLastMethodSuccess: Boolean;
    procedure SetLastMethodSuccess(AValue: Boolean);
    function  GetAppendMode: Boolean;
    procedure SetAppendMode(AValue: Boolean);
    function  GetHeartbeatMs: Integer;
    procedure SetHeartbeatMs(AValue: Integer);
    function  GetNumCerts: Integer;
    function  GetNumCsrs: Integer;
    function  GetNumPrivateKeys: Integer;
    function  GetNumPublicKeys: Integer;
    function  GetPrivateKeyFormat: string;
    procedure SetPrivateKeyFormat(AValue: string);
    function  GetPublicKeyFormat: string;
    procedure SetPublicKeyFormat(AValue: string);
    function  GetNumCrls: Integer;
  public
    constructor Create;
    destructor  Destroy; override;

    property LastErrorHtml: string read GetLastErrorHtml;
    property LastErrorText: string read GetLastErrorText;
    property LastErrorXml: string read GetLastErrorXml;
    property Version: string read GetVersion;
    property DebugLogFilePath: string read GetDebugLogFilePath write SetDebugLogFilePath;
    property VerboseLogging: Boolean read GetVerboseLogging write SetVerboseLogging;
    property LastMethodSuccess: Boolean read GetLastMethodSuccess write SetLastMethodSuccess;
    property AppendMode: Boolean read GetAppendMode write SetAppendMode;
    property HeartbeatMs: Integer read GetHeartbeatMs write SetHeartbeatMs;
    property NumCerts: Integer read GetNumCerts;
    property NumCsrs: Integer read GetNumCsrs;
    property NumPrivateKeys: Integer read GetNumPrivateKeys;
    property NumPublicKeys: Integer read GetNumPublicKeys;
    property PrivateKeyFormat: string read GetPrivateKeyFormat write SetPrivateKeyFormat;
    property PublicKeyFormat: string read GetPublicKeyFormat write SetPublicKeyFormat;
    property NumCrls: Integer read GetNumCrls;

    function  AddCert(cert: TChilkatBase; includeChain: Boolean): Boolean;
    function  AddPrivateKey(privateKey: TChilkatBase): Boolean;
    function  AddPrivateKey2(privKey: TChilkatBase; certChain: TChilkatBase): Boolean;
    function  AddPublicKey(pubkey: TChilkatBase): Boolean;
    function  Clear: Boolean;
    function  GetEncodedItem(const itemType: string; const itemSubType: string; const encoding: string; index: Integer): string;
    function  LoadP7bFile(const path: string): Boolean;
    function  LoadPem(const pemContent: string; const password: string): Boolean;
    function  LoadPemFile(const path: string; const password: string): Boolean;
    function  RemoveCert(index: Integer): Boolean;
    function  RemovePrivateKey(index: Integer): Boolean;
    function  ToPem: string;
    function  ToPemEx(extendedAttrs: Boolean; noKeys: Boolean; noCerts: Boolean; noCaCerts: Boolean; const encryptAlg: string; const password: string): string;
    function  AddItem(const itemType: string; const encoding: string; const itemData: string): Boolean;
    function  CertAt(index: Integer; cert: TChilkatBase): Boolean;
    function  PrivateKeyAt(index: Integer; privKey: TChilkatBase): Boolean;
    function  PublicKeyAt(index: Integer; pubKey: TChilkatBase): Boolean;
    function  ToJksObj(const alias: string; const password: string; jksObj: TChilkatBase): Boolean;
    function  ToPfxObj(pfxObj: TChilkatBase): Boolean;
    function  AddP7b(bd: TChilkatBase): Boolean;
  end;

implementation

uses
  CkDllLoader,
  Chilkat.Utils;

{ ---- C bridge function pointer types ---- }
type
  TCkPem_Create  = function(): Pointer; cdecl;
  TCkPem_Dispose = procedure(handle: Pointer); cdecl;
  TCkPem_get_LastErrorHtml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_get_LastErrorText = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_get_LastErrorXml = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_get_Version = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_get_DebugLogFilePath = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_put_DebugLogFilePath = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkPem_get_VerboseLogging = function(handle: Pointer): LongBool; cdecl;
  TCkPem_put_VerboseLogging = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkPem_get_LastMethodSuccess = function(handle: Pointer): LongBool; cdecl;
  TCkPem_put_LastMethodSuccess = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkPem_get_AppendMode = function(handle: Pointer): LongBool; cdecl;
  TCkPem_put_AppendMode = procedure(handle: Pointer; value: LongBool); cdecl;
  TCkPem_get_HeartbeatMs = function(handle: Pointer): Integer; cdecl;
  TCkPem_put_HeartbeatMs = procedure(handle: Pointer; value: Integer); cdecl;
  TCkPem_get_NumCerts = function(handle: Pointer): Integer; cdecl;
  TCkPem_get_NumCsrs = function(handle: Pointer): Integer; cdecl;
  TCkPem_get_NumPrivateKeys = function(handle: Pointer): Integer; cdecl;
  TCkPem_get_NumPublicKeys = function(handle: Pointer): Integer; cdecl;
  TCkPem_get_PrivateKeyFormat = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_put_PrivateKeyFormat = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkPem_get_PublicKeyFormat = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_put_PublicKeyFormat = procedure(handle: Pointer; value: PAnsiChar); cdecl;
  TCkPem_get_NumCrls = function(handle: Pointer): Integer; cdecl;
  TCkPem_AddCert = function(handle: Pointer; cert: Pointer; includeChain: LongBool): LongBool; cdecl;
  TCkPem_AddPrivateKey = function(handle: Pointer; privateKey: Pointer): LongBool; cdecl;
  TCkPem_AddPrivateKey2 = function(handle: Pointer; privKey: Pointer; certChain: Pointer): LongBool; cdecl;
  TCkPem_AddPublicKey = function(handle: Pointer; pubkey: Pointer): LongBool; cdecl;
  TCkPem_Clear = function(handle: Pointer): LongBool; cdecl;
  TCkPem_GetEncodedItem = function(handle: Pointer; itemType: PAnsiChar; itemSubType: PAnsiChar; encoding: PAnsiChar; index: Integer): PAnsiChar; cdecl;
  TCkPem_LoadP7bFile = function(handle: Pointer; path: PAnsiChar): LongBool; cdecl;
  TCkPem_LoadPem = function(handle: Pointer; pemContent: PAnsiChar; password: PAnsiChar): LongBool; cdecl;
  TCkPem_LoadPemFile = function(handle: Pointer; path: PAnsiChar; password: PAnsiChar): LongBool; cdecl;
  TCkPem_RemoveCert = function(handle: Pointer; index: Integer): LongBool; cdecl;
  TCkPem_RemovePrivateKey = function(handle: Pointer; index: Integer): LongBool; cdecl;
  TCkPem_ToPem = function(handle: Pointer): PAnsiChar; cdecl;
  TCkPem_ToPemEx = function(handle: Pointer; extendedAttrs: LongBool; noKeys: LongBool; noCerts: LongBool; noCaCerts: LongBool; encryptAlg: PAnsiChar; password: PAnsiChar): PAnsiChar; cdecl;
  TCkPem_AddItem = function(handle: Pointer; itemType: PAnsiChar; encoding: PAnsiChar; itemData: PAnsiChar): LongBool; cdecl;
  TCkPem_CertAt = function(handle: Pointer; index: Integer; cert: Pointer): LongBool; cdecl;
  TCkPem_PrivateKeyAt = function(handle: Pointer; index: Integer; privKey: Pointer): LongBool; cdecl;
  TCkPem_PublicKeyAt = function(handle: Pointer; index: Integer; pubKey: Pointer): LongBool; cdecl;
  TCkPem_ToJksObj = function(handle: Pointer; alias: PAnsiChar; password: PAnsiChar; jksObj: Pointer): LongBool; cdecl;
  TCkPem_ToPfxObj = function(handle: Pointer; pfxObj: Pointer): LongBool; cdecl;
  TCkPem_AddP7b = function(handle: Pointer; bd: Pointer): LongBool; cdecl;

{ ---- C bridge function pointer variables ---- }
var
  CkPem_Create:  TCkPem_Create  = nil;
  CkPem_Dispose: TCkPem_Dispose = nil;
  CkPem_get_LastErrorHtml: TCkPem_get_LastErrorHtml = nil;
  CkPem_get_LastErrorText: TCkPem_get_LastErrorText = nil;
  CkPem_get_LastErrorXml: TCkPem_get_LastErrorXml = nil;
  CkPem_get_Version: TCkPem_get_Version = nil;
  CkPem_get_DebugLogFilePath: TCkPem_get_DebugLogFilePath = nil;
  CkPem_put_DebugLogFilePath: TCkPem_put_DebugLogFilePath = nil;
  CkPem_get_VerboseLogging: TCkPem_get_VerboseLogging = nil;
  CkPem_put_VerboseLogging: TCkPem_put_VerboseLogging = nil;
  CkPem_get_LastMethodSuccess: TCkPem_get_LastMethodSuccess = nil;
  CkPem_put_LastMethodSuccess: TCkPem_put_LastMethodSuccess = nil;
  CkPem_get_AppendMode: TCkPem_get_AppendMode = nil;
  CkPem_put_AppendMode: TCkPem_put_AppendMode = nil;
  CkPem_get_HeartbeatMs: TCkPem_get_HeartbeatMs = nil;
  CkPem_put_HeartbeatMs: TCkPem_put_HeartbeatMs = nil;
  CkPem_get_NumCerts: TCkPem_get_NumCerts = nil;
  CkPem_get_NumCsrs: TCkPem_get_NumCsrs = nil;
  CkPem_get_NumPrivateKeys: TCkPem_get_NumPrivateKeys = nil;
  CkPem_get_NumPublicKeys: TCkPem_get_NumPublicKeys = nil;
  CkPem_get_PrivateKeyFormat: TCkPem_get_PrivateKeyFormat = nil;
  CkPem_put_PrivateKeyFormat: TCkPem_put_PrivateKeyFormat = nil;
  CkPem_get_PublicKeyFormat: TCkPem_get_PublicKeyFormat = nil;
  CkPem_put_PublicKeyFormat: TCkPem_put_PublicKeyFormat = nil;
  CkPem_get_NumCrls: TCkPem_get_NumCrls = nil;
  CkPem_AddCert: TCkPem_AddCert = nil;
  CkPem_AddPrivateKey: TCkPem_AddPrivateKey = nil;
  CkPem_AddPrivateKey2: TCkPem_AddPrivateKey2 = nil;
  CkPem_AddPublicKey: TCkPem_AddPublicKey = nil;
  CkPem_Clear: TCkPem_Clear = nil;
  CkPem_GetEncodedItem: TCkPem_GetEncodedItem = nil;
  CkPem_LoadP7bFile: TCkPem_LoadP7bFile = nil;
  CkPem_LoadPem: TCkPem_LoadPem = nil;
  CkPem_LoadPemFile: TCkPem_LoadPemFile = nil;
  CkPem_RemoveCert: TCkPem_RemoveCert = nil;
  CkPem_RemovePrivateKey: TCkPem_RemovePrivateKey = nil;
  CkPem_ToPem: TCkPem_ToPem = nil;
  CkPem_ToPemEx: TCkPem_ToPemEx = nil;
  CkPem_AddItem: TCkPem_AddItem = nil;
  CkPem_CertAt: TCkPem_CertAt = nil;
  CkPem_PrivateKeyAt: TCkPem_PrivateKeyAt = nil;
  CkPem_PublicKeyAt: TCkPem_PublicKeyAt = nil;
  CkPem_ToJksObj: TCkPem_ToJksObj = nil;
  CkPem_ToPfxObj: TCkPem_ToPfxObj = nil;
  CkPem_AddP7b: TCkPem_AddP7b = nil;

constructor TPem.Create;
begin
  inherited Create;
  FHandle := CkPem_Create();
end;

destructor TPem.Destroy;
begin
  if FHandle <> nil then
    CkPem_Dispose(FHandle);
  FHandle := nil;
  inherited;
end;

function TPem.GetLastErrorHtml: string;
begin
  Result := CkToStr(CkPem_get_LastErrorHtml(FHandle));
end;

function TPem.GetLastErrorText: string;
begin
  Result := CkToStr(CkPem_get_LastErrorText(FHandle));
end;

function TPem.GetLastErrorXml: string;
begin
  Result := CkToStr(CkPem_get_LastErrorXml(FHandle));
end;

function TPem.GetVersion: string;
begin
  Result := CkToStr(CkPem_get_Version(FHandle));
end;

function TPem.GetDebugLogFilePath: string;
begin
  Result := CkToStr(CkPem_get_DebugLogFilePath(FHandle));
end;

procedure TPem.SetDebugLogFilePath(AValue: string);
begin
  CkPem_put_DebugLogFilePath(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TPem.GetVerboseLogging: Boolean;
begin
  Result := Boolean(CkPem_get_VerboseLogging(FHandle));
end;

procedure TPem.SetVerboseLogging(AValue: Boolean);
begin
  CkPem_put_VerboseLogging(FHandle, LongBool(AValue));
end;

function TPem.GetLastMethodSuccess: Boolean;
begin
  Result := Boolean(CkPem_get_LastMethodSuccess(FHandle));
end;

procedure TPem.SetLastMethodSuccess(AValue: Boolean);
begin
  CkPem_put_LastMethodSuccess(FHandle, LongBool(AValue));
end;

function TPem.GetAppendMode: Boolean;
begin
  Result := Boolean(CkPem_get_AppendMode(FHandle));
end;

procedure TPem.SetAppendMode(AValue: Boolean);
begin
  CkPem_put_AppendMode(FHandle, LongBool(AValue));
end;

function TPem.GetHeartbeatMs: Integer;
begin
  Result := CkPem_get_HeartbeatMs(FHandle);
end;

procedure TPem.SetHeartbeatMs(AValue: Integer);
begin
  CkPem_put_HeartbeatMs(FHandle, AValue);
end;

function TPem.GetNumCerts: Integer;
begin
  Result := CkPem_get_NumCerts(FHandle);
end;

function TPem.GetNumCsrs: Integer;
begin
  Result := CkPem_get_NumCsrs(FHandle);
end;

function TPem.GetNumPrivateKeys: Integer;
begin
  Result := CkPem_get_NumPrivateKeys(FHandle);
end;

function TPem.GetNumPublicKeys: Integer;
begin
  Result := CkPem_get_NumPublicKeys(FHandle);
end;

function TPem.GetPrivateKeyFormat: string;
begin
  Result := CkToStr(CkPem_get_PrivateKeyFormat(FHandle));
end;

procedure TPem.SetPrivateKeyFormat(AValue: string);
begin
  CkPem_put_PrivateKeyFormat(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TPem.GetPublicKeyFormat: string;
begin
  Result := CkToStr(CkPem_get_PublicKeyFormat(FHandle));
end;

procedure TPem.SetPublicKeyFormat(AValue: string);
begin
  CkPem_put_PublicKeyFormat(FHandle, PAnsiChar(StrToCk(AValue)));
end;

function TPem.GetNumCrls: Integer;
begin
  Result := CkPem_get_NumCrls(FHandle);
end;

function TPem.AddCert(cert: TChilkatBase; includeChain: Boolean): Boolean;
begin
  Result := Boolean(CkPem_AddCert(FHandle, cert.Handle, LongBool(includeChain)));
end;

function TPem.AddPrivateKey(privateKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_AddPrivateKey(FHandle, privateKey.Handle));
end;

function TPem.AddPrivateKey2(privKey: TChilkatBase; certChain: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_AddPrivateKey2(FHandle, privKey.Handle, certChain.Handle));
end;

function TPem.AddPublicKey(pubkey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_AddPublicKey(FHandle, pubkey.Handle));
end;

function TPem.Clear: Boolean;
begin
  Result := Boolean(CkPem_Clear(FHandle));
end;

function TPem.GetEncodedItem(const itemType: string; const itemSubType: string; const encoding: string; index: Integer): string;
begin
  Result := CkToStr(CkPem_GetEncodedItem(FHandle, PAnsiChar(StrToCk(itemType)), PAnsiChar(StrToCk(itemSubType)), PAnsiChar(StrToCk(encoding)), index));
end;

function TPem.LoadP7bFile(const path: string): Boolean;
begin
  Result := Boolean(CkPem_LoadP7bFile(FHandle, PAnsiChar(StrToCk(path))));
end;

function TPem.LoadPem(const pemContent: string; const password: string): Boolean;
begin
  Result := Boolean(CkPem_LoadPem(FHandle, PAnsiChar(StrToCk(pemContent)), PAnsiChar(StrToCk(password))));
end;

function TPem.LoadPemFile(const path: string; const password: string): Boolean;
begin
  Result := Boolean(CkPem_LoadPemFile(FHandle, PAnsiChar(StrToCk(path)), PAnsiChar(StrToCk(password))));
end;

function TPem.RemoveCert(index: Integer): Boolean;
begin
  Result := Boolean(CkPem_RemoveCert(FHandle, index));
end;

function TPem.RemovePrivateKey(index: Integer): Boolean;
begin
  Result := Boolean(CkPem_RemovePrivateKey(FHandle, index));
end;

function TPem.ToPem: string;
begin
  Result := CkToStr(CkPem_ToPem(FHandle));
end;

function TPem.ToPemEx(extendedAttrs: Boolean; noKeys: Boolean; noCerts: Boolean; noCaCerts: Boolean; const encryptAlg: string; const password: string): string;
begin
  Result := CkToStr(CkPem_ToPemEx(FHandle, LongBool(extendedAttrs), LongBool(noKeys), LongBool(noCerts), LongBool(noCaCerts), PAnsiChar(StrToCk(encryptAlg)), PAnsiChar(StrToCk(password))));
end;

function TPem.AddItem(const itemType: string; const encoding: string; const itemData: string): Boolean;
begin
  Result := Boolean(CkPem_AddItem(FHandle, PAnsiChar(StrToCk(itemType)), PAnsiChar(StrToCk(encoding)), PAnsiChar(StrToCk(itemData))));
end;

function TPem.CertAt(index: Integer; cert: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_CertAt(FHandle, index, cert.Handle));
end;

function TPem.PrivateKeyAt(index: Integer; privKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_PrivateKeyAt(FHandle, index, privKey.Handle));
end;

function TPem.PublicKeyAt(index: Integer; pubKey: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_PublicKeyAt(FHandle, index, pubKey.Handle));
end;

function TPem.ToJksObj(const alias: string; const password: string; jksObj: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_ToJksObj(FHandle, PAnsiChar(StrToCk(alias)), PAnsiChar(StrToCk(password)), jksObj.Handle));
end;

function TPem.ToPfxObj(pfxObj: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_ToPfxObj(FHandle, pfxObj.Handle));
end;

function TPem.AddP7b(bd: TChilkatBase): Boolean;
begin
  Result := Boolean(CkPem_AddP7b(FHandle, bd.Handle));
end;

initialization
  Chilkat_GetProcedureAddress(CkPem_Create,  'CkPem_Create');
  Chilkat_GetProcedureAddress(CkPem_Dispose, 'CkPem_Dispose');
  Chilkat_GetProcedureAddress(CkPem_get_LastErrorHtml, 'CkPem_get_LastErrorHtml');
  Chilkat_GetProcedureAddress(CkPem_get_LastErrorText, 'CkPem_get_LastErrorText');
  Chilkat_GetProcedureAddress(CkPem_get_LastErrorXml, 'CkPem_get_LastErrorXml');
  Chilkat_GetProcedureAddress(CkPem_get_Version, 'CkPem_get_Version');
  Chilkat_GetProcedureAddress(CkPem_get_DebugLogFilePath, 'CkPem_get_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkPem_put_DebugLogFilePath, 'CkPem_put_DebugLogFilePath');
  Chilkat_GetProcedureAddress(CkPem_get_VerboseLogging, 'CkPem_get_VerboseLogging');
  Chilkat_GetProcedureAddress(CkPem_put_VerboseLogging, 'CkPem_put_VerboseLogging');
  Chilkat_GetProcedureAddress(CkPem_get_LastMethodSuccess, 'CkPem_get_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkPem_put_LastMethodSuccess, 'CkPem_put_LastMethodSuccess');
  Chilkat_GetProcedureAddress(CkPem_get_AppendMode, 'CkPem_get_AppendMode');
  Chilkat_GetProcedureAddress(CkPem_put_AppendMode, 'CkPem_put_AppendMode');
  Chilkat_GetProcedureAddress(CkPem_get_HeartbeatMs, 'CkPem_get_HeartbeatMs');
  Chilkat_GetProcedureAddress(CkPem_put_HeartbeatMs, 'CkPem_put_HeartbeatMs');
  Chilkat_GetProcedureAddress(CkPem_get_NumCerts, 'CkPem_get_NumCerts');
  Chilkat_GetProcedureAddress(CkPem_get_NumCsrs, 'CkPem_get_NumCsrs');
  Chilkat_GetProcedureAddress(CkPem_get_NumPrivateKeys, 'CkPem_get_NumPrivateKeys');
  Chilkat_GetProcedureAddress(CkPem_get_NumPublicKeys, 'CkPem_get_NumPublicKeys');
  Chilkat_GetProcedureAddress(CkPem_get_PrivateKeyFormat, 'CkPem_get_PrivateKeyFormat');
  Chilkat_GetProcedureAddress(CkPem_put_PrivateKeyFormat, 'CkPem_put_PrivateKeyFormat');
  Chilkat_GetProcedureAddress(CkPem_get_PublicKeyFormat, 'CkPem_get_PublicKeyFormat');
  Chilkat_GetProcedureAddress(CkPem_put_PublicKeyFormat, 'CkPem_put_PublicKeyFormat');
  Chilkat_GetProcedureAddress(CkPem_get_NumCrls, 'CkPem_get_NumCrls');
  Chilkat_GetProcedureAddress(CkPem_AddCert, 'CkPem_AddCert');
  Chilkat_GetProcedureAddress(CkPem_AddPrivateKey, 'CkPem_AddPrivateKey');
  Chilkat_GetProcedureAddress(CkPem_AddPrivateKey2, 'CkPem_AddPrivateKey2');
  Chilkat_GetProcedureAddress(CkPem_AddPublicKey, 'CkPem_AddPublicKey');
  Chilkat_GetProcedureAddress(CkPem_Clear, 'CkPem_Clear');
  Chilkat_GetProcedureAddress(CkPem_GetEncodedItem, 'CkPem_GetEncodedItem');
  Chilkat_GetProcedureAddress(CkPem_LoadP7bFile, 'CkPem_LoadP7bFile');
  Chilkat_GetProcedureAddress(CkPem_LoadPem, 'CkPem_LoadPem');
  Chilkat_GetProcedureAddress(CkPem_LoadPemFile, 'CkPem_LoadPemFile');
  Chilkat_GetProcedureAddress(CkPem_RemoveCert, 'CkPem_RemoveCert');
  Chilkat_GetProcedureAddress(CkPem_RemovePrivateKey, 'CkPem_RemovePrivateKey');
  Chilkat_GetProcedureAddress(CkPem_ToPem, 'CkPem_ToPem');
  Chilkat_GetProcedureAddress(CkPem_ToPemEx, 'CkPem_ToPemEx');
  Chilkat_GetProcedureAddress(CkPem_AddItem, 'CkPem_AddItem');
  Chilkat_GetProcedureAddress(CkPem_CertAt, 'CkPem_CertAt');
  Chilkat_GetProcedureAddress(CkPem_PrivateKeyAt, 'CkPem_PrivateKeyAt');
  Chilkat_GetProcedureAddress(CkPem_PublicKeyAt, 'CkPem_PublicKeyAt');
  Chilkat_GetProcedureAddress(CkPem_ToJksObj, 'CkPem_ToJksObj');
  Chilkat_GetProcedureAddress(CkPem_ToPfxObj, 'CkPem_ToPfxObj');
  Chilkat_GetProcedureAddress(CkPem_AddP7b, 'CkPem_AddP7b');

end.
