Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
9b5cc156
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
9b5cc156
编写于
1月 20, 1999
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Continued patches so certificates and CRLs now can support and use
GeneralizedTime.
上级
6f935399
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
53 addition
and
28 deletion
+53
-28
CHANGES
CHANGES
+8
-0
apps/crl.c
apps/crl.c
+3
-3
apps/pkcs7.c
apps/pkcs7.c
+2
-2
apps/s_cb.c
apps/s_cb.c
+2
-2
apps/x509.c
apps/x509.c
+2
-2
crypto/asn1/t_x509.c
crypto/asn1/t_x509.c
+2
-2
crypto/asn1/x_cinf.c
crypto/asn1/x_cinf.c
+7
-0
crypto/asn1/x_crl.c
crypto/asn1/x_crl.c
+17
-7
crypto/asn1/x_val.c
crypto/asn1/x_val.c
+10
-10
未找到文件。
CHANGES
浏览文件 @
9b5cc156
...
...
@@ -5,6 +5,13 @@
Changes between 0.9.1c and 0.9.2
*) Continuing patches for GeneralizedTime. Fix up certificate and CRL
ASN1 to use ASN1_TIME and modify print routines to use ASN1_TIME_print.
Removed the versions check from X509 routines when loading extensions:
this allows certain broken certificates that don't set the version
properly to be processed.
[Steve Henson]
*) Deal with irritating shit to do with dependencies, in YAAHW (Yet Another
Ad Hoc Way) - Makefile.ssls now all contain local dependencies, which
can still be regenerated with "make depend".
...
...
@@ -22,6 +29,7 @@
C file. To rebuild all the error codes from scratch (the old behaviour)
either modify crypto/Makefile.ssl to pass the -regen flag to err_code.pl
or delete all the .err files.
[Steve Henson]
*) CAST-128 was incorrectly implemented for short keys. The C version has
been fixed, but is untested. The assembler versions are also fixed, but
...
...
apps/crl.c
浏览文件 @
9b5cc156
...
...
@@ -214,14 +214,14 @@ bad:
if
(
lastupdate
==
i
)
{
fprintf
(
stdout
,
"lastUpdate="
);
ASN1_
UTC
TIME_print
(
bio_out
,
x
->
crl
->
lastUpdate
);
ASN1_TIME_print
(
bio_out
,
x
->
crl
->
lastUpdate
);
fprintf
(
stdout
,
"
\n
"
);
}
if
(
nextupdate
==
i
)
{
fprintf
(
stdout
,
"nextUpdate="
);
if
(
x
->
crl
->
nextUpdate
!=
NULL
)
ASN1_
UTC
TIME_print
(
bio_out
,
x
->
crl
->
nextUpdate
);
ASN1_TIME_print
(
bio_out
,
x
->
crl
->
nextUpdate
);
else
fprintf
(
stdout
,
"NONE"
);
fprintf
(
stdout
,
"
\n
"
);
...
...
@@ -264,7 +264,7 @@ bad:
fprintf
(
stdout
,
"revoked: serialNumber="
);
i2a_ASN1_INTEGER
(
out
,
r
->
serialNumber
);
fprintf
(
stdout
,
" revocationDate="
);
ASN1_
UTC
TIME_print
(
bio_out
,
r
->
revocationDate
);
ASN1_TIME_print
(
bio_out
,
r
->
revocationDate
);
fprintf
(
stdout
,
"
\n
"
);
}
sk_free
(
sk
);
...
...
apps/pkcs7.c
浏览文件 @
9b5cc156
...
...
@@ -277,9 +277,9 @@ bad:
BIO_puts
(
out
,
buf
);
BIO_puts
(
out
,
"
\n
last update="
);
ASN1_
UTC
TIME_print
(
out
,
crl
->
crl
->
lastUpdate
);
ASN1_TIME_print
(
out
,
crl
->
crl
->
lastUpdate
);
BIO_puts
(
out
,
"
\n
next update="
);
ASN1_
UTC
TIME_print
(
out
,
crl
->
crl
->
nextUpdate
);
ASN1_TIME_print
(
out
,
crl
->
crl
->
nextUpdate
);
BIO_puts
(
out
,
"
\n
"
);
PEM_write_bio_X509_CRL
(
out
,
crl
);
...
...
apps/s_cb.c
浏览文件 @
9b5cc156
...
...
@@ -109,13 +109,13 @@ X509_STORE_CTX *ctx;
case
X509_V_ERR_CERT_NOT_YET_VALID
:
case
X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD
:
BIO_printf
(
bio_err
,
"notBefore="
);
ASN1_
UTC
TIME_print
(
bio_err
,
X509_get_notBefore
(
ctx
->
current_cert
));
ASN1_TIME_print
(
bio_err
,
X509_get_notBefore
(
ctx
->
current_cert
));
BIO_printf
(
bio_err
,
"
\n
"
);
break
;
case
X509_V_ERR_CERT_HAS_EXPIRED
:
case
X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD
:
BIO_printf
(
bio_err
,
"notAfter="
);
ASN1_
UTC
TIME_print
(
bio_err
,
X509_get_notAfter
(
ctx
->
current_cert
));
ASN1_TIME_print
(
bio_err
,
X509_get_notAfter
(
ctx
->
current_cert
));
BIO_printf
(
bio_err
,
"
\n
"
);
break
;
}
...
...
apps/x509.c
浏览文件 @
9b5cc156
...
...
@@ -550,13 +550,13 @@ bad:
else
if
(
startdate
==
i
)
{
BIO_puts
(
STDout
,
"notBefore="
);
ASN1_
UTC
TIME_print
(
STDout
,
X509_get_notBefore
(
x
));
ASN1_TIME_print
(
STDout
,
X509_get_notBefore
(
x
));
BIO_puts
(
STDout
,
"
\n
"
);
}
else
if
(
enddate
==
i
)
{
BIO_puts
(
STDout
,
"notAfter="
);
ASN1_
UTC
TIME_print
(
STDout
,
X509_get_notAfter
(
x
));
ASN1_TIME_print
(
STDout
,
X509_get_notAfter
(
x
));
BIO_puts
(
STDout
,
"
\n
"
);
}
else
if
(
fingerprint
==
i
)
...
...
crypto/asn1/t_x509.c
浏览文件 @
9b5cc156
...
...
@@ -146,9 +146,9 @@ X509 *x;
if
(
!
X509_NAME_print
(
bp
,
X509_get_issuer_name
(
x
),
16
))
goto
err
;
if
(
BIO_write
(
bp
,
"
\n
Validity
\n
"
,
18
)
<=
0
)
goto
err
;
if
(
BIO_write
(
bp
,
" Not Before: "
,
24
)
<=
0
)
goto
err
;
if
(
!
ASN1_
UTC
TIME_print
(
bp
,
X509_get_notBefore
(
x
)))
goto
err
;
if
(
!
ASN1_TIME_print
(
bp
,
X509_get_notBefore
(
x
)))
goto
err
;
if
(
BIO_write
(
bp
,
"
\n
Not After : "
,
25
)
<=
0
)
goto
err
;
if
(
!
ASN1_
UTC
TIME_print
(
bp
,
X509_get_notAfter
(
x
)))
goto
err
;
if
(
!
ASN1_TIME_print
(
bp
,
X509_get_notAfter
(
x
)))
goto
err
;
if
(
BIO_write
(
bp
,
"
\n
Subject: "
,
18
)
<=
0
)
goto
err
;
if
(
!
X509_NAME_print
(
bp
,
X509_get_subject_name
(
x
),
16
))
goto
err
;
if
(
BIO_write
(
bp
,
"
\n
Subject Public Key Info:
\n
"
,
34
)
<=
0
)
...
...
crypto/asn1/x_cinf.c
浏览文件 @
9b5cc156
...
...
@@ -147,7 +147,14 @@ long length;
M_ASN1_D2I_get_IMP_opt
(
ret
->
subjectUID
,
d2i_ASN1_BIT_STRING
,
2
,
V_ASN1_BIT_STRING
);
}
/* Note: some broken certificates include extensions but don't set
* the version number properly. By bypassing this check they can
* be parsed.
*/
#ifdef VERSION_EXT_CHECK
if
(
ver
>=
2
)
/* version 3 extensions */
#endif
{
if
(
ret
->
extensions
!=
NULL
)
while
(
sk_num
(
ret
->
extensions
))
...
...
crypto/asn1/x_crl.c
浏览文件 @
9b5cc156
...
...
@@ -85,13 +85,13 @@ unsigned char **pp;
M_ASN1_I2D_vars
(
a
);
M_ASN1_I2D_len
(
a
->
serialNumber
,
i2d_ASN1_INTEGER
);
M_ASN1_I2D_len
(
a
->
revocationDate
,
i2d_ASN1_
UTC
TIME
);
M_ASN1_I2D_len
(
a
->
revocationDate
,
i2d_ASN1_TIME
);
M_ASN1_I2D_len_SEQUENCE_opt
(
a
->
extensions
,
i2d_X509_EXTENSION
);
M_ASN1_I2D_seq_total
();
M_ASN1_I2D_put
(
a
->
serialNumber
,
i2d_ASN1_INTEGER
);
M_ASN1_I2D_put
(
a
->
revocationDate
,
i2d_ASN1_
UTC
TIME
);
M_ASN1_I2D_put
(
a
->
revocationDate
,
i2d_ASN1_TIME
);
M_ASN1_I2D_put_SEQUENCE_opt
(
a
->
extensions
,
i2d_X509_EXTENSION
);
M_ASN1_I2D_finish
();
...
...
@@ -107,7 +107,7 @@ long length;
M_ASN1_D2I_Init
();
M_ASN1_D2I_start_sequence
();
M_ASN1_D2I_get
(
ret
->
serialNumber
,
d2i_ASN1_INTEGER
);
M_ASN1_D2I_get
(
ret
->
revocationDate
,
d2i_ASN1_
UTC
TIME
);
M_ASN1_D2I_get
(
ret
->
revocationDate
,
d2i_ASN1_TIME
);
M_ASN1_D2I_get_seq_opt
(
ret
->
extensions
,
d2i_X509_EXTENSION
,
X509_EXTENSION_free
);
M_ASN1_D2I_Finish
(
a
,
X509_REVOKED_free
,
ASN1_F_D2I_X509_REVOKED
);
...
...
@@ -130,9 +130,9 @@ unsigned char **pp;
}
M_ASN1_I2D_len
(
a
->
sig_alg
,
i2d_X509_ALGOR
);
M_ASN1_I2D_len
(
a
->
issuer
,
i2d_X509_NAME
);
M_ASN1_I2D_len
(
a
->
lastUpdate
,
i2d_ASN1_
UTC
TIME
);
M_ASN1_I2D_len
(
a
->
lastUpdate
,
i2d_ASN1_TIME
);
if
(
a
->
nextUpdate
!=
NULL
)
{
M_ASN1_I2D_len
(
a
->
nextUpdate
,
i2d_ASN1_
UTC
TIME
);
}
{
M_ASN1_I2D_len
(
a
->
nextUpdate
,
i2d_ASN1_TIME
);
}
M_ASN1_I2D_len_SEQUENCE_opt
(
a
->
revoked
,
i2d_X509_REVOKED
);
M_ASN1_I2D_len_EXP_SEQUENCE_opt
(
a
->
extensions
,
i2d_X509_EXTENSION
,
0
,
V_ASN1_SEQUENCE
,
v1
);
...
...
@@ -177,8 +177,18 @@ long length;
}
M_ASN1_D2I_get
(
ret
->
sig_alg
,
d2i_X509_ALGOR
);
M_ASN1_D2I_get
(
ret
->
issuer
,
d2i_X509_NAME
);
M_ASN1_D2I_get
(
ret
->
lastUpdate
,
d2i_ASN1_UTCTIME
);
M_ASN1_D2I_get_opt
(
ret
->
nextUpdate
,
d2i_ASN1_UTCTIME
,
V_ASN1_UTCTIME
);
M_ASN1_D2I_get
(
ret
->
lastUpdate
,
d2i_ASN1_TIME
);
/* Manually handle the OPTIONAL ASN1_TIME stuff */
if
((
c
.
slen
!=
0
)
&&
(
(
(
M_ASN1_next
&
~
V_ASN1_CONSTRUCTED
)
==
V_ASN1_UNIVERSAL
|
V_ASN1_UTCTIME
)
||
(
(
(
M_ASN1_next
&
~
V_ASN1_CONSTRUCTED
)
==
V_ASN1_UNIVERSAL
|
V_ASN1_GENERALIZEDTIME
)
)
)
)
{
M_ASN1_D2I_get
(
ret
->
nextUpdate
,
d2i_ASN1_TIME
);
}
if
(
!
ret
->
nextUpdate
)
M_ASN1_D2I_get_opt
(
ret
->
nextUpdate
,
d2i_ASN1_GENERALIZEDTIME
,
V_ASN1_GENERALIZEDTIME
);
if
(
ret
->
revoked
!=
NULL
)
{
while
(
sk_num
(
ret
->
revoked
))
...
...
crypto/asn1/x_val.c
浏览文件 @
9b5cc156
...
...
@@ -71,13 +71,13 @@ unsigned char **pp;
{
M_ASN1_I2D_vars
(
a
);
M_ASN1_I2D_len
(
a
->
notBefore
,
i2d_ASN1_
UTC
TIME
);
M_ASN1_I2D_len
(
a
->
notAfter
,
i2d_ASN1_
UTC
TIME
);
M_ASN1_I2D_len
(
a
->
notBefore
,
i2d_ASN1_TIME
);
M_ASN1_I2D_len
(
a
->
notAfter
,
i2d_ASN1_TIME
);
M_ASN1_I2D_seq_total
();
M_ASN1_I2D_put
(
a
->
notBefore
,
i2d_ASN1_
UTC
TIME
);
M_ASN1_I2D_put
(
a
->
notAfter
,
i2d_ASN1_
UTC
TIME
);
M_ASN1_I2D_put
(
a
->
notBefore
,
i2d_ASN1_TIME
);
M_ASN1_I2D_put
(
a
->
notAfter
,
i2d_ASN1_TIME
);
M_ASN1_I2D_finish
();
}
...
...
@@ -91,8 +91,8 @@ long length;
M_ASN1_D2I_Init
();
M_ASN1_D2I_start_sequence
();
M_ASN1_D2I_get
(
ret
->
notBefore
,
d2i_ASN1_
UTC
TIME
);
M_ASN1_D2I_get
(
ret
->
notAfter
,
d2i_ASN1_
UTC
TIME
);
M_ASN1_D2I_get
(
ret
->
notBefore
,
d2i_ASN1_TIME
);
M_ASN1_D2I_get
(
ret
->
notAfter
,
d2i_ASN1_TIME
);
M_ASN1_D2I_Finish
(
a
,
X509_VAL_free
,
ASN1_F_D2I_X509_VAL
);
}
...
...
@@ -102,8 +102,8 @@ X509_VAL *X509_VAL_new()
ASN1_CTX
c
;
M_ASN1_New_Malloc
(
ret
,
X509_VAL
);
M_ASN1_New
(
ret
->
notBefore
,
ASN1_
UTC
TIME_new
);
M_ASN1_New
(
ret
->
notAfter
,
ASN1_
UTC
TIME_new
);
M_ASN1_New
(
ret
->
notBefore
,
ASN1_TIME_new
);
M_ASN1_New
(
ret
->
notAfter
,
ASN1_TIME_new
);
return
(
ret
);
M_ASN1_New_Error
(
ASN1_F_X509_VAL_NEW
);
}
...
...
@@ -112,8 +112,8 @@ void X509_VAL_free(a)
X509_VAL
*
a
;
{
if
(
a
==
NULL
)
return
;
ASN1_
UTC
TIME_free
(
a
->
notBefore
);
ASN1_
UTC
TIME_free
(
a
->
notAfter
);
ASN1_TIME_free
(
a
->
notBefore
);
ASN1_TIME_free
(
a
->
notAfter
);
Free
((
char
*
)
a
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录