From adbced1cad1f9dd9039e898ba4000df9afe939ff Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Tue, 24 Mar 2026 21:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sdlan/priv/public_key_sha256.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 apps/sdlan/priv/public_key_sha256.sh diff --git a/apps/sdlan/priv/public_key_sha256.sh b/apps/sdlan/priv/public_key_sha256.sh new file mode 100644 index 0000000..6314708 --- /dev/null +++ b/apps/sdlan/priv/public_key_sha256.sh @@ -0,0 +1,5 @@ +# 提取公钥 -> 转换为 RSA 原始格式 (PKCS#1) -> 转为 DER 二进制 -> 计算哈希 +openssl x509 -in cert.pem -pubkey -noout | \ +openssl rsa -pubin -RSAPublicKey_out -outform DER | \ +openssl dgst -sha256 -binary | \ +base64 \ No newline at end of file