pkgsrc-Users archive

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

Re: printing with firefox3?



Greg kindly committed the work around for CUPS.

However, it does not appear to be the correct fix.

I think the correct patch we want for CUPS is now in CUPS svn:
 http://www.cups.org/str.php?L3079

I attach two patches for firefox after reading
 
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=84710+0+archive/2004/freebsd-gnome/20041212.freebsd-gnome

which seems to do the trick. I do not know if they are acceptable,
but it seems SHA1_Update is not exposed in any installed header files.

Can I convince anyone to try it together with the '&' patch for CUPS?

If anyone does so, please try with the above CUPS patch but without
pkgsrc/print/cups/patches/patch-ae which already works around the problem.

--
Kind regards,

Yorick Hardy

--- ./security/nss/lib/freebl/blapi.h.orig      2009-01-29 22:25:42.000000000 
+0200
+++ ./security/nss/lib/freebl/blapi.h   2009-01-29 22:31:18.000000000 +0200
@@ -899,6 +899,15 @@
 */
 extern void SHA1_Begin(SHA1Context *cx);
 
+
+/*
+XXX openssl also exports SHA1_Update, libcups depends on openssl
+XXX and firefox loads libcups at runtime or by using the gtk print dialog
+XXX which results in libcrypto using the wrong binding for SHA1_Update,
+XXX so we rename it here.
+*/
+#define SHA1_Update NSS_SHA1_Update
+
 /*
 ** Update the SHA-1 hash function with more data.
 **     "cx" the context

--- security/nss/lib/freebl/sha-fast-amd64-sun.s.orig   2009-01-29 
22:32:28.000000000 +0200
+++ security/nss/lib/freebl/sha-fast-amd64-sun.s        2009-01-29 
22:32:53.000000000 +0200
@@ -1712,9 +1712,9 @@
 .LFE7:
        .size   shaCompress, .-shaCompress
        .align 16
-.globl SHA1_Update
-       .type   SHA1_Update, @function
-SHA1_Update:
+.globl NSS_SHA1_Update
+       .type   NSS_SHA1_Update, @function
+NSS_SHA1_Update:
 .LFB5:
        pushq   %rbp
 .LCFI5:
@@ -1800,7 +1800,7 @@
        call    shaCompress
        jmp     .L245
 .LFE5:
-       .size   SHA1_Update, .-SHA1_Update
+       .size   NSS_SHA1_Update, .-NSS_SHA1_Update
        .section        .rodata
        .align 32
        .type   bulk_pad.0, @object
@@ -1902,7 +1902,7 @@
        subl    %r8d, %edx
        andl    $63, %edx
        incl    %edx
-       call    SHA1_Update@PLT
+       call    NSS_SHA1_Update@PLT
        movq    %rbx, %rdi
        movq    %r12, %rsi
        shrq    $32, %rdi
@@ -2018,7 +2018,7 @@
        movl    %r12d, %edx
        movq    %r13, %rsi
        movq    %rbx, %rdi
-       call    SHA1_Update@PLT
+       call    NSS_SHA1_Update@PLT
        leaq    -292(%rbp), %rdx
        movq    %r14, %rsi
        movq    %rbx, %rdi



Home | Main Index | Thread Index | Old Index