如何为WP8构建OpenSSL? [英] How to build OpenSSL for WP8?

查看:98
本文介绍了如何为WP8构建OpenSSL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为WP8构建OpenSSL?

How to build OpenSSL for WP8?

AFAIK,我们必须将winsock.h替换为winsock2.h,因为WP8仅支持winsock2.h.也许我们必须替换代码以针对WP8上的WinRT体系结构(ThreadPool,...)

AFAIK, we must replace winsock.h by winsock2.h because WP8 only supports winsock2.h. And maybe we must replaces code to target WinRT architecture on WP8 (ThreadPool, ...)

需要说明的是,我们必须将OpenSSL作为WP8静态库构建,以便输出库可以由WP8运行时组件包装,对吗?

The caveat is that we must build OpenSSL as WP8 static library, so that the output lib can be wrapped by WP8 runtime component, right ?

推荐答案

这是您要做的,请转到

here is what you have to do, go to this link and download the VSbuild, now put that into the source files downloaded from the OpenSSL website, the folder structure should look like this:

  apps
  bugs
  certs
  .....
  vsbuild

完成后,打开解决方案,应该将其升级到VS12,将设置更改为Windows Phone RT构建,生成DLL无需构建* _lib *,因此更改其他项目,大多数更改您需要做的就是libeay32,不要编译 openssl 项目,只是忽略它,首先构建 libeay32 ,然后开始对代码,因为WinRT中没有某些功能,您可以#ifdef删除它们,也可以创建自己的函数

once that is done, open the solution, it should upgrade it to VS12, change the settings to a Windows Phone RT build, to generate DLL's there is no need to build *_lib*, so change the other projects, most changes you need to do are to libeay32, do not compile openssl project, just ignore that, start by building libeay32, and start making changes to the code, as there are some functions we don't have in WinRT, you can either #ifdef them out, or create your own functions,

注意(对于rand_win.c),更改功能以使用rand_s#ifdef大部分代码,这可能会破坏安全性,您必须自己对其进行测试

NOTE for rand_win.c change the functions to use rand_s and #ifdef most of the code there is, this might muck up the security, you will have to test it out yourself

祝你好运!

这篇关于如何为WP8构建OpenSSL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆