Open
Description
Two options come to mind:
- Using
/dev/shm/$some_path
if the plugin is running in a GNU/Linux environment with a mountedtmpfs
as the S/MIME$infile
. This would not be portable to, for example, Windows-based servers. We could auto-detect our environment and simply perform the optimization if possible, falling back to the existing implementation if it is not. - Using
php://memory
orphp://temp
streams and manually constructing the PKCS#7 formatted S/MIME message from strings instead of usingopenssl_pkcs7_encrypt()
, since that function requires file paths. This would be more work but will also be more portable across operating systems.