Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loading X509 Certificates
#1
Hi,

I notice that  the certfile and keyfile properties for Indy SSL IO Handlers are looking for a path and I'm looking for a way to load X509 certs from a database without needing to create a temporary file to access the cert.
The cert and key are saved in the database as blobs.
Is it possible to load them directly from the database or are temp files the only way to go?

Thanks

Trevor
Reply
#2
(02-25-2021, 12:36 PM)Airmech Wrote: I notice that the certfile and keyfile properties for Indy SSL IO Handlers are looking for a path

Correct.

(02-25-2021, 12:36 PM)Airmech Wrote: I'm looking for a way to load X509 certs from a database without needing to create a temporary file to access the cert.

Indy does not currently support this. There is an open ticket to add support for loading certificates from memory:
#150: Support loading OpenSSL certificate/key data from user-defined storage.

(02-25-2021, 12:36 PM)Airmech Wrote: Is it possible to load them directly from the database

No, but with some work, it is possible to load them from memory, see: Can Indy load SSL certificates from memory?. But you won't be able to fully implement this without altering Indy's source code to invoke your custom code at the right time.

(02-25-2021, 12:36 PM)Airmech Wrote: or are temp files the only way to go?

Basically yes, if altering Indy's source code is not an option for you.

Reply
#3
Thanks Remy. I had a feeling that that was the case. I'll read the article you suggested and see where that takes me.

Cheers

Trevor
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)