I am dealing with some p12 certificates that I need to parse and pass to the python requests module. As they cannot take a p12 directly, I am using pyopenssl to parse them into certificates and keys.
But because requests cert parameter cannot accept anothing other than a path to a file ( see reference 1 ), I need to write these decrypted values to disk.
This got me thinking. Is there some way for a ring 3 ( user land ) application to create an encrypted memory block ( be it in memory or on disk ) and lay down a fileystem that is solely accessible to the application, for it to write temporary files to. Theoretically this is possible, however I was just curious if anyone knew of any existing software/librariers/modules that could achieve this.
reference 1: How to open ssl socket using certificate stored in string variables in python