login about faq

Using PublicKey metode:

loo_PubKey2.LoadFromFile('C:\Temp\abc.pem')

loo_PubKey2.LastErrorText

return this:

ChilkatLog:
  LoadFromFile(16ms):
    DllDate: Jun 13 2016
    ChilkatVersion: 9.5.0.58
    UnlockPrefix: Anything for 30-day trial
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 1
    loadAnyFormat(16ms):
      loadPem(16ms):
        loadPem2(16ms):
          loadPem(16ms):
            itemType: CERTIFICATE
            addPemItem(16ms):
              itemType: CERTIFICATE
              addCertificate(16ms):
                addCertificate(16ms):
                  certHashEntryB: 356E5DB89EF1B6F9B0779A8E6E64DD96:Certum Level IV CA
                  skiHashKey: SubjectKeyId:5xONbbkk+qlL44K12GhP7G2zxsI=
                --addCertificate
              --addCertificate
            --addPemItem
            No more -----BEGIN's found.
          --loadPem
        --loadPem2
      --loadPem
    --loadAnyFormat
    Failed.
  --LoadFromFile
--ChilkatLog

the file C:\Temp\abc.pem is good.

asked Jul 20 at 08:04

3550's gravatar image

3550
112

edited Jul 20 at 08:35


It seems you have a certificate, not a public key. Load the Certificate PEM into Chilkat.Cert object, and then call the cert object's method to get the public key. (Consult the online reference documentation..)

link

answered Jul 20 at 10:57

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

thanks for the tip, this is code in PowerBuilder:

oleobject loo_Cert
oleobject loo_PublicKey

string ls_PubKey_xml

loo_Cert = create oleobject
loo_PublicKey = create oleobject

loo_Cert.ConnectToNewObject("Chilkat_9_5_0.Cert")
loo_PublicKey.ConnectToNewObject("Chilkat_9_5_0.PublicKey")

loo_Cert.LoadFromFile('C:\temp\abc.pem')  //Set path to pem & load to Cert Obj
loo_PublicKey = loo_Cert.ExportPublicKey()//Export Public Key from Cert to PublicKey obj 
ls_PubKey_xml = loo_PublicKey.GetXml()    //get xml
//
link

answered Jul 21 at 03:35

3550's gravatar image

3550
112

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×6

Asked: Jul 20 at 08:04

Seen: 200 times

Last updated: Jul 21 at 03:35

powered by OSQA