Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
35f4850a
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
9
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
35f4850a
编写于
1月 07, 2000
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More X509_ATTRIBUTE changes.
上级
add9e254
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
49 addition
and
18 deletion
+49
-18
CHANGES
CHANGES
+11
-0
apps/x509.c
apps/x509.c
+2
-2
crypto/asn1/a_strnid.c
crypto/asn1/a_strnid.c
+4
-1
crypto/asn1/asn1.h
crypto/asn1/asn1.h
+1
-0
crypto/asn1/x_x509a.c
crypto/asn1/x_x509a.c
+2
-2
crypto/x509/x509.h
crypto/x509/x509.h
+6
-5
crypto/x509/x509_att.c
crypto/x509/x509_att.c
+21
-6
util/libeay.num
util/libeay.num
+2
-2
未找到文件。
CHANGES
浏览文件 @
35f4850a
...
...
@@ -4,6 +4,17 @@
Changes between 0.9.4 and 0.9.5 [xx XXX 1999]
*) Add PKCS#10 attributes to field table: challengePassword,
unstructuredName and unstructuredAddress. These are taken from
draft PKCS#9 v2.0 but are compatible with v1.2 provided no
international characters are used.
More changes to X509_ATTRIBUTE code: allow the setting of types
based on strings. Remove the 'loc' parameter when adding
attributes because these will be a SET OF encoding which is sorted
in ASN1 order.
[Steve Henson]
*) Initial changes to the 'req' utility to allow request generation
automation. This will allow an application to just generate a template
file containing all the field values and have req construct the
...
...
apps/x509.c
浏览文件 @
35f4850a
...
...
@@ -557,7 +557,7 @@ bad:
}
}
if
(
alias
)
X509_alias_set
(
x
,
(
unsigned
char
*
)
alias
,
-
1
);
if
(
alias
)
X509_alias_
r
set
(
x
,
(
unsigned
char
*
)
alias
,
-
1
);
if
(
clrtrust
)
X509_trust_clear
(
x
);
if
(
clrreject
)
X509_reject_clear
(
x
);
...
...
@@ -601,7 +601,7 @@ bad:
else
if
(
aliasout
==
i
)
{
unsigned
char
*
alstr
;
alstr
=
X509_alias_get
(
x
,
NULL
);
alstr
=
X509_alias_
i
get
(
x
,
NULL
);
if
(
alstr
)
BIO_printf
(
STDout
,
"%s
\n
"
,
alstr
);
else
BIO_puts
(
STDout
,
"<No Alias>
\n
"
);
}
...
...
crypto/asn1/a_strnid.c
浏览文件 @
35f4850a
...
...
@@ -163,11 +163,14 @@ static ASN1_STRING_TABLE tbl_standard[] = {
{
NID_organizationName
,
1
,
ub_organization_name
,
DIRSTRING_TYPE
,
0
},
{
NID_organizationalUnitName
,
1
,
ub_organization_unit_name
,
DIRSTRING_TYPE
,
0
},
{
NID_pkcs9_emailAddress
,
1
,
ub_email_address
,
B_ASN1_IA5STRING
,
STABLE_NO_MASK
},
{
NID_pkcs9_unstructuredName
,
1
,
-
1
,
PKCS9STRING_TYPE
,
0
},
{
NID_pkcs9_challengePassword
,
1
,
-
1
,
PKCS9STRING_TYPE
,
0
},
{
NID_pkcs9_unstructuredAddress
,
1
,
-
1
,
DIRSTRING_TYPE
,
0
},
{
NID_givenName
,
1
,
ub_name
,
DIRSTRING_TYPE
,
0
},
{
NID_surname
,
1
,
ub_name
,
DIRSTRING_TYPE
,
0
},
{
NID_initials
,
1
,
ub_name
,
DIRSTRING_TYPE
,
0
},
{
NID_name
,
1
,
ub_name
,
DIRSTRING_TYPE
,
0
},
{
NID_dnQualifier
,
-
1
,
-
1
,
B_ASN1_PRINTABLESTRING
,
STABLE_NO_MASK
}
,
{
NID_dnQualifier
,
-
1
,
-
1
,
B_ASN1_PRINTABLESTRING
,
STABLE_NO_MASK
}
};
static
int
sk_table_cmp
(
ASN1_STRING_TABLE
**
a
,
ASN1_STRING_TABLE
**
b
)
...
...
crypto/asn1/asn1.h
浏览文件 @
35f4850a
...
...
@@ -215,6 +215,7 @@ typedef struct asn1_string_st
#define STABLE_NO_MASK 0x02
#define DIRSTRING_TYPE \
(B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)
#define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)
typedef
struct
asn1_string_table_st
{
int
nid
;
...
...
crypto/asn1/x_x509a.c
浏览文件 @
35f4850a
...
...
@@ -144,7 +144,7 @@ static X509_CERT_AUX *aux_get(X509 *x)
return
x
->
aux
;
}
int
X509_alias_set
(
X509
*
x
,
unsigned
char
*
name
,
int
len
)
int
X509_alias_
r
set
(
X509
*
x
,
unsigned
char
*
name
,
int
len
)
{
X509_CERT_AUX
*
aux
;
if
(
!
(
aux
=
aux_get
(
x
)))
return
0
;
...
...
@@ -152,7 +152,7 @@ int X509_alias_set(X509 *x, unsigned char *name, int len)
return
ASN1_STRING_set
(
aux
->
alias
,
name
,
len
);
}
unsigned
char
*
X509_alias_get
(
X509
*
x
,
int
*
len
)
unsigned
char
*
X509_alias_
i
get
(
X509
*
x
,
int
*
len
)
{
if
(
!
x
->
aux
||
!
x
->
aux
->
alias
)
return
NULL
;
if
(
len
)
*
len
=
x
->
aux
->
alias
->
length
;
...
...
crypto/x509/x509.h
浏览文件 @
35f4850a
...
...
@@ -818,8 +818,8 @@ void X509_CERT_AUX_free(X509_CERT_AUX *a);
int
i2d_X509_CERT_AUX
(
X509_CERT_AUX
*
a
,
unsigned
char
**
pp
);
X509_CERT_AUX
*
d2i_X509_CERT_AUX
(
X509_CERT_AUX
**
a
,
unsigned
char
**
pp
,
long
length
);
int
X509_alias_set
(
X509
*
x
,
unsigned
char
*
name
,
int
len
);
unsigned
char
*
X509_alias_get
(
X509
*
x
,
int
*
len
);
int
X509_alias_
r
set
(
X509
*
x
,
unsigned
char
*
name
,
int
len
);
unsigned
char
*
X509_alias_
i
get
(
X509
*
x
,
int
*
len
);
int
(
*
X509_TRUST_set_default
(
int
(
*
trust
)(
int
,
X509
*
,
int
)))(
int
,
X509
*
,
int
);
int
X509_radd_trust_object
(
X509
*
x
,
ASN1_OBJECT
*
obj
);
int
X509_radd_reject_object
(
X509
*
x
,
ASN1_OBJECT
*
obj
);
...
...
@@ -1030,13 +1030,14 @@ X509_ATTRIBUTE *X509_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc);
STACK_OF
(
X509_ATTRIBUTE
)
*
X509_radd_attr
(
STACK_OF
(
X509_ATTRIBUTE
)
**
x
,
X509_ATTRIBUTE
*
attr
,
int
loc
);
X509_ATTRIBUTE
*
X509_ATTRIBUTE_create_by_NID
(
X509_ATTRIBUTE
**
attr
,
int
nid
,
int
atrtype
,
void
*
data
);
int
atrtype
,
void
*
data
,
int
len
);
X509_ATTRIBUTE
*
X509_ATTRIBUTE_create_by_OBJ
(
X509_ATTRIBUTE
**
attr
,
ASN1_OBJECT
*
obj
,
int
atrtype
,
void
*
data
);
ASN1_OBJECT
*
obj
,
int
atrtype
,
void
*
data
,
int
len
);
int
X509_ATTRIBUTE_rset_object
(
X509_ATTRIBUTE
*
attr
,
ASN1_OBJECT
*
obj
);
int
X509_ATTRIBUTE_
iset_data
(
X509_ATTRIBUTE
*
attr
,
int
attrtype
,
void
*
data
);
int
X509_ATTRIBUTE_
rset_data
(
X509_ATTRIBUTE
*
attr
,
int
attrtype
,
void
*
data
,
int
len
);
void
*
X509_ATTRIBUTE_iget_data
(
X509_ATTRIBUTE
*
attr
,
int
idx
,
int
atrtype
,
void
*
data
);
int
X509_ATTRIBUTE_count
(
X509_ATTRIBUTE
*
attr
);
ASN1_OBJECT
*
X509_ATTRIBUTE_iget_object
(
X509_ATTRIBUTE
*
attr
);
ASN1_TYPE
*
X509_ATTRIBUTE_type_iget
(
X509_ATTRIBUTE
*
attr
,
int
idx
);
...
...
crypto/x509/x509_att.c
浏览文件 @
35f4850a
...
...
@@ -154,7 +154,7 @@ err2:
}
X509_ATTRIBUTE
*
X509_ATTRIBUTE_create_by_NID
(
X509_ATTRIBUTE
**
attr
,
int
nid
,
int
atrtype
,
void
*
data
)
int
atrtype
,
void
*
data
,
int
len
)
{
ASN1_OBJECT
*
obj
;
X509_ATTRIBUTE
*
ret
;
...
...
@@ -165,13 +165,13 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,
X509err
(
X509_F_X509_ATTRIBUTE_CREATE_BY_NID
,
X509_R_UNKNOWN_NID
);
return
(
NULL
);
}
ret
=
X509_ATTRIBUTE_create_by_OBJ
(
attr
,
obj
,
atrtype
,
data
);
ret
=
X509_ATTRIBUTE_create_by_OBJ
(
attr
,
obj
,
atrtype
,
data
,
len
);
if
(
ret
==
NULL
)
ASN1_OBJECT_free
(
obj
);
return
(
ret
);
}
X509_ATTRIBUTE
*
X509_ATTRIBUTE_create_by_OBJ
(
X509_ATTRIBUTE
**
attr
,
ASN1_OBJECT
*
obj
,
int
atrtype
,
void
*
data
)
ASN1_OBJECT
*
obj
,
int
atrtype
,
void
*
data
,
int
len
)
{
X509_ATTRIBUTE
*
ret
;
...
...
@@ -188,7 +188,7 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
if
(
!
X509_ATTRIBUTE_rset_object
(
ret
,
obj
))
goto
err
;
if
(
!
X509_ATTRIBUTE_
iset_data
(
ret
,
atrtype
,
data
))
if
(
!
X509_ATTRIBUTE_
rset_data
(
ret
,
atrtype
,
data
,
len
))
goto
err
;
if
((
attr
!=
NULL
)
&&
(
*
attr
==
NULL
))
*
attr
=
ret
;
...
...
@@ -208,15 +208,30 @@ int X509_ATTRIBUTE_rset_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj)
return
(
1
);
}
int
X509_ATTRIBUTE_
iset_data
(
X509_ATTRIBUTE
*
attr
,
int
attrtype
,
void
*
data
)
int
X509_ATTRIBUTE_
rset_data
(
X509_ATTRIBUTE
*
attr
,
int
attrtype
,
void
*
data
,
int
len
)
{
ASN1_TYPE
*
ttmp
;
ASN1_STRING
*
stmp
;
int
atype
;
if
(
!
attr
)
return
0
;
if
(
attrtype
&
MBSTRING_FLAG
)
{
stmp
=
ASN1_STRING_set_by_NID
(
NULL
,
data
,
len
,
attrtype
,
OBJ_obj2nid
(
attr
->
object
));
if
(
!
stmp
)
{
X509err
(
X509_F_X509_ATTRIBUTE_ISET_DATA
,
ERR_R_ASN1_LIB
);
return
0
;
}
atype
=
stmp
->
type
;
}
else
{
if
(
!
(
stmp
=
ASN1_STRING_type_new
(
attrtype
)))
goto
err
;
if
(
!
ASN1_STRING_set
(
stmp
,
data
,
len
))
goto
err
;
atype
=
attrtype
;
}
if
(
!
(
attr
->
value
.
set
=
sk_ASN1_TYPE_new_null
()))
goto
err
;
if
(
!
(
ttmp
=
ASN1_TYPE_new
()))
goto
err
;
if
(
!
sk_ASN1_TYPE_push
(
attr
->
value
.
set
,
ttmp
))
goto
err
;
attr
->
set
=
1
;
ASN1_TYPE_set
(
ttmp
,
at
trt
ype
,
data
);
ASN1_TYPE_set
(
ttmp
,
atype
,
data
);
return
1
;
err:
X509err
(
X509_F_X509_ATTRIBUTE_ISET_DATA
,
ERR_R_MALLOC_FAILURE
);
...
...
util/libeay.num
浏览文件 @
35f4850a
...
...
@@ -1905,7 +1905,7 @@ sk_X509_PURPOSE_value 1929
sk_X509_PURPOSE_zero 1930
X509_TRUST_add 1931
ASN1_VISIBLESTRING_new 1932
X509_alias_
set
1933
X509_alias_
rset
1933
ASN1_PRINTABLESTRING_free 1934
EVP_PKEY_rget_DSA 1935
ASN1_BMPSTRING_new 1936
...
...
@@ -2046,7 +2046,7 @@ sk_ASN1_STRING_TABLE_set_cmp_func 2070
X509_NAME_ENTRY_create_by_txt 2071
ASN1_STRING_get_default_mask 2072
sk_X509_TRUST_dup 2073
X509_alias_
get
2074
X509_alias_
iget
2074
ASN1_STRING_data 2075
sk_X509_TRUST_insert 2076
i2d_ACCESS_DESCRIPTION 2077
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录