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; }
相关推荐
落叶_Jim3 天前
Let‘s Encrypt证书有效期缩短至90天后,如何实现自动续期
网络协议·https·ssl
七七powerful3 天前
AI+运维提效,ssl-cert-monitoring(SSL证书监控系统)2.0开发完毕
运维·网络协议·ssl
七七powerful3 天前
AI+运维提效,ssl-cert-monitoring(SSL证书监控系统)2.0修复bug及新增功能说明
运维·服务器·ssl
乐hh5 天前
DM8配置SSL
数据库·docker·ssl
乐hh5 天前
KingbaseV8R6配置SSL
数据库·ssl
醉颜凉7 天前
超详细图解:HTTPS 中的 SSL/TLS 完整握手过程(面试必背)
面试·https·ssl
wapicn998 天前
设置好这一步,让你的SSL证书在到期前自动续期,永不过期
网络·网络协议·ssl
KnowSafe11 天前
自动化+智能化:证书生命周期管理的双重革命
ssl·itrustssl·trustasia·证书自动化
KnowSafe12 天前
CaaS vs 传统管理:证书即服务的颠覆性优势
https·ssl
ReaF_star12 天前
【安全】SSL证书更新操作手册(Nginx+Cloudflare+acme.sh)
nginx·安全·ssl