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; }
相关推荐
2601_967019511 天前
服务器SSL配置要点,规避HTTPS访问异常风险
服务器·https·ssl
Lsetea3 天前
ACME 报 rate limit:Let‘s Encrypt 限速类型与重试策略
运维·https·证书·ssl·acme
今夕资源网4 天前
本地SSL证书生成工具本地 HTTPS 配置不用再敲命令:CertTool 一站式管理自签证书与 Hosts
网络协议·https·ssl·ssl证书生成·ssl本地测试证书
瓦格哈儿6 天前
删掉旧 SSL 证书会影响线上业务吗?风险点梳理
网络协议·https·ssl
姚不倒6 天前
HAProxy 系列(二):健康检查与 SSL 卸载 — 保障可用性与性能
运维·网络·网络协议·ssl·haproxy
MyFreeIT8 天前
Let‘s Encrypt SSL 製作免費證書
网络协议·https·ssl
00后程序员张8 天前
Android证书绑定抓包失败?Android SSL Pinning绕过实战指南
android·网络协议·计算机网络·网络安全·adb·https·ssl
武帝为此8 天前
【TLS SSL 介绍】
网络·网络协议·ssl
吠品11 天前
SQL Server 版本查询的几种实用方法
数据库·网络协议·ssl
瓦格哈儿12 天前
内网环境也需要证书?聊聊内网 IP 证书的适用边界
网络协议·ssl