[英]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.