mirror of
https://gitee.com/openharmony/security_certificate_manager
synced 2024-11-23 07:29:54 +00:00
增加strname判空校验
Signed-off-by: 张余 <1459392684@qq.com> Change-Id: I60b099f0330847c4ac5f74d2842f5cee8455c2cd
This commit is contained in:
parent
7413e0382f
commit
f71fcbf4c5
@ -108,6 +108,10 @@ static int32_t ToStringName(FUNC func, const X509 *x509cert, const char *objname
|
||||
X509_NAME_ENTRY *entry = X509_NAME_get_entry(name, i);
|
||||
const char *strname = OBJ_nid2sn(OBJ_obj2nid(X509_NAME_ENTRY_get_object(entry)));
|
||||
|
||||
if (strname == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(objname, strname) == 0) {
|
||||
char *data = NULL;
|
||||
length = ASN1_STRING_to_UTF8((unsigned char **)&data, X509_NAME_ENTRY_get_data(entry));
|
||||
|
Loading…
Reference in New Issue
Block a user