Make cert algo configurable (for linkerd ecdsa)
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
{ pkgs ? import <nixpkgs> {}, ca ? null, name ? "ca", hosts ? [], ...}:
|
||||
{
|
||||
pkgs ? import <nixpkgs> {},
|
||||
ca ? null,
|
||||
name ? "ca",
|
||||
algo ? "rsa",
|
||||
hosts ? [],
|
||||
...}:
|
||||
with pkgs;
|
||||
let
|
||||
ca_csr = pkgs.writeText "${name}-csr.json" (builtins.toJSON {
|
||||
inherit hosts;
|
||||
CN = "${name}";
|
||||
key = {
|
||||
algo = "rsa";
|
||||
size = 2048;
|
||||
inherit algo;
|
||||
size = if algo == "ecdsa" then 256 else 2048;
|
||||
};
|
||||
names = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user