mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/acme-client: Add Support for OCSP Must Staple generation
This commit is contained in:
+6
@@ -44,6 +44,12 @@
|
||||
<type>dropdown</type>
|
||||
<help><![CDATA[Specify the domain key length: 2048, 3072, 4096, 8192 or ec-256, ec-384.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>certificate.ocsp</id>
|
||||
<label>OCSP Must Staple</label>
|
||||
<type>checkbox</type>
|
||||
<help>Generate and add OCSP Must Staple extension to the certificate.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>certificate.restartActions</id>
|
||||
<label>Restart Actions</label>
|
||||
|
||||
@@ -214,6 +214,10 @@
|
||||
<key_ec384>ec-384</key_ec384>
|
||||
</OptionValues>
|
||||
</keyLength>
|
||||
<ocsp type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
</ocsp>
|
||||
<restartActions type="ModelRelationField">
|
||||
<Model>
|
||||
<actions>
|
||||
|
||||
@@ -809,6 +809,11 @@ function run_acme_validation($certObj, $valObj, $acctObj)
|
||||
$key_length = substr_replace($key_length, '-', 2, 0);
|
||||
}
|
||||
|
||||
// if OCSP Extension is turned on pass --ocsp parameter to acme client
|
||||
if (isset($certObj->ocsp)) {
|
||||
$acme_args[] = "--ocsp";
|
||||
}
|
||||
|
||||
// Run acme client
|
||||
// NOTE: We "export" certificates to our own directory, so we don't have to deal
|
||||
// with domain names in filesystem, but instead can use the ID of our certObj.
|
||||
|
||||
Reference in New Issue
Block a user