summaryrefslogtreecommitdiff
path: root/security/mozilla-rootcerts/files
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2009-11-03 02:43:55 +0000
committerwiz <wiz@pkgsrc.org>2009-11-03 02:43:55 +0000
commitf9123c3045888e737e5f44713b1abf2c94f73723 (patch)
treef6c1a796ce92d7b44c85a03f763a96d9777f9a85 /security/mozilla-rootcerts/files
parent705e7040f209e54334d4c5a95628e5b96f7be458 (diff)
downloadpkgsrc-f9123c3045888e737e5f44713b1abf2c94f73723.tar.gz
Simplify awk usage to make it work with nawk, from Matthias Pfaller in
PR 42238. While here, update to latest certificates from mozilla.
Diffstat (limited to 'security/mozilla-rootcerts/files')
-rw-r--r--security/mozilla-rootcerts/files/mozilla-rootcerts.sh13
1 files changed, 2 insertions, 11 deletions
diff --git a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
index 84ec5ea318c..e2fc6b2516b 100644
--- a/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
+++ b/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: mozilla-rootcerts.sh,v 1.1.1.1 2007/09/20 20:02:53 jlam Exp $
+# $NetBSD: mozilla-rootcerts.sh,v 1.2 2009/11/03 02:43:56 wiz Exp $
#
# This script is meant to be used as follows:
#
@@ -126,13 +126,6 @@ extract)
# "mozilla-rootcert-<n>.pem" in the current working directory.
#
cat "$certfile" | ${AWK} -v OPENSSL=${OPENSSL} '
- function join(array, start, end, separator, result, i) {
- result = array[start]
- for (i = start + 1; i <= end; i++)
- result = result separator array[i]
- return result
- }
-
function base8to10(o, octal, decimal, power, i, n) {
decimal = 0
n = split(o, octal, "")
@@ -149,7 +142,6 @@ extract)
BEGIN {
filenum = 0
while (getline) {
- D = 0
if ($0 !~ /^CKA_VALUE MULTILINE_OCTAL/) continue
filename = "mozilla-rootcert-" filenum ".pem"
@@ -160,10 +152,9 @@ extract)
if ($0 ~ /^END/) break
n = split($0, line, "\\")
for (i = 2; i <= n; i++) {
- der[D++] = sprintf("%c", base8to10(line[i]))
+ printf("%c", base8to10(line[i])) | cmd
}
}
- printf("%s", join(der, 0, D, "")) | cmd
close(cmd)
}
}'