Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
ad752b31
Commit
ad752b31
authored
Sep 29, 2016
by
neil
Browse files
support csr that contains empty CN field. fix
https://github.com/Neilpang/acme.sh/issues/306
parent
59649e9b
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
ad752b31
...
@@ -2597,10 +2597,11 @@ signcsr(){
...
@@ -2597,10 +2597,11 @@ signcsr(){
_initpath
_initpath
_csrsubj
=
$(
_readSubjectFromCSR
"
$_csrfile
"
)
_csrsubj
=
$(
_readSubjectFromCSR
"
$_csrfile
"
)
if
[
"
$?
"
!=
"0"
]
||
[
-z
"
$_csrsubj
"
]
;
then
if
[
"
$?
"
!=
"0"
]
;
then
_err
"Can not read subject from csr:
$_csrfile
"
_err
"Can not read subject from csr:
$_csrfile
"
return
1
return
1
fi
fi
_debug _csrsubj
"
$_csrsubj
"
_csrdomainlist
=
$(
_readSubjectAltNamesFromCSR
"
$_csrfile
"
)
_csrdomainlist
=
$(
_readSubjectAltNamesFromCSR
"
$_csrfile
"
)
if
[
"
$?
"
!=
"0"
]
;
then
if
[
"
$?
"
!=
"0"
]
;
then
...
@@ -2609,6 +2610,19 @@ signcsr(){
...
@@ -2609,6 +2610,19 @@ signcsr(){
fi
fi
_debug
"_csrdomainlist"
"
$_csrdomainlist
"
_debug
"_csrdomainlist"
"
$_csrdomainlist
"
if
[
-z
"
$_csrsubj
"
]
;
then
_csrsubj
=
"
$(
_getfield
"
$_csrdomainlist
"
1
)
"
_debug _csrsubj
"
$_csrsubj
"
_csrdomainlist
=
"
$(
echo
"
$_csrdomainlist
"
|
cut
-d
,
-f
2-
)
"
_debug
"_csrdomainlist"
"
$_csrdomainlist
"
fi
if
[
-z
"
$_csrsubj
"
]
;
then
_err
"Can not read subject from csr:
$_csrfile
"
return
1
fi
_csrkeylength
=
$(
_readKeyLengthFromCSR
"
$_csrfile
"
)
_csrkeylength
=
$(
_readKeyLengthFromCSR
"
$_csrfile
"
)
if
[
"
$?
"
!=
"0"
]
||
[
-z
"
$_csrkeylength
"
]
;
then
if
[
"
$?
"
!=
"0"
]
||
[
-z
"
$_csrkeylength
"
]
;
then
_err
"Can not read key length from csr:
$_csrfile
"
_err
"Can not read key length from csr:
$_csrfile
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment