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; }
相关推荐
Lsetea3 天前
Nginx报No required SSL certificate was sent:mTLS客户端证书排查
运维·nginx·https·ssl·openssl
其实防守也摸鱼5 天前
DeepSeek Harness 开源贡献手记:从入门到合入主线
服务器·数据库·windows·https·ssl
其实防守也摸鱼6 天前
堆叠注入(Stacked Injection)详解
服务器·数据库·windows·https·ssl
JamesShi1686 天前
华为云证书续费操作全流程,针对购买华为云企业门户建站的用户!
ssl
2601_967019516 天前
SSL 证书不止加密,还影响网站信任与 SEO
ssl
2601_967019517 天前
证书兼容性排查:SSL 部署后浏览器不安全告警分析
ssl
2601_967019519 天前
没有 SSL 证书的网站,会有哪些安全与流量损失?
ssl
一个心烑10 天前
配置项目git的 SSL 证书
git·网络协议·ssl
IT摆渡者11 天前
1panel 配置申请手动解析网站SSL证书
服务器·网络协议·ssl
IT摆渡者11 天前
1panel 针对HTTP自动续签SSL网站证书
网络协议·ssl·openresty