{"id":755,"date":"2013-10-07T15:35:25","date_gmt":"2013-10-07T20:35:25","guid":{"rendered":"http:\/\/www.poweradmin.com\/blog\/?p=755"},"modified":"2015-04-27T08:35:54","modified_gmt":"2015-04-27T13:35:54","slug":"building-openssl-with-visual-studio-2012-for-32-or-64-bit","status":"publish","type":"post","link":"https:\/\/www.poweradmin.com\/blog\/building-openssl-with-visual-studio-2012-for-32-or-64-bit\/","title":{"rendered":"Building OpenSSL with Visual Studio 2012 for 32- or 64-bit"},"content":{"rendered":"<p>\n\t<a href=\"\/blog\/wp-content\/uploads\/2013\/10\/openssl-logo2.png\" rel=\"\" style=\"\" target=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" alt=\"OpenSSL\" class=\"alignleft size-full wp-image-765\" height=\"246\" src=\"\/blog\/wp-content\/uploads\/2013\/10\/openssl-logo2.png\" style=\"margin-right: 15px; border: 0px none;\" title=\"\" width=\"246\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/10\/openssl-logo2.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/10\/openssl-logo2-150x150.png 150w\" sizes=\"auto, (max-width: 246px) 100vw, 246px\"><\/a><span style=\"font-size:16px;\">For our programmer (dev\/ops) friends, we\u00a0<span style=\"line-height: 1.6em;\">thought we'd share a little about building <a href=\"https:\/\/www.poweradmin.com\/help\/fs_5_2\/report_other_ssl_cert.aspx\">OpenSSL<\/a>. \u00a0There are a lot of examples online, but we kept finding they had little glitches, not quite complete, etc. \u00a0So here is how we built it:<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">You need Perl installed. \u00a0ActiveState's free community Perl install is just fine.<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\">First, you need to decide on 32- or 64-bit. \u00a0Open a command prompt and change directory into the OpenSSL source folder, such as into D:\\OpenSSL\\openssl-1.0.1e.<\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><strong>NOTE: Don't try to build debug and release, or 32-bit and 64-bit in the same folder<\/strong>. \u00a0I'd recommend having folders like:<\/span>\n<\/p>\n<p style=\"font-size: 13px;\">\n\t<span style=\"font-size:16px;\">D:\\OpenSSL\\openssl-1.0.1e_vs2012_32bit_rel<\/span>\n<\/p>\n<p style=\"font-size: 13px;\">\n\t<span style=\"font-size:16px;\"><span style=\"line-height: 1.6em;\">D:\\OpenSSL\\openssl-1.0.1e_vs2012_64bit_rel<\/span><\/span>\n<\/p>\n<p>\n\t<span style=\"font-size:16px;\"><strong>Now, to build\u00a032-bit:<\/strong><\/span>\n<\/p>\n<blockquote>\n<p>\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">call \"C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\vcvarsall.bat\" x86<br>\n\t\t<span style=\"line-height: 1.6em;\">perl Configure VC-WIN32 \u2013prefix={directory where you want your final output files}<\/span><br>\n\t\t<span style=\"line-height: 1.6em;\">call ms\\do_ms<\/span><\/span><\/span>\n\t<\/p>\n<\/blockquote>\n<h2 style=\"font-size: 13px;\">\n\t<span style=\"font-size:16px;\"><strong>For 64-bit:<\/strong><\/span><br>\n<\/h2>\n<blockquote>\n<p style=\"font-size: 13px;\">\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">perl Configure VC-WIN64A \u2013prefix={directory where you want your final output files}<br>\n\t\tcall ms\\do_win64a<\/span><\/span>\n\t<\/p>\n<\/blockquote>\n<p style=\"font-size: 13px;\">\n\t<span style=\"font-size:16px;\">You're not done. \u00a0Now you need to decide if you want a static library or a DLL. \u00a0From this point on, the 32- or 64-bit decision doesn't matter.<\/span>\n<\/p>\n<p style=\"font-size: 13px;\">\n\t<span style=\"font-size:16px;\"><strong><span style=\"line-height: 1.6em;\">For static library:<\/span><\/strong><\/span>\n<\/p>\n<blockquote>\n<p style=\"font-size: 13px;\">\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">REM build OpenSSL<br>\n\t\t<span style=\"line-height: 1.6em;\">nmake -f ms\\nt.mak\u00a0<\/span><\/span><\/span>\n\t<\/p>\n<p style=\"font-size: 13px;\">\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">REM copy files to your output folder<br>\n\t\tnmake -f ms\\nt.mak install<\/span><\/span>\n\t<\/p>\n<p style=\"font-size: 13px;\">\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">REM run some tests to make sure your build works \u2014 look for \"passed all tests\"<br>\n\t\tnmake -f ms\\nt.mak test<\/span><\/span>\n\t<\/p>\n<\/blockquote>\n<p style=\"font-size: 13px;\">\n\t\u00a0\n<\/p>\n<p style=\"font-size: 13px;\">\n\t<span style=\"font-size:16px;\"><strong>For a DLL:<\/strong><\/span>\n<\/p>\n<blockquote>\n<p style=\"font-size: 13px;\">\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">REM build OpenSSL<br>\n\t\t<span style=\"line-height: 1.6em;\">nmake -f ms\\ntdll.mak\u00a0<\/span><\/span><\/span>\n\t<\/p>\n<p style=\"font-size: 13px;\">\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">REM copy files to your output folder<br>\n\t\tnmake -f ms\\ntdll.mak install<\/span><\/span>\n\t<\/p>\n<p style=\"font-size: 13px;\">\n\t\t<span style=\"font-size:16px;\"><span style=\"font-family: courier new,courier,monospace;\">REM run some tests to make sure your build works \u2014 look for \"passed all tests\"<br>\n\t\tnmake -f ms\\ntdll.mak test<\/span><\/span>\n\t<\/p>\n<\/blockquote>\n<div>\n\t\u00a0\n<\/div>\n<div>\n\t<span style=\"font-size:16px;\">Look in your output folder and you'll find the openssl.exe, some link libraries, some DLLs if you wanted them and headers. \u00a0It's a beautiful thing \ud83d\ude09<\/span>\n<\/div>\n<div>\n\t\u00a0\n<\/div>\n<p style=\"font-size: 13px;\">\n\t\u00a0\n<\/p>\n<p style=\"font-size: 13px;\">\n\t\u00a0\n<\/p>\n<p>\n\t\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For our programmer (dev\/ops) friends, we\u00a0thought we&#8217;d share a little about building OpenSSL. \u00a0There are a lot of examples online, but we kept finding they had little glitches, not quite complete, etc. \u00a0So here is how we built it: You need Perl installed. \u00a0ActiveState&#8217;s free community Perl install is just fine. First, you need to [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":765,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,9,8],"tags":[],"class_list":["post-755","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-it","category-how-to","category-technical","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/comments?post=755"}],"version-history":[{"count":5,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":3579,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/755\/revisions\/3579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media\/765"}],"wp:attachment":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media?parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/categories?post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/tags?post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}