openssl 中 EVP_aes_256_gcm() 函数展开

在 openssl 中搜索,只能在头文件搜索到 EVP_aes_256_gcm() ,不能直接搜索到它的实现。

它的实现是通过一个宏展开的,挺难找的,如下,做记录:

文件:openssl-1.1.1g/crypto/evp/e_aes.c

c 复制代码
EVP_aes_256_gcm();

// 代码原文:
BLOCK_CIPHER_custom(NID_aes, 256, 1, 12, gcm, GCM,
                    EVP_CIPH_FLAG_AEAD_CIPHER | CUSTOM_FLAGS)

// 展开后原文:
static const EVP_CIPHER aes_256_gcm = {
    901, 1, (0x6 == 0x10001 ? 2 : 1) * 256 / 8, 12, 
    0x200000 | (0 | 0x10 | 0x100000 | 0x20 | 0x40 | 0x400 | 0x800) | 0x6, 
    aes_gcm_init_key, aes_gcm_cipher, aes_gcm_cleanup, sizeof(EVP_AES_GCM_CTX), 
    ((void *)0), ((void *)0), aes_gcm_ctrl, ((void *)0)
    };
const EVP_CIPHER *EVP_aes_256_gcm(void) { return &aes_256_gcm; }
相关推荐
KnowSafe2 天前
iTrustSSL和RapidSSL哪个性价比更高?
ssl·rapidssl·itrustssl
BenChuat2 天前
使用 httpsok 给 QNAP NAS 添加阿里云域名的永久免费 HTTPS(SSL)证书
阿里云·https·ssl
福大大架构师每日一题3 天前
nginx 1.29.2 发布:AWS-LC 支持、QUIC及SSL优化等重要更新
nginx·ssl·aws
小白电脑技术13 天前
Nginx-Proxy-Manager配置SSL泛域名证书教程
运维·ssl
萧鼎14 天前
深入理解 Python `ssl` 库:安全通信的基石
python·安全·ssl
根哥的博客15 天前
ElasticSearch启用Xpack,配置ssl证书
elasticsearch·ssl
lpfasd12315 天前
SSL证书有效期缩短至200天的影响
网络·网络协议·ssl
康一夏16 天前
git fatal:Server aborted the SSL handshake
git·网络协议·ssl
lendsomething16 天前
解决SSL握手失败问题:SSLHandshakeException: Received fatal alert: handshake_failure
网络·网络协议·ssl
山巅16 天前
Certbot 通配符 SSL 证书申请和续期指南
ssl