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; }
相关推荐
BullSmall2 天前
Prometheus 如何配置监控 SSL 证书即将过期
网络协议·ssl·prometheus
Zhu7582 天前
【软件更新】在Ubuntu24 LTS中更新openssl到指定版本,例如openssl3.5.6 LTS
linux·ssh·ssl
阿凤215 天前
nginx部署如何配置ssl证书
运维·nginx·ssl
AscendKing5 天前
一款开源、本地部署的 SSL 证书自动化管理工具Certimate介绍 部署教程
开源·自动化·ssl
MonkeyKing_sunyuhua5 天前
Nginx + Let’s Encrypt 免费 SSL 证书 的完整配置过程
运维·nginx·ssl
wAEWQ6Ib77 天前
当今互联网安全的基石 - TLS/SSL
网络·安全·ssl
芯智工坊7 天前
第8章 Mosquitto消息高级特性
网络·人工智能·mqtt·开源·ssl
芯智工坊7 天前
第7章 Mosquitto增加SSL/TLS加密通信
网络协议·https·ssl
EmbeddedCore7 天前
低成本物联网产品放弃SSL加密的隐形成本与市场逻辑
物联网·网络协议·ssl
EmbeddedCore8 天前
守护网络通信的基石:深入解析SSL/TLS协议
网络·网络协议·ssl