relayd returns a confusing error when "tls ca file" refers to a non-existant file
[email protected] Mon, 27 Apr 2026 19:26:51 +0200 (CEST)
| Newsgroups | gmane.os.openbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
>Synopsis: relayd: confusing error when "tls ca file" refers to a non-existant file >Category: user >Environment: System : OpenBSD 7.8 Details : OpenBSD 7.8 (GENERIC.MP) #7: Tue Apr 14 04:12:37 MDT 2026 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP Architecture: OpenBSD.amd64 Machine : amd64 >Description: "tls ca file" does not return an error when the specified file does not exist. The configuration fails to load, but with a confusing and seemingly unrelated error. >How-To-Repeat: The following configuration works fine ("relayd -n" says "configuration OK"): table <wordpress> { 192.168.179.245 } http protocol reverseproxy { tls keypair "demo.example.com" } relay foo { listen on 0.0.0.0 port 443 tls listen on :: port 443 tls forward with tls to <wordpress> port 443 check tls protocol reverseproxy } When I add 'tls ca file "/etc/ssl/does-not-exist.crt"', the configuration errors out, but with a confusing error message: /etc/relayd.conf:12: cannot load keypair demo.example.com for relay foo ...but there's nothing wrong with that keypair, as the initial config showed. This is especially confusing when you're starting out with both "tls ca file" and "tls keypair" in your configuration; the error message then refers to the wrong statement. >Fix: When "tls ca file" points to an nonexistant file (or if there's another problem with that file), directly error out with an error message indicating the problem is with "tls ca file". dmesg: OpenBSD 7.8 (GENERIC.MP) #7: Tue Apr 14 04:12:37 MDT 2026 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 16959537152 (16173MB) avail mem = 16418705408 (15658MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 3.6 @ 0x77c8a000 (76 entries) bios0: vendor American Megatrends International, LLC. version "1.03" date 03/27/2025 bios0: Shuttle Inc. DH770 efi0 at bios0: UEFI 2.8 efi0: American Megatrends rev 0x5001b acpi0 at bios0: ACPI 6.5 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP FIDT SSDT SSDT SSDT SSDT HPET APIC MCFG SSDT UEFI NHLT LPIT SSDT SSDT DBGP DBG2 SSDT DMAR FPDT SSDT SSDT SSDT PHAT TPM2 WSMT acpi0: wakeup devices PEG1(S4) PEGP(S4) PEGP(S4) PEG0(S4) PEGP(S4) SIO1(S3) RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) PXSX(S4) RP13(S4) PXSX(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 19200000 Hz acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i3-14100, 4689.99 MHz, 06-bf-05, patch 0000003e cpu0: cpuid 1 edx=bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> ecx=77fafbbf<SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND> cpu0: cpuid 6 eax=df8ff7<SENSOR,ARAT,PTS> ecx=409<EFFFREQ> cpu0: cpuid 7.0 ebx=239c27eb<FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PT,SHA> ecx=98c007ac<UMIP,PKU,WAITPKG,PKS> edx=fc184410<MD_CLEAR,IBT,IBRS,IBPB,STIBP,L1DF,SSBD> cpu0: cpuid a vers=5, gp=8, gpwidth=48, ff=4, ffwidth=48 cpu0: cpuid d.1 eax=f<XSAVEOPT,XSAVEC,XGETBV1,XSAVES> cpu0: cpuid 80000001 edx=2c100800<NXE,PAGE1GB,RDTSCP,LONG> ecx=121<LAHF,ABM,3DNOWP> cpu0: cpuid 80000007 edx=100<ITSC> cpu0: msr 10a=cc8fd6b<IBRS_ALL,SKIP_L1DFL,MDS_NO,IF_PSCHANGE,TAA_NO,MISC_PKG_CT,ENERGY_FILT,DOITM,SBDR_SSDP_N,FBSDP_NO,PSDP_NO,RRSBA,OVERCLOCK,GDS_NO,RFDS_NO> cpu0: 48KB 64b/line 12-way D-cache, 32KB 64b/line 8-way I-cache, 1MB 64b/line 10-way L2 cache, 12MB 64b/line 12-way L3 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 38MHz cpu0: mwait min=64, max=64, C-substates=0.2.0.1.0.1.0.1, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Core(TM) i3-14100, 4688.01 MHz, 06-bf-05, patch 0000003e cpu1: smt 0, core 1, package 0 cpu2 at mainbus0: apid 4 (application processor) cpu2: Intel(R) Core(TM) i3-14100, 4490.23 MHz, 06-bf-05, patch 0000003e cpu2: smt 0, core 2, package 0 cpu3 at mainbus0: apid 6 (application processor) cpu3: Intel(R) Core(TM) i3-14100, 4490.29 MHz, 06-bf-05, patch 0000003e cpu3: smt 0, core 3, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins acpimcfg0 at acpi0 acpimcfg0: addr 0xc0000000, bus 0-255 acpiprt0 at acpi0: bus 0 (PC00) acpiprt1 at acpi0: bus -1 (PEG1) acpiprt2 at acpi0: bus -1 (PEG0) acpiprt3 at acpi0: bus -1 (RP09) acpiprt4 at acpi0: bus -1 (RP10) acpiprt5 at acpi0: bus -1 (RP11) acpiprt6 at acpi0: bus -1 (RP12) acpiprt7 at acpi0: bus -1 (RP13) acpiprt8 at acpi0: bus -1 (RP14) acpiprt9 at acpi0: bus -1 (RP15) acpiprt10 at acpi0: bus -1 (RP16) acpiprt11 at acpi0: bus -1 (RP01) acpiprt12 at acpi0: bus -1 (RP02) acpiprt13 at acpi0: bus -1 (RP03) acpiprt14 at acpi0: bus -1 (RP04) acpiprt15 at acpi0: bus -1 (RP05) acpiprt16 at acpi0: bus 1 (RP06) acpiprt17 at acpi0: bus 2 (RP07) acpiprt18 at acpi0: bus -1 (RP08) acpiprt19 at acpi0: bus -1 (RP17) acpiprt20 at acpi0: bus -1 (RP18) acpiprt21 at acpi0: bus -1 (RP19) acpiprt22 at acpi0: bus -1 (RP20) acpiprt23 at acpi0: bus -1 (RP21) acpiprt24 at acpi0: bus -1 (RP22) acpiprt25 at acpi0: bus -1 (RP23) acpiprt26 at acpi0: bus -1 (RP24) acpiprt27 at acpi0: bus -1 (RP25) acpiprt28 at acpi0: bus -1 (RP26) acpiprt29 at acpi0: bus -1 (RP27) acpiprt30 at acpi0: bus -1 (RP28) acpiec0 at acpi0: not present acpiec1 at acpi0 acpipci0 at acpi0 PC00: 0x00000000 0x00000011 0x00000001 com0 at acpi0 UAR1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo com0: console com1 at acpi0 UAR2 addr 0x2f8/0x8 irq 3: ns16550a, 16 byte fifo "ACPI000E" at acpi0 not configured pchgpio0 at acpi0 GPI0 addr 0xe06e0000/0x10000 0xe06d0000/0x10000 0xe06b0000/0x10000 0xe06a0000/0x10000 0xe0690000/0x10000 irq 14, 480 pins acpibtn0 at acpi0: SLPB acpicpu0 at acpi0: C3(200@1048 mwait.1@0x60), C2(350@127 mwait.1@0x20), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C3(200@1048 mwait.1@0x60), C2(350@127 mwait.1@0x20), C1(1000@1 mwait.1), PSS acpicpu2 at acpi0: C3(200@1048 mwait.1@0x60), C2(350@127 mwait.1@0x20), C1(1000@1 mwait.1), PSS acpicpu3 at acpi0: C3(200@1048 mwait.1@0x60), C2(350@127 mwait.1@0x20), C1(1000@1 mwait.1), PSS "PNP0C14" at acpi0 not configured "PNP0C14" at acpi0 not configured intelpmc0 at acpi0: PEPD state 0: 0x7f:1:2:0x00:0x0000000000000060 counter: 0x7f:64:0:0x00:0x0000000000000632 frequency: 0 state 1: 0x7f:1:2:0x00:0x0000000000000060 counter: 0x00:32:0:0x03:0x00000000fe001098 frequency: 32768 acpibtn1 at acpi0: PWRB tpm0 at acpi0 TPM_ 2.0 (CRB) addr 0xfed40000/0x5000, device 0x00000000 rev 0x0 "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured acpipwrres0 at acpi0: WRST acpipwrres1 at acpi0: FN00, resource for FAN0 acpipwrres2 at acpi0: FN01, resource for FAN1 acpipwrres3 at acpi0: FN02, resource for FAN2 acpipwrres4 at acpi0: FN03, resource for FAN3 acpipwrres5 at acpi0: FN04, resource for FAN4 acpitz0 at acpi0 acpitz0: critical temperature is 105 degC acpipwrres6 at acpi0: PIN_ acpivideo0 at acpi0: GFX0 acpivout0 at acpivideo0: DD1F acpivout1 at acpivideo0: DD2F cpu0: Enhanced SpeedStep 4689 MHz: speeds: 3501, 3500, 3300, 3100, 2900, 2700, 2500, 2300, 2100, 2000, 1800, 1600, 1400, 1200, 1000, 800 MHz pci0 at mainbus0 bus 0 0:31:5: mem address conflict 0xfe010000/0x1000 pchb0 at pci0 dev 0 function 0 "Intel Core 12G Host" rev 0x05 inteldrm0 at pci0 dev 2 function 0 "Intel UHD Graphics 730" rev 0x0c drm0 at inteldrm0 inteldrm0: msi, ALDERLAKE_S, gen 12 xhci0 at pci0 dev 20 function 0 "Intel 700 Series xHCI" rev 0x11: msi, xHCI 1.20 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1 "Intel 700 Series Shared SRAM" rev 0x11 at pci0 dev 20 function 2 not configured "Intel 700 Series HECI" rev 0x11 at pci0 dev 22 function 0 not configured ahci0 at pci0 dev 23 function 0 "Intel 700 Series AHCI" rev 0x11: msi, AHCI 1.3.1 ahci0: port 4: 6.0Gb/s ahci0: PHY offline on port 5 ahci0: PHY offline on port 6 ahci0: PHY offline on port 7 scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 4 lun 0: <ATA, SAMSUNG MZ7KH240, HXM7> naa.5002538e02207c90 sd0: 228936MB, 512 bytes/sector, 468862128 sectors, thin ppb0 at pci0 dev 28 function 0 "Intel 700 Series PCIE" rev 0x11: msi pci1 at ppb0 bus 1 igc0 at pci1 dev 0 function 0 "Intel I226-LM" rev 0x04, msix, 4 queues, address 80:ee:73:fd:87:9f ppb1 at pci0 dev 28 function 6 "Intel 700 Series PCIE" rev 0x11: msi pci2 at ppb1 bus 2 igc1 at pci2 dev 0 function 0 "Intel I226-LM" rev 0x04, msix, 4 queues, address 80:ee:73:fd:87:a0 pcib0 at pci0 dev 31 function 0 "Intel H770 eSPI" rev 0x11 azalia0 at pci0 dev 31 function 3 "Intel 700 Series HD Audio" rev 0x11: msi azalia0: codecs: Realtek ALC888, Intel/0x2815, using Realtek ALC888 audio0 at azalia0 ichiic0 at pci0 dev 31 function 4 "Intel 700 Series SMBus" rev 0x11: apic 2 int 18 iic0 at ichiic0 iic0: addr 0x48 0a=02 15=2c 16=20 19=04 1b=05 1c=60 1e=60 1f=60 20=cf 21=78 22=63 25=78 26=63 27=78 28=63 29=80 2a=88 2b=42 2c=20 2d=22 2e=b4 2f=5e 32=80 33=04 34=0e 3b=12 3c=8a 3d=8c words 00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000 "Intel 700 Series SPI" rev 0x11 at pci0 dev 31 function 5 not configured isa0 at pcib0 isadma0 at isa0 kbc selftest: ffffffff pcppi0 at isa0 port 0x61 spkr0 at pcppi0 vmm0 at mainbus0: VMX/EPT efifb at mainbus0 not configured vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (96f013a17550cc5e.a) swap on sd0b dump on sd0b inteldrm0: 1024x768, 32bpp wsdisplay0 at inteldrm0 mux 1 wsdisplay0: screen 0-5 added (std, vt100 emulation) usbdevs: Controller /dev/usb0: addr 01: 8086:0000 Intel, xHCI root hub super speed, self powered, config 1, rev 1.00 driver: uhub0