[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add support for TLS client certificates to 'erc-tls'

From: J.P.
Subject: Re: Add support for TLS client certificates to 'erc-tls'
Date: Mon, 24 May 2021 18:43:58 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Attached is a disposable test case for this specific problem
(reconnecting with TLS). It should fail now and work once the problem is

At the moment, it's not set up to work interactively. But I suppose you
could try something like

    (advice-add 'nsm-query-user :around
                (lambda (o &rest r) (ert-simulate-keys "s" (apply o r)))
                '((name . erc-tls)))

and also make some tweaks to keep ERT from blocking the read (probably
not worth the effort, though). While hacking and running the test, this
or similar may help shed some light on what's going on:

   (require 'trace)
   (trace-function-background 'erc-open)

Currently, the output should show something similar to the following
(note the "Certificate is required" part):

    Running 1 tests (2021-05-24 17:09:54-0700, selector `erc-tls-reconnect')
    Connecting to localhost:16698... 
    Logging in as `tester...
    going again
    Connecting to localhost:46699... 
    gnutls.c: [0] (Emacs) Received alert:  Certificate is required
    Logging in as `tester...
    Connecting to localhost:46699... ...done
    Test erc-tls-reconnect backtrace:
    process-send-string(#<process erc-localhost-46699> "PING :1\15\n")
    (progn (process-send-string erc-server-process (concat s "\15\n")))
    (if (setq s (cond ((string-match-p "\\`PASS" s) nil) ((string-match-
    erc-server-send("USER user 0 * :tester")
    command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/erc/erc-tests.el" "-
    Test erc-tls-reconnect condition:
        Info: Connect
        (error "Process erc-localhost-46699 not running")
    FAILED  1/1  erc-tls-reconnect (5.384658 sec)

    Ran 1 tests, 0 results as expected, 1 unexpected (2021-05-24 17:10:01-0700, 
7.495815 sec)

    1 unexpected results:
    FAILED  erc-tls-reconnect

Let me know if anything doesn't make sense. Thanks!

Attachment: 0001-Add-test-case-for-reconnecting-with-erc-tls.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]