GNU bug report logs -
#20908
25.0.50; gnutls-negotiate error "Invalid format operation %u"
Previous Next
Reported by: lo2net <fangtao0901 <at> gmail.com>
Date: Sat, 27 Jun 2015 06:00:07 UTC
Severity: normal
Found in version 25.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 27 Jun 2015 11:05:19 +0300
with message-id <837fqpd1a8.fsf <at> gnu.org>
and subject line Re: bug#20908: 25.0.50; gnutls-negotiate error "Invalid format operation %u"
has caused the debbugs.gnu.org bug report #20908,
regarding 25.0.50; gnutls-negotiate error "Invalid format operation %u"
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
20908: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20908
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hi all,
I've got a problem: when using (gnutls-negotiate :verify-error t) to initialize a SSL/TLS
connection , server has an expired certificate cause gnutls-boot signal
an error "Invalid format operation %u", apparently it's not related to
gnutls-error. So digging into the source
code, here is the error signal:
src/gnutls.c:1511
if (verify_error_all
|| !NILP (Fmember (QCgnutls_bootprop_trustfiles, verify_error)))
{
emacs_gnutls_deinit (proc);
error ("Certificate validation failed %s, verification code %u",
c_hostname, peer_verification);
}
After checking elisp manual and source code, function Fformat(error call
it to format string) does not
support '%u', here should using '%d' instead.
I made a simple patch for this:
[0001-gnutls-boot-fix-error-Invalid-format-operation-u-whe.patch (text/plain, attachment)]
[Message part 5 (message/rfc822, inline)]
> From: lo2net <fangtao0901 <at> gmail.com>
> Date: Sat, 27 Jun 2015 11:55:43 +0800
>
> I've got a problem: when using (gnutls-negotiate :verify-error t) to initialize a SSL/TLS
> connection , server has an expired certificate cause gnutls-boot signal
> an error "Invalid format operation %u", apparently it's not related to
> gnutls-error. So digging into the source
> code, here is the error signal:
>
> src/gnutls.c:1511
>
> if (verify_error_all
> || !NILP (Fmember (QCgnutls_bootprop_trustfiles, verify_error)))
> {
> emacs_gnutls_deinit (proc);
> error ("Certificate validation failed %s, verification code %u",
> c_hostname, peer_verification);
> }
>
> After checking elisp manual and source code, function Fformat(error call
> it to format string) does not
> support '%u', here should using '%d' instead.
>
> I made a simple patch for this:
Thanks. I used %x instead of %d in the change I just pushed, because
the peer_verification value is actually a bitwise OR of the various
bits, so displaying it in hex will make its interpretation easier.
With that, I'm marking this bug done.
This bug report was last modified 10 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.