When passing the certificate path to SSL_use_certificate_file
It returns an error Input/Output error. I think this error has to do with C++/WinRT limiting permission on file systems. The framework forces you to access the file through the StorageFile library, While OPENSSL probably uses ofstream
to read the certificate file contents.
Is there another function or work around of calling SSL_use_certificate_file
without getting the Input/Output Error
This is the file permission limitation for UWP apps. OpenSSL is a third-party library, and it seems that it is using .NET API to access the file which is not allowed in UWP apps. Just talk from the UWP side, if you have to use OpenSSL to get you want, a solution for this scenario is that you might need to use Desktop Bridge.
You may check Stefan Wick's blog for more details here: UWP with Desktop Extension – Part 3.