flagflag  
Page Top

簡単オレオレ証明書 anchor.png

  • /etc/pki/tls を使用する.
     
Page Top
/etc/pki/tls/certs の Makefile anchor.png
  • make genkey .... /etc/pki/tls/private に秘密鍵 localhost.key を生成する.
  • make server.key .... カレントディレクトリに秘密鍵 server.key を生成する.
  • make server.csr .... 秘密鍵が無ければ生成して,証明書請求フォーマット(server.csr) を生成する.
  • make server.crt .... server.csr が無ければ生成して,サーバ証明書(server.crt)を生成する.
  • 認証局証明書は /etc/pki/tls/cert.pem
     
Page Top

RSCH anchor.png

Page Top

1. PC -> Server : Handshake ClientHello anchor.png

Page Top
TLS Record Layer (5Byte) anchor.png
16 03 03 00 9b
  • 0x16 : Type: Handshake
  • 0x03 0x03 : Version: TLS v1.2
  • 0x00 0x9b : 続くデータの長さ (155Byte)
     
Page Top
メッセージタイプ (4Byte) anchor.png
 01 00 00 97
  • 0x01 : メッセージタイプ(msg タイプ): ClientHello
  • 0x00 0x00 0x97 : データ部の長さ (151Byte)
     
Page Top
データ部 (151Byte) anchor.png
03 03 5d b5 59 02 f8 ...
Page Top

2. Server -> PC : Handshake SeverHello anchor.png

Page Top
TLS Record Layer (5Byte) anchor.png
16 03 03 00 55
  • 0x16 : Type: Handshake
  • 0x03 0x03 : Version: TLS v1.2
  • 0x00 0x55 : 続くデータの長さ (85Byte)
     
Page Top
メッセージタイプ (4Byte) anchor.png
02 00 00 51
  • 0x02 : メッセージタイプ(msg タイプ): SeverHello
  • 0x00 0x00 0x51 : データ部の長さ (81Byte)
     
Page Top
データ部 (81Byte) anchor.png
03 03 de b4 cd 12 b2 ...
Page Top

3. Server -> PC : Handshake Certificate anchor.png

16 03 03 09 73 0b 00 09 6f
Page Top
メッセージタイプ (4Byte) anchor.png
  • 0x0b : メッセージタイプ(msg タイプ): Certificate
  • 0x00 0x09 0x6f : データ部の長さ(2415Byte)
     
Page Top
データ部 (2415バイト) anchor.png
00 09 6c 00 04 b1 30 82 04 ad 30 82 03 ...
Page Top

4. Server -> PC : Handshake ServerKeyExchange anchor.png

16 03 03 03 0f 0c 00 03 0b
Page Top
メッセージタイプ (4Byte) anchor.png
  • 0x0c : メッセージタイプ(msg タイプ): ServerKeyExchange
  • 0x00 0x03 0x0b : データ部の長さ(779Byte)
     
Page Top
データ部 (779バイト) anchor.png
01 00 ff ff ff ff ff ff ff ff c9 0f da a2 21 68 c2 ...  
 
Page Top

5. Server -> PC : Handshake ServerHelloDone anchor.png

16 03 03 00 04 0e 00 00 00
Page Top
メッセージタイプ (4Byte) anchor.png
0e 00 00 00   
  • 0x0e : メッセージタイプ(msg タイプ): ServerHelloDone
  • 0x00 0x00 0x00 : データ部の長さ(0Byte)
     
Page Top

6. PC -> Server : Handshake ClientKeyExchange anchor.png

16 03 03 01 06 10 00 01 02
Page Top
メッセージタイプ (4Byte) anchor.png
  • 0x10 : メッセージタイプ(msg タイプ): ClientKeyExchange
  • 0x00 0x01 0x02 : データ部長さ(258Byte)
     
Page Top
データ部 (258バイト) anchor.png
01 00 07 cd 69 f6 91 ...
Page Top

7. PC -> Server : ChangeCipherSpec anchor.png

14 03 03 00 01 01
Page Top
TLS Record Layer (5Byte) anchor.png
14 03 03 00 01
  • 0x14 : Type: ChangeCipherSpec
  • 0x03 0x03 : Version
  • 0x00 0x01: 続くデータの長さ (1Byte)
     
Page Top
データ部 (1Byte) anchor.png
  • 0x01 : ChangeCipherSpec : これ以降は暗号化通信を行う
     
Page Top

8. PC -> Server : Handshake finished? anchor.png

Page Top
TLS Record Layer (5Byte) anchor.png
16 03 03 00 28
  • 0x16 : Type: Handshake
  • 0x03 0x03 : Version
  • 0x00 0x28: 続くデータの長さ (40Byte)
     
Page Top
メッセージタイプ (4Byte) anchor.png
00 00 00 00 00 00 00 00 97 74 ...
  • 暗号化データ ? Finished か?
     
Page Top

9. Server -> PC : ChangeCipherSpec anchor.png

14 03 03 00 01 01
Page Top
TLS Record Layer (5Byte) anchor.png
14 03 03 00 01
  • 0x14 : Type: ChangeCipherSpec
  • 0x03 0x03 : Version
  • 0x00 0x01: 続くデータの長さ (1Byte)
     
Page Top
メッセージ部 (1Byte) anchor.png
  • 0x01 : ChangeCipherSpec : これ以降は暗号化通信を行う
     
Page Top

10. Server -> PC : Handshake finished? anchor.png

Page Top
TLS Record Layer (5Byte) anchor.png
16 03 03 00 28
  • 0x16 : Type: Handshake
  • 0x03 0x03 : Version
  • 0x00 0x28: 続くデータの長さ (40Byte)
     
Page Top
メッセージタイプ (4Byte) anchor.png
42 d2 dc b8 50 ...
  • 暗号化データ ? Finished か?
     
Page Top
TLS Record Layer (5Byte) anchor.png
16 03 03 00 28
  • 0x16 : Type: Handshake
  • 0x03 0x03 : Version
  • 0x00 0xbb: 続くデータの長さ (187Byte)
     

Front page   Freeze Diff Backup Copy Rename Reload   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)
Counter: 622, today: 1, yesterday: 0
Last-modified: 2020-09-19 (Sat) 13:44:00 (JST) (1316d) by iseki

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthApr 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Today

Who's Online

76 user(s) are online (7 user(s) are browsing xpwiki)

Members: 0
Guests: 76

more...

Access Counter

Today : 1047510475104751047510475
Yesterday : 1795517955179551795517955
Total : 2336945223369452233694522336945223369452233694522336945223369452
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com