summary refs log tree commit diff
path: root/nixos/tests/xmpp
diff options
context:
space:
mode:
authorFélix Baylac-Jacqué <felix@alternativebit.fr>2021-08-06 22:24:41 +0200
committerFélix Baylac-Jacqué <felix@alternativebit.fr>2021-08-06 23:46:17 +0200
commit6325d15e9001a5cfd3bb7ee901adeed28d844dd6 (patch)
tree9a1daefd6cdb69b3bca111410985d33696b71860 /nixos/tests/xmpp
parentc0e1f01e435e69be409a98d92934a51495ceb2c4 (diff)
downloadnixpkgs-6325d15e9001a5cfd3bb7ee901adeed28d844dd6.tar
nixpkgs-6325d15e9001a5cfd3bb7ee901adeed28d844dd6.tar.gz
nixpkgs-6325d15e9001a5cfd3bb7ee901adeed28d844dd6.tar.bz2
nixpkgs-6325d15e9001a5cfd3bb7ee901adeed28d844dd6.tar.lz
nixpkgs-6325d15e9001a5cfd3bb7ee901adeed28d844dd6.tar.xz
nixpkgs-6325d15e9001a5cfd3bb7ee901adeed28d844dd6.tar.zst
nixpkgs-6325d15e9001a5cfd3bb7ee901adeed28d844dd6.zip
nixosTests.prosody: extend- self-signed cert expiration date
The test certificate expiration date was set to the default 30 days.
This certificate is generated through its own derivation. As with
every derivation, it gets cached by cache.nixos.org once we build it.

In practice, we rebuild this derivation only if one of its input
changes. The only inputs here being openssl and stdenv.

While it's not an issue on the unstable branches, it can be
problematic on a stable release: the test will fail after 30 days.

Extending the certificate lifespan from 1 month to 100 years to prevent
it from getting expired while being cached.

See
https://github.com/NixOS/nixpkgs/pull/132898#issuecomment-894495057
for more context.
Diffstat (limited to 'nixos/tests/xmpp')
-rw-r--r--nixos/tests/xmpp/prosody.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/tests/xmpp/prosody.nix b/nixos/tests/xmpp/prosody.nix
index 2eb06d88287..a004b124dd6 100644
--- a/nixos/tests/xmpp/prosody.nix
+++ b/nixos/tests/xmpp/prosody.nix
@@ -1,6 +1,6 @@
 let
   cert = pkgs: pkgs.runCommandNoCC "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
-    openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=example.com/CN=uploads.example.com/CN=conference.example.com'
+    openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=example.com/CN=uploads.example.com/CN=conference.example.com' -days 36500
     mkdir -p $out
     cp key.pem cert.pem $out
   '';