Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Indy TCPServer/TCPClient
#10
(05-17-2018, 08:21 AM)wzehntner Wrote: I can successfully display Certificate.FingerprintAsString, Certificate.Issuer.OneLine and other properties (in my OnVerifyPeer-Event)
but did not succeed in showing the public key (in my case RSA 2048 bits)
We do not supply OpenSSL.exe to our customers, we only supply our Client-application together with libeay32.dll and ssleay32.dll
I am a bit confused what you mean with "query manually from OpenSSL ..."

As I said, not everything in an OpenSSL certificate is exposed by Indy in nice property wrappers.  In the case of the public key, try accessing the TIdX509.Certificate.cert_info.key field.

But, to be safer, you really should be using OpenSSL functions that are designed to access that data for you.  See this discussion:

X509* and Extract Public Key?

Indy does have a definition for the X509_PUBKEY record, but it does not import any of the X509 functions mentioned in that discussion.  You would have to import those functions yourself from the OpenSSL DLLs. But, you can get the required X509 record pointer from Indy's TIdX509.Certificate property, at least.

Reply


Messages In This Thread
Indy TCPServer/TCPClient - by wzehntner - 05-03-2018, 02:44 PM
RE: Indy TCPServer/TCPClient - by rlebeau - 05-03-2018, 07:32 PM
RE: Indy TCPServer/TCPClient - by wzehntner - 05-04-2018, 08:53 AM
RE: Indy TCPServer/TCPClient - by rlebeau - 05-07-2018, 06:30 PM
RE: Indy TCPServer/TCPClient - by wzehntner - 05-14-2018, 07:11 AM
RE: Indy TCPServer/TCPClient - by rlebeau - 05-14-2018, 06:27 PM
RE: Indy TCPServer/TCPClient - by wzehntner - 05-17-2018, 08:21 AM
RE: Indy TCPServer/TCPClient - by rlebeau - 05-17-2018, 06:48 PM
RE: Indy TCPServer/TCPClient - by morhous - 05-14-2018, 07:58 AM
RE: Indy TCPServer/TCPClient - by kudzu - 05-14-2018, 02:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)