Jay Lee wrote:
Google is so good to me :-) This tip solved the problem:
http://article.gmane.org/gmane.comp.mozilla.crypto/2887
A simple:
unix2dos new_cert.txt
dos2unix new_cert.txt
and I was up and running. Nasty little bugger though... I guess this
would go down as a bug in addbuiltin.exe on win32? I now have my CA
showing up in Thunderbird with my custom nssckbi.dll file. All is well,
This problem sounds familiar. I ran into a problem with
extraneous ^M characters in certdata.c before because
Cygwin's perl opens certdata.txt either as a Unix text file
or in binary mode. I remember the problem is this code
in certdata.perl:
if( $fields[1] =~ /MULTILINE/ ) {
$fields[2] = "";
while(<>) {
last if /END/;
chomp;
$fields[2] .= "\"$_\"\n";
}
}
We couldn't figure out a portable way to make perl open
certdata.txt in text mode. The best fix we came up with
was to replace the chomp statement with:
$_ =~ s/\r|\n//g;
which should remove single CR, LF, and CR/LF.
Jay, if you are using Cygwin perl (you can determine this
by running "perl -v"), could you try this change? I also
attach a patch file that implements the change.
Wan-Teh
Index: certdata.perl
===================================================================
RCS file: /cvsroot/mozilla/security/nss/lib/ckfw/builtins/certdata.perl,v
retrieving revision 1.10
diff -u -r1.10 certdata.perl
--- certdata.perl 2 Feb 2005 22:28:12 -0000 1.10
+++ certdata.perl 10 Mar 2006 18:30:39 -0000
@@ -89,7 +89,8 @@
$fields[2] = "";
while(<>) {
last if /END/;
- chomp;
+ # remove single CR, LF, and CR/LF
+ $_ =~ s/\r|\n//g;
$fields[2] .= "\"$_\"\n";
}
}
_______________________________________________
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto