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; }
相关推荐
被一米六支配的恐惧13 小时前
nginx配置ssl证书,实现https安全访问.
nginx·https·ssl
菌菌的快乐生活18 小时前
SSL证书颁发机构有哪些呢
网络·网络协议·ssl
时间裂缝里的猫-O-18 小时前
@linux系统SSL证书转换(Openssl转换PFX)
linux·运维·ssl
小黄人软件1 天前
PCI认证 密钥注入 ECC算法工具 NID_secp521r1 国密算法 openssl 全套证书生成,从证书提取公私钥数组 x,y等
算法·https·ssl
KnowSafe2 天前
SSL报错ERR_SSL_PROTOCOL_ERROR怎么办?
网络·网络协议·ssl
Lorin 洛林2 天前
修复SSL证书链不完整问题certificate verify failed unable to get local issuer certificate
数据库·网络协议·ssl
Aa美少女战士2 天前
企业如何选择通配符 SSL 证书?
网络协议·https·ssl
JavaEdge.5 天前
ssl.SSLCertVerificationError报错解决方案
网络·网络协议·ssl
大乔乔布斯6 天前
AttributeError: module ‘smtplib‘ has no attribute ‘SMTP_SSL‘ 解决方法
python·bash·ssl
Aa美少女战士6 天前
单域名 vs 通配符:如何选择最适合你的 SSL 证书?
网络协议·https·ssl