kTLS 就是 TLS in Kernel

就是在 Kernel space 層中進行 SSL 加密的處理,大大提高安全性,及降低對系統的負載

而 Kernel 4.13 裡就已內建了

確認可不可用

modprobe tls
lsmod | grep tls
tls 102400 0

可以拿 nginx-1.21.4 測試

編譯加上 ↓

--with-openssl=../openssl-3.0.0
--with-openssl-opt=enable-ktls

在 nginx.conf 裡設置 ↓

error_log /var/log/nginx/error.log debug;

http {
    server {
        listen 443 ssl;
        ssl_certificate ssl/server.crt;
        ssl_certificate_key ssl/server.key;
        ssl_conf_command Options KTLS;
        ssl_protocols TLSv1.3;
    }
}

在 debug 過程中看到 error.log 裡有 ↓ 就是成功了

BIO_get_ktls_send()
SSL_sendfile

 

PS: 不過,我沒試出來

參考 Improving NGINX Performance with Kernel TLS and SSL_sendfile( )

Related posts 相關文章
用 DNSSEC 是為了安全,但如果憑證過期了怎麼辦
More...
使用 dehydrated 安裝 Let’s Encrypt SSL 憑證
More...
使用 certbot 安裝 Let’s Encrypt SSL 憑證
More...
安裝 Let’s Encrypt SSL 憑證的工具
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。