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; }
相关推荐
Gworg7 小时前
您与此网站之间建立的连接不安全
网络协议·安全·ssl
大秦王多鱼2 天前
Kafka SSL(TLS)安全协议
安全·kafka·ssl
初级代码游戏4 天前
openssl 生成证书 windows导入证书
网络·网络协议·ssl·openssl
滚雪球~6 天前
宝塔面板SSL加密访问设置教程
网络·网络协议·ssl
WoTrusSSL6 天前
如何使用 OpenSSL 检查 Linux 中的 SSL 证书
linux·运维·服务器·ssl
yong15858553436 天前
Linux C openssl aes-128-cbc demo
linux·c语言·ssl
初级代码游戏12 天前
openssl 正确生成v3带SAN的证书
https·证书·ssl·openssl·tls·v3
果果开发ggdoc.cn12 天前
WordPress免费证书插件
服务器·https·ssl
sunnyday042612 天前
feign调用跳过HTTPS的SSL证书校验配置详解
java·网络·https·ssl