FreeBSD Bugzilla – Attachment 253890 Details for
Bug 281761
net-im/libpurple: add patch to handle ssl certificate chain on libpurple / pidgin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
use the SSL_PeerCertificateChain function, instead of SSL_PeerCertificate
libpurple.patch (text/plain), 2.33 KB, created by
Rodrigo Osorio
on 2024-09-29 15:57:11 UTC
(
hide
)
Description:
use the SSL_PeerCertificateChain function, instead of SSL_PeerCertificate
Filename:
MIME Type:
Creator:
Rodrigo Osorio
Created:
2024-09-29 15:57:11 UTC
Size:
2.33 KB
patch
obsolete
>diff --git a/net-im/libpurple/files/patch-libpurple_plugins_ssl_ssl-nss.c b/net-im/libpurple/files/patch-libpurple_plugins_ssl_ssl-nss.c >new file mode 100644 >index 000000000000..a9e5703cbbc5 >--- /dev/null >+++ b/net-im/libpurple/files/patch-libpurple_plugins_ssl_ssl-nss.c >@@ -0,0 +1,54 @@ >+--- libpurple/plugins/ssl/ssl-nss.c >++++ libpurple/plugins/ssl/ssl-nss.c >+@@ -282,39 +282,32 @@ x509_import_from_nss(CERTCertificate* ce >+ static GList * >+ ssl_nss_get_peer_certificates(PRFileDesc *socket, PurpleSslConnection * gsc) >+ { >++ CERTCertList *peerChain; >++ CERTCertListNode *cursor; >+ CERTCertificate *curcert; >+- CERTCertificate *issuerCert; >+ PurpleCertificate * newcrt; >+ >+ /* List of Certificate instances to return */ >+ GList * peer_certs = NULL; >+- int count; >+- int64 now = PR_Now(); >+ >+- curcert = SSL_PeerCertificate(socket); >+- if (curcert == NULL) { >+- purple_debug_error("nss", "could not DupCertificate\n"); >++ peerChain = SSL_PeerCertificateChain(socket); >++ if (peerChain == NULL) { >++ purple_debug_error("nss", "no peer certificates\n"); >+ return NULL; >+ } >+ >+- for (count = 0 ; count < CERT_MAX_CERT_CHAIN ; count++) { >++ for (cursor = CERT_LIST_HEAD(peerChain); !CERT_LIST_END(cursor, peerChain); cursor = CERT_LIST_NEXT(cursor)) { >++ curcert = cursor->cert; >++ if (!curcert) { >++ purple_debug_error("nss", "cursor->cert == NULL\n"); >++ break; >++ } >+ purple_debug_info("nss", "subject=%s issuer=%s\n", curcert->subjectName, >+ curcert->issuerName ? curcert->issuerName : "(null)"); >+ newcrt = x509_import_from_nss(curcert); >+ peer_certs = g_list_append(peer_certs, newcrt); >+- >+- if (curcert->isRoot) { >+- break; >+- } >+- issuerCert = CERT_FindCertIssuer(curcert, now, certUsageSSLServer); >+- if (!issuerCert) { >+- purple_debug_error("nss", "partial certificate chain\n"); >+- break; >+- } >+- CERT_DestroyCertificate(curcert); >+- curcert = issuerCert; >+ } >+- CERT_DestroyCertificate(curcert); >++ CERT_DestroyCertList(peerChain); >+ >+ return peer_certs; >+ } >diff --git a/net-im/libpurple/Makefile b/net-im/libpurple/Makefile >index 77470608fceb..6d50b3182468 100644 >--- a/net-im/libpurple/Makefile >+++ b/net-im/libpurple/Makefile >@@ -1,6 +1,6 @@ > PORTNAME?= libpurple > PORTVERSION= 2.14.13 >-PORTREVISION?= 0 >+PORTREVISION?= 1 > CATEGORIES?= net-im > MASTER_SITES= SF/pidgin/Pidgin/${PORTVERSION} > DISTNAME= pidgin-${PORTVERSION}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 281761
: 253890