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; }
相关推荐
XMYX-013 小时前
解决 Apache/WAF SSL 证书链不完整导致的 PKIX path building failed 问题
网络协议·apache·ssl
少陽君2 天前
什么是CA根证书
服务器·https·ssl
梦想blog2 天前
漏洞修复 Nginx TLSSSL 弱密码套件
运维·nginx·ssl·漏洞修复·tlsv1.2
yong15858553432 天前
利用 openssl api 实现 TLS 双向认证
linux·ssl
XYiFfang3 天前
【Python+requests】解决Python requests中的ProxyError:SSL版本错误问题详解
python·debug·ssl·常见错误·代理配置
Linux运维技术栈5 天前
Linux系统部署:Certbot 实现 Nginx 自动续期&部署 Let‘s Encrypt 免费 SSL 证书
linux·运维·nginx·ssl·certbot
m0_474606787 天前
Nginx + Certbot配置 HTTPS / SSL 证书(简化版已测试)
nginx·https·ssl
神色自若9 天前
AbpVnext 阿里云ssl证书多个生产环境自动更新
服务器·阿里云·ssl
码农康康10 天前
【国密证书】CentOS 7 安装 GmSSL 并生成国密证书
linux·ssl·国密·国密证书
张太行_14 天前
网络SSL/TLS协议详解
网络·web安全·ssl