<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Build on kenji.blog</title><link>http://kenji.blog/en/tags/build/</link><description>Recent content in Build on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>kenjinote</copyright><lastBuildDate>Fri, 07 Apr 2023 21:06:32 +0900</lastBuildDate><atom:link href="http://kenji.blog/en/tags/build/index.xml" rel="self" type="application/rss+xml"/><item><title>How to build OpenSSL on Windows</title><link>http://kenji.blog/en/p/windows-%E3%81%A7-openssl-%E3%82%92%E3%83%93%E3%83%AB%E3%83%89%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/</link><pubDate>Fri, 07 Apr 2023 21:06:32 +0900</pubDate><guid>http://kenji.blog/en/p/windows-%E3%81%A7-openssl-%E3%82%92%E3%83%93%E3%83%AB%E3%83%89%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/</guid><description>&lt;img src="http://kenji.blog/p/windows-%E3%81%A7-openssl-%E3%82%92%E3%83%93%E3%83%AB%E3%83%89%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/img.png" alt="Featured image of post How to build OpenSSL on Windows" />&lt;h1 id="what-is-openssl">What is OpenSSL?
&lt;/h1>&lt;p>It is an open-source library that provides the processing necessary for encrypted communication.&lt;/p>
&lt;p>To use it from a program, since the C language source code is public, you need to build it and create a library.&lt;/p>
&lt;p>Below, we will introduce the build procedure.&lt;/p>
&lt;h1 id="preparing-the-build-environment">Preparing the build environment
&lt;/h1>&lt;ul>
&lt;li>
&lt;p>&lt;strong>Perl&lt;/strong>&lt;/p>
&lt;p>Download &lt;code>strawberry-perl-5.32.1.1-64bit.msi&lt;/code> from &lt;a class="link" href="https://strawberryperl.com/" target="_blank" rel="noopener"
>https://strawberryperl.com/&lt;/a>. The latest version should be fine.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>NASM&lt;/strong>&lt;/p>
&lt;p>Download &lt;code>2.16.01/nasm-2.16.01-win64.zip&lt;/code> from &lt;code>Download&lt;/code> at &lt;a class="link" href="https://www.nasm.us/" target="_blank" rel="noopener"
>https://www.nasm.us/&lt;/a>. The latest non-rc version should be fine.
After installation, you need to add the folder where NASM was installed to the environment variable PATH.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>Visual Studio 2022 ** or ** Build Tools for Visual Studio 2022&lt;/strong>&lt;/p>
&lt;p>Install &lt;code>Visual Studio 2022 Community&lt;/code> or &lt;code>Build Tools for Visual Studio 2022&lt;/code> from &lt;a class="link" href="https://visualstudio.microsoft.com/ja/downloads/" target="_blank" rel="noopener"
>https://visualstudio.microsoft.com/ja/downloads/&lt;/a>.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h1 id="openssl-build-procedure-on-windows">OpenSSL build procedure on Windows
&lt;/h1>&lt;ol>
&lt;li>Download and extract &lt;code>openssl-3.1.0.tar.gz&lt;/code> from &lt;a class="link" href="https://www.openssl.org/source/" target="_blank" rel="noopener"
>https://www.openssl.org/source/&lt;/a>. If you cannot extract it, execute &lt;code>tar -xzf openssl-3.1.0.tar.gz&lt;/code> in the command prompt.&lt;/li>
&lt;li>Launch the command prompt &lt;strong>with administrator privileges&lt;/strong>.&lt;/li>
&lt;li>Open the extracted folder.&lt;/li>
&lt;li>Execute the following command *Change the &lt;code>Community&lt;/code> part according to the version of Visual Studio you installed&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-gdscript3" data-lang="gdscript3">&lt;span class="line">&lt;span class="cl">&lt;span class="s2">&amp;#34;C:\Program Files\Microsoft Visual Studio&lt;/span>&lt;span class="se">\202&lt;/span>&lt;span class="s2">2\Community\VC\Auxiliary\Build&lt;/span>&lt;span class="se">\v&lt;/span>&lt;span class="s2">cvarsall.bat&amp;#34;&lt;/span> &lt;span class="n">x64&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ol start="5">
&lt;li>Execute the following command&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">perl Configure VC-WIN64A
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ol start="6">
&lt;li>Execute the following command (takes a considerable amount of time)&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">nmake
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ol start="7">
&lt;li>Execute the following command (takes a considerable amount of time)&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">nmake test
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;ol start="8">
&lt;li>Execute the following command&lt;/li>
&lt;/ol>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">nmake install
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>If successful, OpenSSL will be installed in &lt;code>C:\Program Files\OpenSSL&lt;/code>.&lt;/p>
&lt;p>That is all.&lt;/p>
&lt;h1 id="reference">Reference
&lt;/h1>&lt;p>&lt;a class="link" href="https://ja.wikipedia.org/wiki/OpenSSL" target="_blank" rel="noopener"
>https://ja.wikipedia.org/wiki/OpenSSL&lt;/a>&lt;/p></description></item></channel></rss>