Bug 262858 - net-im/libpurple: Pidgin/finch can't validate any certificate
Summary: net-im/libpurple: Pidgin/finch can't validate any certificate
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-27 11:03 UTC by jpicalau+freebsd_bugzilla
Modified: 2022-04-05 16:07 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (marcus)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jpicalau+freebsd_bugzilla 2022-03-27 11:03:48 UTC
The code in libpurple/certificate.c - x509_ca_lazy_init only accepts files of the form "*.pem" or "*.crt" while the files contained in /etc/ssl/certs (path provided via "--with-system-ssl-certs") currently all end in ".0", which means no root certificate gets loaded users are left to accept certificates manually.
Comment 1 Joe Marcus Clarke freebsd_committer freebsd_triage 2022-03-31 19:11:39 UTC
Ugh.  Sorry about that.  The symlinks in /etc/ _point to_ .pem files.  Does this patch work for you:

diff --git a/net-im/libpurple/Makefile b/net-im/libpurple/Makefile
index fb455e64ef..b334f9daa9 100644
--- a/net-im/libpurple/Makefile
+++ b/net-im/libpurple/Makefile
@@ -21,7 +21,7 @@ CONFIGURE_ARGS?=--disable-gtkui \
                --with-dynamic-prpls=${PRPL_MODULES:S/,$//} \
                --enable-static \
                --disable-nm \
-               --with-system-ssl-certs=/etc/ssl/certs
+               --with-system-ssl-certs=/usr/share/certs/trusted
 INSTALL_TARGET=        install-strip

 .if !defined(PIDGIN_SLAVE)
Comment 2 jpicalau+freebsd_bugzilla 2022-04-02 06:32:34 UTC
Hey. No worries!

That patch seems to do the trick. Thank you!
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2022-04-05 16:07:07 UTC
Thanks for verifying.  Fixed in 2.14.8_3.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-04-05 16:07:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=aa21c3d9963e119bbb5b19729a75d7c4a2861716

commit aa21c3d9963e119bbb5b19729a75d7c4a2861716
Author:     Joe Marcus Clarke <marcus@FreeBSD.org>
AuthorDate: 2022-04-05 16:05:22 +0000
Commit:     Joe Marcus Clarke <marcus@FreeBSD.org>
CommitDate: 2022-04-05 16:06:47 +0000

    net-im/libpurple: Point to the cert directory with .pem files

    The code looks for a .pem extension, but all of the extracted certs in
    /etc/ssl/certs use .0.

    PR:             262858

 net-im/libpurple/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)