简体   繁体   English

openssl 1.1.0 中 X509 的名称字段在哪里?

[英]Where is X509's name field in openssl 1.1.0?

I am migrating an application from openssl 1.0.2 to 1.1.0.我正在将应用程序从 openssl 1.0.2 迁移到 1.1.0。 The problem is the name field in X509 struct is missing, so I don't know how to update the code like cert->name now.问题是 X509 结构中的 name 字段丢失,所以我现在不知道如何更新cert->name之类的代码。

openssl 1.0.2 openssl 1.0.2

struct x509_st {
    X509_CINF *cert_info;
    X509_ALGOR *sig_alg;
    ASN1_BIT_STRING *signature;
    int valid;
    int references;
    char *name;
    CRYPTO_EX_DATA ex_data;
    /* These contain copies of various extension values */
    long ex_pathlen;
    long ex_pcpathlen;
    unsigned long ex_flags;
    unsigned long ex_kusage;
    unsigned long ex_xkusage;
    unsigned long ex_nscert;
    ASN1_OCTET_STRING *skid;
    AUTHORITY_KEYID *akid;
    X509_POLICY_CACHE *policy_cache;
    STACK_OF(DIST_POINT) *crldp;
    STACK_OF(GENERAL_NAME) *altname;
    NAME_CONSTRAINTS *nc;
# ifndef OPENSSL_NO_RFC3779
    STACK_OF(IPAddressFamily) *rfc3779_addr;
    struct ASIdentifiers_st *rfc3779_asid;
# endif
# ifndef OPENSSL_NO_SHA
    unsigned char sha1_hash[SHA_DIGEST_LENGTH];
# endif
    X509_CERT_AUX *aux;
} /* X509 */ ;

openssl 1.1.0 openssl 1.1.0

struct x509_st {
    X509_CINF cert_info;
    X509_ALGOR sig_alg;
    ASN1_BIT_STRING signature;
    int references;
    CRYPTO_EX_DATA ex_data;
    /* These contain copies of various extension values */
    long ex_pathlen;
    long ex_pcpathlen;
    uint32_t ex_flags;
    uint32_t ex_kusage;
    uint32_t ex_xkusage;
    uint32_t ex_nscert;
    ASN1_OCTET_STRING *skid;
    AUTHORITY_KEYID *akid;
    X509_POLICY_CACHE *policy_cache;
    STACK_OF(DIST_POINT) *crldp;
    STACK_OF(GENERAL_NAME) *altname;
    NAME_CONSTRAINTS *nc;
#ifndef OPENSSL_NO_RFC3779
    STACK_OF(IPAddressFamily) *rfc3779_addr;
    struct ASIdentifiers_st *rfc3779_asid;
# endif
    unsigned char sha1_hash[SHA_DIGEST_LENGTH];
    X509_CERT_AUX *aux;
    CRYPTO_RWLOCK *lock;
    volatile int ex_cached;
} /* X509 */ ;

Apparently it was unused.显然它没有被使用。 From the mailing list :邮件列表

although the name field was present in 1.0.2 it was not used for anything.尽管 name 字段存在于 1.0.2 中,但它没有用于任何用途。 So there was no point in keeping it once the structure was made non-public in 1.1.0.因此,一旦该结构在 1.1.0 中非公开,就没有必要保留它了。

Here's the commit if anyone is interested: 359aa38fbeec如果有人感兴趣,这是提交: 359aa38fbeec

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 openssl 中定义的 X509(typedef、define 等)在哪里? - Where is the X509 defined (typedef, define, whatever…) in openssl? 有没有办法获取 C++ 中发送给对等方的 OpenSSL X509 证书名称? - Is there a way to get the OpenSSL X509 certificate name that im sending to peer in C++? 将PEM格式的x509证书转换为Openssl的x509结构格式 - Convert x509 certificate in PEM format to x509 structure format of Openssl 使用OpenSSL以编程方式在X509证书中输入数据 - Programmatically input data in X509 Certificate using OpenSSL 使用openssl库获取x509证书哈希 - Get x509 certificate hash with openssl library 使用 C 中的 OpenSSL 修改 X509 证书中的扩展列表 - Modifying extension list in X509 certificate using OpenSSL in C OpenSSL x509证书:使用X509_add1_ext_i2d()添加扩展 - OpenSSL x509 Certificate: Add Extension with X509_add1_ext_i2d() 有什么方法可以获得 X509 证书的可打印版本的长度(由 X509_print* openssl 函数打印)? - Any way to get length of printable version of a X509 certificate (that is printed by X509_print* openssl function)? C或Obj-C中具有X509和PKCS#8编码的OpenSSL RSA密钥对 - OpenSSL RSA Keypair with X509 and PKCS#8 encoding in C or Obj-C 使用OpenSSL将证书链从PEM文件加载到STACK_OF(X509)* - Load certificate chain from PEM file into STACK_OF(X509)* using OpenSSL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM