Atozed Forums
Loading X509 Certificates - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Indy (https://www.atozed.com/forums/forum-8.html)
+--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html)
+--- Thread: Loading X509 Certificates (/thread-2302.html)



Loading X509 Certificates - Airmech - 02-25-2021

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


RE: Loading X509 Certificates - rlebeau - 02-25-2021

(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.


RE: Loading X509 Certificates - Airmech - 02-26-2021

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