Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
certman
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
certman
Commits
32a095a7
Commit
32a095a7
authored
4 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
cert matching checks key and cert, not csr anymore
parent
dbdaacf1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cm.sh
+11
-11
11 additions, 11 deletions
cm.sh
with
11 additions
and
11 deletions
cm.sh
+
11
−
11
View file @
32a095a7
...
@@ -106,19 +106,19 @@ function _certTransfer(){
...
@@ -106,19 +106,19 @@ function _certTransfer(){
# internal function; show md5 hashsums for certificate, csr and key
# internal function; show md5 hashsums for certificate, csr and key
# for visual comparison if the match
# for visual comparison if the match
function
_certMatching
(){
function
_certMatching
(){
local
md5_c
ert
=
$(
openssl
x509
-noout
-modulus
-in
${
CM_
out
file
_cert
}
| openssl md5 |
cut
-f
2
-d
" "
)
local
md5_c
sr
=
$(
test
-f
${
CM_filecsr
}
&
openssl
req
-noout
-modulus
-in
${
CM_file
csr
}
| openssl md5 |
cut
-f
2
-d
" "
)
local
md5_
csr
=
$(
openssl r
eq
-noout
-modulus
-in
${
CM_file
csr
}
| openssl md5 |
cut
-f
2
-d
" "
)
local
md5_
key
=
$(
test
-f
${
CM_outfile_key
}
&
openssl r
sa
-noout
-modulus
-in
${
CM_
out
file
_key
}
| openssl md5 |
cut
-f
2
-d
" "
)
local
md5_
key
=
$(
openssl
rsa
-noout
-modulus
-in
${
CM_outfile_
key
}
| openssl md5 |
cut
-f
2
-d
" "
)
local
md5_
cert
=
$(
test
-f
${
CM_outfile_cert
}
&
openssl
x509
-noout
-modulus
-in
${
CM_outfile_
cert
}
| openssl md5 |
cut
-f
2
-d
" "
)
echo
echo
echo
"--- compare hashes"
echo
"--- compare hashes"
echo
"cert :
$md5_cert
"
echo
"csr :
$md5_csr
(used for creation of cert)"
echo
"csr :
$md5_csr
"
echo
"key :
$md5_key
"
echo
"key :
$md5_key
"
if
[
"
$md5_key
"
=
"
$md5_cert
"
-a
"
$md5_key
"
=
"
$md5_csr
"
]
;
then
echo
"cert :
$md5_cert
"
echo
"OK, they match :-)"
if
[
"
$md5_key
"
=
"
$md5_cert
"
]
;
then
echo
"OK, key and cert match :-)"
else
else
echo
"ERROR:
they
do NOT MATCH!"
echo
"ERROR:
key and cert
do NOT MATCH!"
fi
fi
echo
echo
}
}
...
@@ -192,11 +192,11 @@ function _requiresFqdn(){
...
@@ -192,11 +192,11 @@ function _requiresFqdn(){
function
_testStaging
(){
function
_testStaging
(){
echo
$ACME_Params
|
grep
"
\-\-
staging"
>
/dev/null
echo
$ACME_Params
|
grep
"
\-\-
staging"
>
/dev/null
if
[
$?
-eq
0
]
;
then
if
[
$?
-eq
0
]
;
then
_wd
"Using L
E
STAGE environment ..."
_wd
"Using L
et's Encrypt
STAGE environment ..."
_wd
"You can test and mess around. Do not use certs in production."
_wd
"You can test and mess around. Do not use certs in production."
else
else
_wd
"Using L
E
LIVE environment for production."
_wd
"Using L
et's Encrypt
LIVE environment for production."
_wd
"Be careful with count of connects to L
E
servers."
_wd
"Be careful with count of connects to L
et's Encrypt
servers."
fi
fi
echo
echo
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment