From be08bc2e33380c9dd6c36dec8cf1ecc5428599b7 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 5 Jun 2026 16:41:33 +0200 Subject: [PATCH] Let's call it "./unrealircd mkcert" instead (like mkpasswd). Fix test suite. --- Config | 2 +- Makefile.in | 2 +- extras/build-tests/nix/build | 2 +- src/tls.c | 4 ++-- unrealircd.in | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Config b/Config index a8ba37d5e..b0d552926 100755 --- a/Config +++ b/Config @@ -188,7 +188,7 @@ if [ "$QUICK" != "1" ] ; then echo "*******************************************************************************" echo "Press ENTER to continue" read cc - ./unrealircd makecert + ./unrealircd mkcert echo "Certificate created successfully." sleep 1 else diff --git a/Makefile.in b/Makefile.in index 5316f0b18..11106f7ad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -266,7 +266,7 @@ install: all pem: @echo "The command 'make pem' is no longer used to generate the TLS certificate." - @echo "Please run './unrealircd makecert' instead." + @echo "Please run './unrealircd mkcert' instead." Makefile: config.status Makefile.in ./config.status diff --git a/extras/build-tests/nix/build b/extras/build-tests/nix/build index 33f845fec..4f8dbb3cc 100755 --- a/extras/build-tests/nix/build +++ b/extras/build-tests/nix/build @@ -41,7 +41,7 @@ if [ "$SSLDIR" != "" ]; then fi ./Config -quick || (tail -n 5000 config.log; exit 1) $MAKE -yes ''|$MAKE pem +(echo 'Y'; yes '')|./unrealircd mkcert $MAKE || exit 1 $MAKE install || exit 1 ./unrealircd module install third/dumpcmds || exit 1 diff --git a/src/tls.c b/src/tls.c index 6d409c338..ea46588b5 100644 --- a/src/tls.c +++ b/src/tls.c @@ -358,7 +358,7 @@ SSL_CTX *init_ctx(TLSOptions *tlsoptions, int server) { unreal_log(ULOG_ERROR, "config", "TLS_LOAD_FAILED_DEFAULT_CERT", NULL, "It seems the default certificate is missing. " - "Run './unrealircd makecert' " + "Run './unrealircd mkcert' " "to generate a self-signed cert."); } goto fail; @@ -457,7 +457,7 @@ SSL_CTX *init_ctx(TLSOptions *tlsoptions, int server) { unreal_log(ULOG_ERROR, "config", "TLS_CERTIFICATE_CHECK_FAILED", NULL, "There is a problem with your TLS certificate: $quality_check_error\n" - "If you use the standard UnrealIRCd certificates then you can simply run './unrealircd makecert' " + "If you use the standard UnrealIRCd certificates then you can simply run './unrealircd mkcert' " "to create and install new certificates", log_data_string("quality_check_error", errstr)); goto fail; diff --git a/unrealircd.in b/unrealircd.in index 32ec8cd6d..79bd8ed5a 100644 --- a/unrealircd.in +++ b/unrealircd.in @@ -17,7 +17,7 @@ OPENSSLPATH="@OPENSSLPATH@" # older gcc/clang might dump a 16TB core file. We explicitly enable it here. export ASAN_OPTIONS="abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1:log_path=$TMPDIR/unrealircd_asan:detect_leaks=0" -if [ "$1" != "makecert" ] && [ ! -f $IRCD ]; then +if [ "$1" != "mkcert" ] && [ ! -f $IRCD ]; then echo "ERROR: Could not find the IRCd binary ($IRCD)" echo "This could mean two things:" echo "1) You forgot to run 'make install' after running 'make'" @@ -269,7 +269,7 @@ __EOF__ echo "Thanks!" elif [ "$1" = "spki" -o "$1" = "spkifp" ] ; then $UNREALIRCDCTL $* -elif [ "$1" = "makecert" ] ; then +elif [ "$1" = "mkcert" ] ; then TLSDIR="$CONFDIR/tls" KEY="$TLSDIR/server.key.pem" CERT="$TLSDIR/server.cert.pem" @@ -507,13 +507,13 @@ else echo "unrealircd stop Stop (kill) the IRC Server" echo "unrealircd rehash Reload the configuration file" echo "unrealircd reloadtls Reload the SSL/TLS certificates" - echo "unrealircd makecert Create or replace the self-signed TLS certificate" echo "unrealircd restart Restart the IRC Server (stop+start)" echo "unrealircd status Show current status of the IRC Server" echo "unrealircd module-status Show all currently loaded modules" echo "unrealircd upgrade Upgrade UnrealIRCd to the latest version (or the next available" echo " release candidate if the --rc argument is used)" echo "unrealircd mkpasswd Hash a password" + echo "unrealircd mkcert Create or replace the self-signed TLS certificate" echo "unrealircd version Display the UnrealIRCd version" echo "unrealircd module Install and uninstall 3rd party modules" echo "unrealircd croncheck For use in crontab: this checks if the server"