2

I have to port OpenSSL to winRT(windows 8 metro on x86 not ARM), so i am planning to start with compiling for WinRt. I have downloaded the source code from http://www.openssl.org/source/

In the source code i see some OS specific folders like MacOS, OS2 and there is ms folder as well, but i dont see any visual studio projects. whatever i have read so far about compiling OpesSSL talks about makefiles and mingw ,but i am not very comfortable with makefiles and moreover not sure whether cygwin and perl will be supported in windows 8. So i am looking for some ideas on how to compile OpenSSL on windows 8 using visual studio. Please share your knowledge or point me to a direction which can help me in doing this. Thanks a lot

1
  • 1
    With Visual Studio 2013 Update 3, Microsoft has enabled WinSock and OpenSSL for Windows Phone and Windows Store apps. You can use WinSock APIs and hence many popular OSS libraries such as OpenSSL More about it here - blogs.windows.com/buildingapps/2014/10/13/…
    – coderpro
    Oct 14, 2014 at 22:00

3 Answers 3

2

The solution for SSL encryption in metro style works well. But if you are not connecting to a web service there are some disadvantages:
- you can not control the parameters of the SSL handshake (like cyphers, verification of server certificate)
- not possible to present user certificate to authenticate the client to the server
- dependent on Microsoft for upgrades of SSL stack new encryptions etc.

There are some people working on porting openssl to windows runtime. See http://openssl.6102.n7.nabble.com/winrt-random-td42100.html
It means that you only configure and build openssl without winsock support (only memory BIO) and replace some not supported functions.

So it is possible to do it but is not yet supported out of the box and quite some work compared to the built-in solution. But if you want to port some software already using openssl this could be a solution.

2

OpenSSL will build under Windows 8 for desktop mode only. Metro/WinRT no longer provides Winsock (or API compatible alternatives), so you will not be able to compile directly for WinRT.

2
  • yes i will not be able to compile directly as there is no winsock as you mentioned, i will have to find a replacement of winsock .. may be by using streamsocket. i was more intrested in knowing what files to include in visual studio project. if i read the makefile nt32dll.mak there are tons of file, do i really need to include all those.
    – Avijeet
    Jul 30, 2012 at 4:58
  • With Visual Studio 2013 Update 3, Microsoft has enabled WinSock and OpenSSL for Windows Phone and Windows Store apps. You can use WinSock APIs and hence many popular OSS libraries such as libcURL, libwebsockets, OpenSSL etc. More about it here - blogs.windows.com/buildingapps/2014/10/13/…
    – coderpro
    Oct 14, 2014 at 22:02
1

Why would you like to use OpenSSL in WinRT??

If you use it only for security purpose then you can omit it inmetro style WinRT. Because WinRT itself provide security for socket programming in metro style like

//0: A plain socket with no encryption.
socket->ConnectAsync(hostname, serviceName, SocketProtectionLevel::PlainSocket);

//1: A socket that must use the SSL for encryption. This value requires encryption and never allows a NULL cipher.
socket->ConnectAsync(hostname, serviceName, SocketProtectionLevel::Ssl);

//2: A socket that prefers to use the SSL for encryption. This value prefers that full encryption be used, but allows a NULL cipher (no encryption) based on the server configuration.
socket->ConnectAsync(hostname, serviceName, SocketProtectionLevel::SslAllowNullEncryption);
1
  • thanks a lot for you interesting point, i have to use openssl as i am porting an existing windows library to WinRT. openssl is used for certificate storing and handling.
    – Avijeet
    Jul 30, 2012 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.