บทนำ (Overview)
ขั้นตอนการสร้าง Self-Signed Certificate ให้มีขนาด RSA Keys 2048 bits บน IIS
ขั้นตอน (Steps)
- สามารถติดตั้ง Web Server ได้จากบทความ
- สามารถตรวจสอบได้ว่า มี Certificate ใช้ RSA Key Length ที่มีขนาดน้อยกว่า 2048 Bits โดยใช้
วิธี Manual
เข้าฟังก์ชันสร้าง Certificate
- ไปที่ start / run แล้วพิมพ์คำสั่ง
mmc
- ไปที่ file แล้วคลิกเลือก Add/Remove Snap-in
- เลือก certificates แล้วคลิก add
- เลือก Computer Account แล้วคลิก Next
- คลิก Finish
- เมื่อเห็นดังรูปให้คลิก Ok จะมี เมนู snap-in ขึ้นมา
สร้าง Certificates
- ขยาย Certificates (Local Computer) ไปที่ Personal คลิกขวา Certificates จากนั้นเลือก All Tasks/Advanced Operations/Create Custom Request ถ้าไม่พบโฟลเดอร์ Certificates ให้ไปสร้าง Self-siged cert แบบ Default How to enable SSL on IIS 7
- คลิก Next
- เลือก Proceed without enrollment policy และคลิก Next
- คลิก next
- คลิก Details/Properties/Next
ตั้งค่า Certificate ให้ปลอดภัย
- สำหรับการสร้าง Certificate ให้ Private key มีขนาด size (2048 bits) สามารถแก้ไขได้ดังนี้ Tab Private Key/Key options/Key size/2048 แล้วทำเครื่องหมายถึงที่ Make private key exportable
- จากนั้นคลิก Apply/Ok
- คลิก Browse และตั้งชื่อ CertName.cer จากนั้นคลิก Finish
- เข้าไปที่ Certificate Enrollment Requests และ certificates จะพบ Certificate ใหม่ที่สร้างขึ้นมา
- คลิกขวาที่ Certificats สร้างใหม่จากนั้น Copy
- ไปวางไว้ที่ Certificates (Local Computer) ไปที่ Personal คลิกขวา Certificates
เชื่อมต่อ Certificates
- เปิด IIS manager Start-> All Programs -> Administrative Tools -> IIS manager.
- เลือก Default Web site ดังรูป
- ทางด้านขวาคลิก Bindings… ใน Actions pane.
- เลือก https และ เลือก Certificate ที่เราสร้างเข้ามา
- จะมี https โผล่ขึ้นมา
- คลิกที่ Browser ด้านขวาที่เป็น 443 หรือเข้าที่ https://localhost/ เมื่อสามารถเข้าถึงได้ให้ตรวจสอบ Certificates จะพบว่าเป็น Key Size จะกลายเป็นขนาดที่ต้องการ
อ้างอิง (Referrences)