1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Kernel TLSをOpenSSLで有効にする

Last updated at Posted at 2019-07-17

Linux 4.13より、Kernel内でTLS処理を行うKTLSが利用できるようになりました。

最新のOpenSSLではKTLSを利用できるので試してみる。

参考

(TLS1.2のAES-128-GCMしか対応してない?)

ビルド

デフォルトでは有効でないので、ビルドする。
KTLSに対応してないカーネルを使用している場合は、強制的に無効になってしまいます。

$ git clone https://github.com/openssl/openssl.git
$ cd ./openssl
$ ./config enable-ktls
$ make

確認

適当なサイトに接続し、straceを使って、setsockoptでktlsを有効にしていることを確認する。

$ LD_LIBRARY_PATH=. strace ./apps/openssl s_client -connect asnokaze.com:443 2>&1 |grep setsock
setsockopt(3, SOL_TCP, TCP_ULP, [7564404], 4) = 0

これでよいのかな。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?