top of page
Search

Technical : SSL Setup and converter

Updated: Apr 28, 2023

ขั้นตอนการตรวจสอบ Private Key กับ Certificate


Private key (PrivateKey.key) ทำการตรวจสอบความเข้ากันกับ certificate ที่ได้รับไป ที่ https://ssl.in.th/tools/certificate-key-matcher/ หากผลคือไม่ matching กันแนะนำให้ทำการ reissue


แต่หากผลคือ matching กัน แสดงว่าสามารถนำไปใช้ได้ โดยต้องแปลงไฟล์เป็น .pfx เสียก่อน หลังจากนั้นค่อยใช้วิธีการ import เข้าไปที่ Windows Server ครับ วิธีการตามรายละเอียดด้านล่าง

วิธีการแปลงไฟล์ PEM Format เป็น PFX เพื่อใช้กับ Windows Server


ขั้นตอนการทำ SSL Conversion


กรณีต้องการนำ SSL Certificate จากเครื่อง Server ที่ใช้ไฟล์ format PEM ที่ได้ติดตั้ง SSL Certificate สมบูรณ์แล้ว แล้วต้องการนำไปใช้ติดตั้งบนเครื่อง Windows Server ภายใต้ชื่อ Common Name เดียวกัน จะต้องทำการนำไฟล์ PrivateKey และ SSL Certificate มารวมเป็นไฟล์เดียวกันโดยมี file format เป็น PFX/PKCS#12 โดยมีขั้นตอนดังนี้


1. นำไฟล์ PrivateKey จากเครื่องที่ได้ติดตั้ง SSL Certificate สมบูรณ์แล้วออกมาบันทึกเป็นไฟล์ PrivateKey.key (ตำแหน่งที่เก็บ PrivateKey ขึ้นอยู่กับชนิด Server นั้นๆ)


Download and install latest version of OpenSSL for windows (Download 32 bit version version 1.1 Win32OpenSSL_Light-1_1_1t.msi from http://www.slproweb.com/products/Win32OpenSSL.html


Note: OpenSSL requires Visual C++ 2017 Redistributable x86 download which can be downloaded from the same website.


Export pfx Certificate from MMC Console (Certificates). The private key is backed up as a ‘.pfx’ file, which stands for Personal Information Exchange.


Open command prompt, navigate to C:\OpenSSL-Win32\bin>, and run the following commands.

Set OPENSSL_CONF=c:\openssl-win32\bin\openssl.cfg 
openssl pkcs12 -in filename.pfx -nocerts -out key.pem
openssl rsa -in key.pem -out myserver.key

2. ไปที่เครื่องมือแปลงไฟล์ โดยสามารถแปลงไฟล์ได้ที่ https://ssl.in.th/tools/ssl-converter/



3. ทำการเลือกประเภทของ File Format ดังรายละเอียดด้านล่าง

Type of Current Certificate คือ File Format ของไฟล์ที่ต้องแปลง ในที่นี้เป็น Standard PEM Type To Convert To คือ File Format ที่ต้องการนำไปใช้ ในที่นี้เป็น PFX/PKCS#12



 4. ทำการใส่ข้อมูลต่างๆ ตามรายละเอียดด้านล่าง หลังจากนั้นทำการคลิ๊ก Convert Certificate เพื่อทางการแปลงไฟล์

Certificate data to convert นำ SSL Certificate ที่ได้รับ นำมาใส่ในส่วนนี้ Private Key File ทำการอัพโหลดไฟล์ Private Key ที่ได้จากข้อ 1 Chain Certificate File ทำการอัพโหลดไฟล์ Intermediate CA ที่ได้รับ (Optional) PFX Password และ PFX Password Confirmation ให้ใส่รหัสผ่านตามต้องการ



5. เมื่อทำการ Convert Certificate เรียบร้อยแล้ว สามารถนำไฟล์ที่ได้รับนี้ไปติดตั้งบน Windows Server ได้ต่อไป 

110 views0 comments
bottom of page