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; }
相关推荐
w1wi20 小时前
安卓抓包完全指南(一):从入门到 SSL Pinning 绕过
android·网络协议·ssl
Navicat中国1 天前
使用 SSL/TLS 安全连接数据库
数据库·安全·ssl
成空的梦想2 天前
免费 vs 付费国密 SSL 怎么选?
服务器·网络·网络协议·http·https·ssl
江上清风山间明月4 天前
RPC failed; curl 65 OpenSSL SSL_read: OpenSSL/3.1.2错误解决方法
网络协议·rpc·ssl·failed
Edward111111116 天前
SSL/TSL配置 集群节点间通信加密还有客户端
linux·服务器·ssl
七七powerful6 天前
AI+运维提效--SSL 证书监控系统v3.0版本开发完成
网络·网络协议·ssl
HelloWorld工程师7 天前
SSL证书在哪里可以免费且快速申请?
服务器·网络协议·ssl
落叶_Jim10 天前
Let‘s Encrypt证书有效期缩短至90天后,如何实现自动续期
网络协议·https·ssl
七七powerful10 天前
AI+运维提效,ssl-cert-monitoring(SSL证书监控系统)2.0开发完毕
运维·网络协议·ssl
七七powerful10 天前
AI+运维提效,ssl-cert-monitoring(SSL证书监控系统)2.0修复bug及新增功能说明
运维·服务器·ssl