node.js https ssl 서버 구현 > 질문답변

본문 바로가기

사이트 내 전체검색

뒤로가기 질문답변

node.js https ssl 서버 구현

페이지 정보

작성자 미친새 작성일 20-02-21 18:45 조회 19,043 댓글 0

본문

# key 변경
openssl rsa -in server.key -text > private.pem
# crt 변경
openssl x509 -inform PEM -in server.crt > public.pem




const https = require('https');
const fs = require('fs');
const options = {
  ca: fs.readFileSync('인증서경로/ca-bundle.pem')
  key: fs.readFileSync('인증서경로/domain_xxxxx.key.pem')
  cert: fs.readFileSync('인증서경로/domain_xxxxx.crt.pem')
};
https.createServer(options, (req, res) => {
  res.writeHead(200);
  res.end('hello world\n');
}).listen(443);

댓글목록 0

등록된 댓글이 없습니다.

Copyright © 소유하신 도메인. All rights reserved.

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

PC 버전으로 보기