logo

English

이곳의 프로그래밍관련 정보와 소스는 마음대로 활용하셔도 좋습니다. 다만 쓰시기 전에 통보 정도는 해주시는 것이 예의 일것 같습니다. 질문이나 오류 수정은 siseong@gmail.com 으로 주세요. 감사합니다.

OpenSSL Build for Windows

by digipine posted Aug 30, 2024
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

Websocket SSL 연결을 위해 OpenSSL을 Static 빌드해서 사용한다. 현재 Open SSL의 버전은 1.x.x와 3.x.x 가 존재한다. 

아래 내용은 한글 윈도우즈 10에서 Visual Studio 2022 버전 환경 기반이다.

다른 버전에서도 크게 차이는 없을 것으로 판단됨.

 

Open SSL 소스 코드 다운로드 : 
아래 사이트에서 다운로드 1,3 버전 중 선택해서 최신 안정화 버전으로 다운로드 한다.

https://github.com/openssl/openssl/releases
 

Perl 설치 :

두버전 모두 Perl이 설치되어야 빌드가 가능하다.

Perl 다운로드 : https://strawberryperl.com/
 

NASM 설치

nasm 다운로드 :  https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D

nasm 2.16.01 버전으로 설치해서 빌드

 

환경 변수 등록

빌드시에  VS의 CMD 창에서는 빌드가 안됨, 별도의 x86 툴로 빌드해야한다.

윈도우의 환경 변수로 아래 Path를 등록해준다

path nmake.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
path cl.exe
C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86

 

한글 윈도우 터미널 창 코드 관련 문제

한글 코드 관련으로 빌드시에 오류가 발생할 수 있다.  오류 발생시 터미널 창에서 아래 명령으로 환경 설정을 해준다.

set LANG=C
set LC_ALL=C

Build 하기

 

configure 설정 만들기

 

터미널 창을 실행하고 소스가 저장된 디렉토리로 이동한다.

cd C:\Users\siseongahn\Develop\openssl\openssl-1.1.1v

아래 명령어로 x86 툴로 64비트로 빌드하도록 설정한다.

call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64

 

configure 설정 (디버그/ 릴리즈 모드)

perl Configure -MTd no-shared no-idea no-mdc2 no-rc5 debug-VC-WIN64A
perl Configure -MT no-shared no-idea no-mdc2 no-rc5 VC-WIN64A

 

빌드 실행

nmake clean
nmake
nmake install

완료 후에 C:\Program Files\OpenSSL 폴더안에 빌드된 라이브러리와 Include 파일이 설치된다.

 

테스트 실행

1.1.1w 버전으로 pass 됨

 

Test 결과 1.1.1w
 
Microsoft(R) Program Maintenance Utility 버전 14.00.24247.2
Copyright (c) Microsoft Corporation. All rights reserved.
 
        mkdir .\test\test-runs
        set SRCTOP=.
        set BLDTOP=.
        set RESULT_D=.\test\test-runs
        set PERL=C:\Strawberry\perl\bin\perl.exe
        set OPENSSL_ENGINES=C:\Users\siseongahn\Develop\openssl\openssl-1.1.1w\engines
        set OPENSSL_DEBUG_MEMORY=on
        "C:\Strawberry\perl\bin\perl.exe" ".\test\run_tests.pl"
test\recipes\01-test_abort.t .................... ok
test\recipes\01-test_sanity.t ................... ok
test\recipes\01-test_symbol_presence.t .......... skipped: Only useful when building shared libraries
test\recipes\01-test_test.t ..................... ok
test\recipes\02-test_errstr.t ................... skipped: This is unsupported on MSYS/MinGW or MSWin32
test\recipes\02-test_internal_ctype.t ........... ok
test\recipes\02-test_lhash.t .................... ok
test\recipes\02-test_ordinals.t ................. ok
test\recipes\02-test_stack.t .................... ok
test\recipes\03-test_exdata.t ................... ok
test\recipes\03-test_internal_asn1.t ............ ok
test\recipes\03-test_internal_chacha.t .......... ok
test\recipes\03-test_internal_curve448.t ........ ok
....
 

  1. No Image 20Jan
    by lizard2019
    2025/01/20 by lizard2019
    Views 84 

    rmix test application 배포

  2. No Image 05Nov
    by lizard2019
    2024/11/05 by lizard2019
    Views 539 

    윈도우에서 패스워드 입력 실패로 잠금 상태인지 확인 하는 방법

  3. No Image 30Aug
    by digipine
    2024/08/30 by digipine
    Views 502 

    OpenSSL Build for Windows

  4. No Image 27Aug
    by digipine
    2024/08/27 by digipine
    Views 994 

    Rapid JSON 간단 사용법

  5. No Image 27Aug
    by digipine
    2024/08/27 by digipine
    Views 782 

    Direct X 11에서 그래픽 카드의 정보 가져오는 예제

  6. No Image 27Aug
    by digipine
    2024/08/27 by digipine
    Views 805 

    Python Slack 메시지 발송하는 예제

  7. No Image 27Aug
    by digipine
    2024/08/27 by digipine
    Views 614 

    Python email 보내는 예제 코드

  8. No Image 08Aug
    by digipine
    2024/08/08 by digipine
    Views 501 

    UDP 핀홀 트래버설 과정 요약, UDP pinhole traversal

  9. No Image 08Aug
    by digipine
    2024/08/08 by digipine
    Views 515 

    NAT 상태에서 P2P 통신하는 방법

  10. Windows Visual Studio 2022 OpenSSL Build 방법

  11. No Image 28Mar
    by digipine
    2024/03/28 by digipine
    Views 732 

    Visual Studio 단축키 정리

  12. 프로그래밍 언어 순위 2023년

  13. No Image 11Aug
    by digipine
    2023/08/11 by digipine
    Views 839 

    이벤트 텍소노미(Event Taxonomy)란 무엇인가요?

  14. Bitbucket에서 SSH 키 등록하고 사용하는 방법 (맥/리눅스)

  15. No Image 12May
    by digipine
    2023/05/12 by digipine
    Views 852 

    FFServer RTSP Audio Server Config

  16. No Image 15Feb
    by lizard2019
    2023/02/15 by lizard2019
    Views 867 

    OBS Studio for Http Interface EXE

  17. No Image 06Oct
    by digipine
    2022/10/06 by digipine
    Views 1496 

    xcode xib encountered an error communicating with ibagent-ios 해결

  18. No Image 25Sep
    by lizard2019
    2022/09/25 by lizard2019
    Views 1357 

    XCode 사용시 git ignore 로 xcuserstate 충돌 해결하기, .gitignore에 등록했는데도 동작안할때 해결방법

  19. No Image 05Sep
    by digipine
    2022/09/05 by digipine
    Views 1408 

    MAC Screen Sharing을 위한 VNC 접속을 위한 Port 변경 방법

  20. No Image 26Jan
    by digipine
    2022/01/26 by digipine
    Views 1679 

    Phabricator Ubuntu Installation Guide

Board Pagination Prev 1 2 3 4 5 6 Next
/ 6

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5