tls-server

command
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2025 License: BSD-2-Clause Imports: 6 Imported by: 0

README

  1. [TARGET] このディレクトリ配下で、以下を一度実行(Raspberry Pi)

    $ mkcert my-tls.com localhost 127.0.0.1
    
  2. [LOCAL] TARGET ホストで mkcert 実行で生成されたルート証明書(rootCA.pem)を、LOCAL ホストに追加する(一度だけ. 対応時のIssue

  3. [TARGET] このディレクトリ配下で以下(Raspberry Pi)

    $ go run main.go
    
  4. [LOCAL] Wireshark 起動(WSL)

    $ sudo tcpdump -U -i eth0 -w - | /mnt/c/Program\ Files/Wireshark/Wireshark.exe -k -i -
    
    • tcp.port == 10443 でfilter
  5. [LOCAL] packemon の debug mode で、TCP 3way handshake ~ TLS handshake ~ TLS Application data の送受信までを以下コマンドで確認できる

    $ sudo go run cmd/packemon/*.go --send --debug --proto tcp-tls-handshake
    
    • [LOCAL] func SendTCP3wayAndTLShandshake (packemon/internal/debugging/send_tcp3way_tlshandshake.go) の srcPort を実行毎に変更すること

    • [TARGET] debugging/tls-server 実行中に出力されるログ (CLIENT_RANDOM 000000...) を、ローカルの適当なファイル (C:\packemon\key.log とか) にコピペして、Wiresharkの「編集 > 設定 > Protocols > TLS」の「(Pre)-Master-Secret log filename」にそのファイルパスを設定後に、再度上記コマンド実行で、暗号化されているメッセージが復号されて見られる

  6. [debug] [LOCAL] OpenSSL で、TLS1.2の通信(WSL)を Wireshak で確認できる

    $ echo | openssl s_client -4 -tls1_2 -cipher AES128-GCM-SHA256 -connect 192.168.10.110:10443
    
  7. その他

    • DoT: dig github.com @1.1.1.1 +tls

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL