Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
87a25f90
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看板
提交
87a25f90
编写于
25年前
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow the extension section specified in config files to be overridden
on the command line for various utilities.
上级
f9150e54
无相关合并请求
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
7 deletion
+46
-7
CHANGES
CHANGES
+8
-0
apps/ca.c
apps/ca.c
+15
-3
apps/req.c
apps/req.c
+16
-3
apps/x509.c
apps/x509.c
+7
-1
未找到文件。
CHANGES
浏览文件 @
87a25f90
...
...
@@ -4,6 +4,14 @@
Changes between 0.9.4 and 0.9.5 [xx XXX 1999]
*) Allow the config file extension section to be overwritten on the
command line. Based on an original idea from Massimiliano Pala
<madwolf@comune.modena.it>. The new option is called -extensions
and can be applied to ca, req and x509. Also -reqexts to override
the request extensions in req and -crlexts to override the crl extensions
in ca.
[Steve Henson]
*) Add new feature to the SPKAC handling in ca. Now you can include
the same field multiple times by preceding it by "XXXX." for example:
1.OU="Unit name 1"
...
...
This diff is collapsed.
Click to expand it.
apps/ca.c
浏览文件 @
87a25f90
...
...
@@ -163,6 +163,8 @@ static char *ca_usage[]={
" -batch - Don't ask questions
\n
"
,
" -msie_hack - msie modifications to handle all those universal strings
\n
"
,
" -revoke file - Revoke a certificate (given in file)
\n
"
,
" -extensions .. - Extension section (override value in config file)
\n
"
,
" -crlexts .. - CRL extension section (override value in config file)
\n
"
,
NULL
};
...
...
@@ -393,6 +395,16 @@ EF_ALIGNMENT=0;
infile
=
*
(
++
argv
);
dorevoke
=
1
;
}
else
if
(
strcmp
(
*
argv
,
"-extensions"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
extensions
=
*
(
++
argv
);
}
else
if
(
strcmp
(
*
argv
,
"-crlexts"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
crl_ext
=
*
(
++
argv
);
}
else
{
bad:
...
...
@@ -720,8 +732,8 @@ bad:
lookup_fail
(
section
,
ENV_SERIAL
);
goto
err
;
}
extensions
=
CONF_get_string
(
conf
,
section
,
ENV_EXTENSIONS
);
if
(
!
extensions
)
extensions
=
CONF_get_string
(
conf
,
section
,
ENV_EXTENSIONS
);
if
(
extensions
)
{
/* Check syntax of file */
X509V3_CTX
ctx
;
...
...
@@ -1031,7 +1043,7 @@ bad:
/*****************************************************************/
if
(
gencrl
)
{
crl_ext
=
CONF_get_string
(
conf
,
section
,
ENV_CRLEXT
);
if
(
!
crl_ext
)
crl_ext
=
CONF_get_string
(
conf
,
section
,
ENV_CRLEXT
);
if
(
crl_ext
)
{
/* Check syntax of file */
X509V3_CTX
ctx
;
...
...
This diff is collapsed.
Click to expand it.
apps/req.c
浏览文件 @
87a25f90
...
...
@@ -310,8 +310,17 @@ int MAIN(int argc, char **argv)
/* ok */
digest
=
md_alg
;
}
else
if
(
strcmp
(
*
argv
,
"-extensions"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
extensions
=
*
(
++
argv
);
}
else
if
(
strcmp
(
*
argv
,
"-reqexts"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
req_exts
=
*
(
++
argv
);
}
else
{
BIO_printf
(
bio_err
,
"unknown option %s
\n
"
,
*
argv
);
badops
=
1
;
...
...
@@ -349,6 +358,8 @@ bad:
BIO_printf
(
bio_err
,
" -asn1-kludge Output the 'request' in a format that is wrong but some CA's
\n
"
);
BIO_printf
(
bio_err
,
" have been reported as requiring
\n
"
);
BIO_printf
(
bio_err
,
" [ It is now always turned on but can be turned off with -no-asn1-kludge ]
\n
"
);
BIO_printf
(
bio_err
,
" -extensions .. specify certificate extension section (override value in config file)
\n
"
);
BIO_printf
(
bio_err
,
" -reqexts .. specify request extension section (override value in config file)
\n
"
);
goto
end
;
}
...
...
@@ -427,7 +438,8 @@ bad:
digest
=
md_alg
;
}
extensions
=
CONF_get_string
(
req_conf
,
SECTION
,
V3_EXTENSIONS
);
if
(
!
extensions
)
extensions
=
CONF_get_string
(
req_conf
,
SECTION
,
V3_EXTENSIONS
);
if
(
extensions
)
{
/* Check syntax of file */
X509V3_CTX
ctx
;
...
...
@@ -440,7 +452,8 @@ bad:
}
}
req_exts
=
CONF_get_string
(
req_conf
,
SECTION
,
REQ_EXTENSIONS
);
if
(
!
req_exts
)
req_exts
=
CONF_get_string
(
req_conf
,
SECTION
,
REQ_EXTENSIONS
);
if
(
req_exts
)
{
/* Check syntax of file */
X509V3_CTX
ctx
;
...
...
This diff is collapsed.
Click to expand it.
apps/x509.c
浏览文件 @
87a25f90
...
...
@@ -115,6 +115,7 @@ static char *x509_usage[]={
" -C - print out C code forms
\n
"
,
" -md2/-md5/-sha1/-mdc2 - digest to do an RSA sign with
\n
"
,
" -extfile - configuration file with X509V3 extensions to add
\n
"
,
" -extensions - section from config file with X509V3 extensions to add
\n
"
,
NULL
};
...
...
@@ -218,6 +219,11 @@ int MAIN(int argc, char **argv)
if
(
--
argc
<
1
)
goto
bad
;
extfile
=
*
(
++
argv
);
}
else
if
(
strcmp
(
*
argv
,
"-extensions"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
extsect
=
*
(
++
argv
);
}
else
if
(
strcmp
(
*
argv
,
"-in"
)
==
0
)
{
if
(
--
argc
<
1
)
goto
bad
;
...
...
@@ -335,7 +341,7 @@ bad:
,
errorline
,
extfile
);
goto
end
;
}
if
(
!
(
extsect
=
CONF_get_string
(
extconf
,
"default"
,
if
(
!
extsect
&&
!
(
extsect
=
CONF_get_string
(
extconf
,
"default"
,
"extensions"
)))
extsect
=
"default"
;
X509V3_set_ctx_test
(
&
ctx2
);
X509V3_set_conf_lhash
(
&
ctx2
,
extconf
);
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部