nixos/taskserver: Generate a cert revocation list
If we want to revoke client certificates and want the server to actually notice the revocation, we need to have a valid certificate revocation list. Right now the expiration_days is set to 10 years, but that's merely to actually get certtool to actually generate the CRL without trying to prompt for user input. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
d0ab617974
commit
b6643102d6
@ -397,6 +397,19 @@ in {
|
|||||||
"${cfg.dataDir}/keys/server.cert"
|
"${cfg.dataDir}/keys/server.cert"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -e "${cfg.dataDir}/keys/server.crl" ]; then
|
||||||
|
${pkgs.gnutls}/bin/certtool --generate-crl \
|
||||||
|
--template "${pkgs.writeText "taskserver-crl.template" ''
|
||||||
|
expiration_days = 3650
|
||||||
|
''}" \
|
||||||
|
--load-ca-privkey "${cfg.dataDir}/keys/ca.key" \
|
||||||
|
--load-ca-certificate "${cfg.dataDir}/keys/ca.cert" \
|
||||||
|
--outfile "${cfg.dataDir}/keys/server.crl"
|
||||||
|
|
||||||
|
chgrp "${cfg.group}" "${cfg.dataDir}/keys/server.crl"
|
||||||
|
chmod g+r "${cfg.dataDir}/keys/server.crl"
|
||||||
|
fi
|
||||||
|
|
||||||
chmod go+x "${cfg.dataDir}/keys"
|
chmod go+x "${cfg.dataDir}/keys"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user