Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compose.libre.sh
Manage
Activity
Members
Labels
Plan
Issues
18
Issue boards
Milestones
Wiki
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
libre.sh
compose.libre.sh
Commits
c6866d13
Commit
c6866d13
authored
10 years ago
by
Pierre Ozoux
Browse files
Options
Downloads
Patches
Plain Diff
Adds OCSP support. closes #2
parent
fd9ca7f6
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
scripts/ocsp.sh
+12
-0
12 additions, 0 deletions
scripts/ocsp.sh
unit-files/ocsp.service
+11
-0
11 additions, 0 deletions
unit-files/ocsp.service
unit-files/ocsp.timer
+6
-0
6 additions, 0 deletions
unit-files/ocsp.timer
with
29 additions
and
0 deletions
scripts/ocsp.sh
0 → 100644
+
12
−
0
View file @
c6866d13
#!/bin/bash -eux
PEM_FILE
=
${
1
}
CRT_FILE
=
/tmp/
`
basename
${
PEM_FILE
}
|
sed
's/pem/crt/'
`
DIR
=
`
dirname
${
PEM_FILE
}
`
URL
=
`
openssl x509
-in
${
PEM_FILE
}
-text
|
grep
OCSP |
cut
-d
:
-f2
,3
`
HEADER
=
`
echo
$URL
|
cut
-d
/
-f3
`
ISSUER_CRT_URL
=
`
openssl x509
-in
${
PEM_FILE
}
-text
|
grep
Issuers |
cut
-d
:
-f2
,3
`
wget
${
ISSUER_CRT_URL
}
-q
-O
- | openssl x509
-inform
DER
-outform
PEM
>
${
PEM_FILE
}
.issuer
openssl x509
-outform
PEM
-in
${
PEM_FILE
}
>
${
CRT_FILE
}
openssl ocsp
-noverify
-issuer
${
PEM_FILE
}
.issuer
-cert
${
CRT_FILE
}
-url
${
URL
}
-no_nonce
-header
Host
${
HEADER
}
-respout
${
PEM_FILE
}
.ocsp
This diff is collapsed.
Click to expand it.
unit-files/ocsp.service
0 → 100644
+
11
−
0
View file @
c6866d13
[Unit]
Description
=
Get the OCSP data from the cert provider
[Service]
Type
=
oneshot
TimeoutStartSec
=
0
ExecStart
=
/bin/bash -euxc '
\
for cert in `ls /data/runtime/haproxy/approved-certs/*.pem`;do
\
/data/indiehosters/scripts/ocsp.sh $cert;
\
done'
This diff is collapsed.
Click to expand it.
unit-files/ocsp.timer
0 → 100644
+
6
−
0
View file @
c6866d13
[Unit]
Description=Daily timer for OCSP stapling
[Timer]
OnUnitActiveSec=1day
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