BESPIN Tech Blog
  • Home
  • Tech
    • CSP

      AWS

      GCP

      NCP

      Cloud

      Migration

      LZ, Control Tower

      Backup

      Monitoring

      Container

      Infra

      OS

      Middleware

      Data

      RDB

      Big Data Platform

      Application

      CI/CD

      BESPICK 구독하기 ㅣ 1668-1280

  • Trend
  • IT
최신 리포트 다운로드 지금 바로 문의하기
BESPIN Tech Blog
  • Home
  • Tech
    • CSP

      AWS

      GCP

      NCP

      Cloud

      Migration

      LZ, Control Tower

      Backup

      Monitoring

      Container

      Infra

      OS

      Middleware

      Data

      RDB

      Big Data Platform

      Application

      CI/CD

      BESPICK 구독하기 ㅣ 1668-1280

  • Trend
  • IT
최신 리포트 다운로드 지금 바로 문의하기
BESPIN Tech Blog
BESPIN Tech Blog
  • Tech
    • CSP
      • AWS
      • GCP
      • NCP
    • Cloud
      • Migration
      • LZ, Control Tower
      • Backup
      • Monitoring
      • Container
    • Infra
      • OS
      • Middleware
    • Data
      • RDB
      • Big Data Platform
    • Application
      • CI/CD
  • Trend
  • IT
  • Contact US
OS

SSL 관련 트러블 슈팅용 openssl 명령어

by 민우 서 2025년 03월 31일
2025년 03월 31일
23

안녕하세요 오늘은 BESPIN GLOBAL 이상열님이 작성해주신 ‘SSL 관련 트러블 슈팅용 openssl 명령어’에 대해 소개해드리도록 하겠습니다.

목차
1. 인증서 만료일 확인
2. key, csr and crt 내용 확인
3. 인증서과 개인키가 쌍이 맞는지 확인
4. 개인키 생성 (3가지)
5. 개인키에서 공개키 생성
6. 개인키에서 자체서명 인증서 생성
7. BIG-IP에서 개인키와 (자체서명) 인증서 생성
8. 키에서 password 제거한 키 재생성 (암호구문만 제거된 키. 다른 내용은 동일)
9. 개인키를 가지고 (베리사인에 등록할) csr 생성
10. 원격지 cert 확인
11. DER/PEM간 인증서/개인키 변경하기
12. pfx에서 키 추출
13. pfx에서 인증서 추출
14. MD5와 SHA1 다이제스트 만들기
15. 개인키로 다이제스트 서명하기
16. 공개키로 서명된 다이제스트 확인하기
17. 간단하게 암호화 하기

1. 인증서 만료일 확인
openssl x509 -in /config/ssl/ssl.crt/default.crt -noout -enddate |cut -c10-40

2. key, csr and crt 내용 확인
openssl rsa -noout -text -in /config/ssl/ssl.key/default.key
openssl req -noout -text -in /config/ssl/ssl.csr/default.csr
openssl x509 -noout -text -in /config/ssl/ssl.crt/default.crt

3. 인증서과 개인키가 쌍이 맞는지 확인
<일반>
openssl rsa -in default.key -modulus -noout | openssl md5
openssl x509 -in default.crt -modulus -noout | openssl md5
openssl req -in default.csr -modulus -noout | openssl md5 <—– csr도 체크시

<BIG-IP: default.key and crt – for ssl profile>
openssl rsa -in /config/ssl/ssl.key/default.key -modulus -noout | openssl md5
openssl x509 -in /config/ssl/ssl.crt/default.crt -modulus -noout | openssl md5

<BIG-IP: server.key and crt – for device cert>
openssl rsa -in /config/httpd/conf/ssl.key/server.key -modulus -noout | openssl md5
openssl x509 -in /config/httpd/conf/ssl.crt/server.crt -modulus -noout | openssl md5

4. 개인키 생성 (3가지)
openssl genrsa <— 기본 512-bit 키로 생성. 기본 출력
openssl genrsa -out default.key 1024 <—- 1024-bit 키로 암호 구문없이 default.key 생성
openssl genrsa -des3 -out default.key 1024 <——— pass phrase를 입력하여 생성

5. 개인키에서 공개키 생성
openssl rsa -in default.key -pubout

6. 개인키에서 자체서명 인증서 생성
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout default.key -out default.crt

7. BIG-IP에서 개인키와 (자체서명) 인증서 생성
gencert -n default 1024 <—- 개인키 생성
openssl req -new -key /config/ssl/ssl.key/default.key -x509 -out /config/ssl/ssl.crt/default.crt
bigpipe load

8. 키에서 password 제거한 키 재생성 (암호구문만 제거된 키. 다른 내용은 동일)
openssl rsa -in default.key -out default.key.unsecure <— 새로 생성된 키는 server

9. 개인키를 가지고 (베리사인에 등록할) csr 생성
openssl req -new -key default.key -out default.csr

10. 원격지 cert 확인
openssl s_client -connect activate.f5.com:443  <——– https:// 안붙임

11. DER/PEM간 인증서/개인키 변경하기
11-1. cert
openssl x509 -in test.cer -inform DER -out cert.pem -outform PEM  <—– DER to PEM
openssl x509 -in test.cer -inform PEM -out output.cer -outform DER  <—– PEM to DER

11-2. key
openssl rsa -in cert.cer -inform DER -out outkey.cer -outform PEM  <—– DER to PEM
openssl rsa -in cert.cer -inform PEM -out outkey.cer -outform DER  <—– PEM to DER

12. pfx에서 키 추출
openssl pkcs12 –in filename.pfx –nocerts –out key.pem

13. pfx에서 인증서 추출
openssl pkcs12 –in filename.pfx –clcerts –nokeys –out cert.pem

14. MD5와 SHA1 다이제스트 만들기
openssl dgst -md5 filename
openssl dgst -sha1 filename

15. 개인키로 다이제스트 서명하기
openssl dgst -sha1 -sign default.key -out test.txt.sha1 test.txt

16. 공개키로 서명된 다이제스트 확인하기
openssl dgst -sha1 -verify pub.key -signature test.txt.sha1 test.txt

17. 간단하게 암호화 하기
openssl enc -aes-256-cbc -salt -in file.txt -out file.enc  <—- CBC 모드에서 256-bit AES 사용
openssl enc -d -aes-256-cbc -in file.enc <—- 복호화

openssl enc -aes-256-cbc -a -salt -in file.txt -out file.enc <—- base64 엔코딩 사용
openssl enc -d -aes-256-cbc -a -in file.enc <—- 복호화

여기까지 ‘SSL 관련 트러블 슈팅용 openssl 명령어’에 대해 소개해드렸습니다. 유익한 정보가 되셨길 바랍니다. 감사합니다. 

Written by 이 상열

BESPIN GLOBAL

관련

SSL트러블 슈팅용openssl

HOT Trend

Recent Posts

  • 딜로이트도, 맥킨지도, 베스핀글로벌도: AI 에이전트로 일 바꾸는 시대

    2025년 07월 04일 클라우드베스핀글로벌clouddata데이터AI인공지능HelpNow AIbespinglobalAI에이전트helpnow업무자동화딜로이트
  • ⚔️데이터센터에서 시작된 전쟁? 요즘 뜨는 AIDC 개념부터 트렌드까지!

    2025년 06월 27일 클라우드clouddata데이터AI데이터센터클라우드 데이터센터bespinglobalAIDCAI 인프라베스핀글로벌
  • 구글부터 엔비디아까지, 빅테크 기업들의 AI 전략 최신본📖

    2025년 06월 20일 cloud베스핀글로벌클라우드data데이터AI구글마이크로소프트엔비디아AI에이전트google I/ONVIDIA GTC 2025Microsoft build 2025
  • AI를 연결한다고? 업계가 주목하는 ‘MCP’ 알아보기🔍

    2025년 06월 13일 베스핀글로벌클라우드cloudAIMCP
  • [WhaTap] RDS Failover/Reboot 관제 2 – RDS Failover

    2025년 05월 30일 RDSRDS FailoverRebootFailoverbespin global

베스핀글로벌은 모든 기업의 AI 혁신을 실현하기 위해, 세상에서 가장 혁신적이고 자동화된 AI 서비스와 솔루션을 만들어갑니다.
상호 : 베스핀글로벌 주식회사 ㅣ 대표자명 : 김써니, 허양호 ㅣ 사업자등록증번호 : 638-87-00223 ㅣ 통신판매번호 : 2019-서울서초-0347 ㅣ 대표전화 : 1668-1280
사업장주소지 : 서울특별시 서초구 강남대로 327, 13,14,15,16층(서초동,대륭서초타워) ㅣ 이메일 : info@bespinglobal.com ㅣ 개인정보 처리방침 ㅣ 개인정보 처리방침 안내

© 2026 BESPIN GLOBAL, All Rights Reserved.

BESPINGLOBAL
패밀리 사이트
China MEA SEA US

BESPIN Tech Blog
  • Home
  • Tech
    • CSP

      AWS

      GCP

      NCP

      Cloud

      Migration

      LZ, Control Tower

      Backup

      Monitoring

      Container

      Infra

      OS

      Middleware

      Data

      RDB

      Big Data Platform

      Application

      CI/CD

      BESPICK 구독하기 ㅣ 1668-1280

  • Trend
  • IT