diff options
Diffstat (limited to 'app-misc/ca-certificates/files')
3 files changed, 0 insertions, 323 deletions
diff --git a/app-misc/ca-certificates/files/ca-certificates-20110502-root.patch b/app-misc/ca-certificates/files/ca-certificates-20110502-root.patch deleted file mode 100644 index f3fcf5d593d4..000000000000 --- a/app-misc/ca-certificates/files/ca-certificates-20110502-root.patch +++ /dev/null @@ -1,110 +0,0 @@ ---- a/usr/sbin/update-ca-certificates -+++ b/usr/sbin/update-ca-certificates -@@ -23,6 +23,8 @@ - - verbose=0 - fresh=0 -+ROOT="" -+RELPATH="" - while [ $# -gt 0 ]; - do - case $1 in -@@ -30,6 +31,11 @@ - verbose=1;; - --fresh|-f) - fresh=1;; -+ --root|-r) -+ ROOT=$(readlink -f "$2") -+ # needed as c_rehash wants to read the files directly -+ RELPATH="../../.." -+ shift;; - --help|-h|*) -- echo "$0: [--verbose] [--fresh]" -+ echo "$0: [--verbose] [--fresh] [--root <dir>]" - exit;; -@@ -37,11 +41,11 @@ - shift - done - --CERTSCONF=/etc/ca-certificates.conf --CERTSDIR=/usr/share/ca-certificates --LOCALCERTSDIR=/usr/local/share/ca-certificates -+CERTSCONF="$ROOT/etc/ca-certificates.conf" -+CERTSDIR="$ROOT/usr/share/ca-certificates" -+LOCALCERTSDIR="$ROOT/usr/local/share/ca-certificates" - CERTBUNDLE=ca-certificates.crt --ETCCERTSDIR=/etc/ssl/certs -+ETCCERTSDIR="$ROOT/etc/ssl/certs" - - cleanup() { - rm -f "$TEMPBUNDLE" -@@ -66,7 +70,7 @@ - -e 's/,/_/g').pem" - if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] - then -- ln -sf "$CERT" "$PEM" -+ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM" - echo +$PEM >> "$ADDED" - fi - cat "$CERT" >> "$TEMPBUNDLE" -@@ -78,22 +82,22 @@ - if test -L "$PEM" - then - rm -f "$PEM" -- echo -$PEM >> "$REMOVED" -+ echo "-$PEM" >> "$REMOVED" - fi - } - --cd $ETCCERTSDIR -+cd "$ETCCERTSDIR" - if [ "$fresh" = 1 ]; then - echo -n "Clearing symlinks in $ETCCERTSDIR..." - find . -type l -print | while read symlink - do -- case $(readlink $symlink) in -- $CERTSDIR*) rm -f $symlink;; -+ case $(readlink "$symlink") in -+ "$CERTSDIR"*) rm -f "$symlink";; - esac - done - find . -type l -print | while read symlink - do -- test -f $symlink || rm -f $symlink -+ test -f "$symlink" || rm -f "$symlink" - done - echo "done." - fi -@@ -102,12 +106,12 @@ - - # Handle certificates that should be removed. This is an explicit act - # by prefixing lines in the configuration files with exclamation marks (!). --sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt -+sed -n -e '/^$/d' -e 's/^!//p' "$CERTSCONF" | while read crt - do - remove "$CERTSDIR/$crt" - done - --sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt -+sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt - do - if ! test -f "$CERTSDIR/$crt" - then -@@ -146,14 +150,14 @@ - - echo "$ADDED_CNT added, $REMOVED_CNT removed; done." - --HOOKSDIR=/etc/ca-certificates/update.d -+HOOKSDIR="$ROOT/etc/ca-certificates/update.d" - echo -n "Running hooks in $HOOKSDIR...." - VERBOSE_ARG= - [ "$verbose" = 0 ] || VERBOSE_ARG=--verbose --eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook -+eval run-parts $VERBOSE_ARG --test -- \""$HOOKSDIR"\" | while read hook - do - ( cat $ADDED -- cat $REMOVED ) | $hook || echo E: $hook exited with code $?. -+ cat $REMOVED ) | "$hook" || echo E: "$hook" exited with code $?. - done - echo "done." - diff --git a/app-misc/ca-certificates/files/ca-certificates-20141019-root.patch b/app-misc/ca-certificates/files/ca-certificates-20141019-root.patch deleted file mode 100644 index 2b2a42c58ec5..000000000000 --- a/app-misc/ca-certificates/files/ca-certificates-20141019-root.patch +++ /dev/null @@ -1,116 +0,0 @@ -add a --root option so we can generate with DESTDIR installs - ---- a/usr/sbin/update-ca-certificates -+++ b/usr/sbin/update-ca-certificates -@@ -23,6 +23,8 @@ - - verbose=0 - fresh=0 -+ROOT="" -+RELPATH="" - while [ $# -gt 0 ]; - do - case $1 in -@@ -30,18 +32,23 @@ do - verbose=1;; - --fresh|-f) - fresh=1;; -+ --root|-r) -+ ROOT=$(readlink -f "$2") -+ # needed as c_rehash wants to read the files directly -+ RELPATH="../../.." -+ shift;; - --help|-h|*) -- echo "$0: [--verbose] [--fresh]" -+ echo "$0: [--verbose] [--fresh] [--root <dir>]" - exit;; - esac - shift - done - --CERTSCONF=/etc/ca-certificates.conf --CERTSDIR=/usr/share/ca-certificates --LOCALCERTSDIR=/usr/local/share/ca-certificates -+CERTSCONF="$ROOT/etc/ca-certificates.conf" -+CERTSDIR="$ROOT/usr/share/ca-certificates" -+LOCALCERTSDIR="$ROOT/usr/local/share/ca-certificates" - CERTBUNDLE=ca-certificates.crt --ETCCERTSDIR=/etc/ssl/certs -+ETCCERTSDIR="$ROOT/etc/ssl/certs" - - cleanup() { - rm -f "$TEMPBUNDLE" -@@ -66,7 +73,7 @@ add() { - -e 's/,/_/g').pem" - if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] - then -- ln -sf "$CERT" "$PEM" -+ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM" - echo +$PEM >> "$ADDED" - fi - # Add trailing newline to certificate, if it is missing (#635570) -@@ -79,36 +86,36 @@ remove() { - if test -L "$PEM" - then - rm -f "$PEM" -- echo -$PEM >> "$REMOVED" -+ echo "-$PEM" >> "$REMOVED" - fi - } - --cd $ETCCERTSDIR -+cd "$ETCCERTSDIR" - if [ "$fresh" = 1 ]; then -- echo -n "Clearing symlinks in $ETCCERTSDIR..." -+ printf "Clearing symlinks in $ETCCERTSDIR..." - find . -type l -print | while read symlink - do -- case $(readlink $symlink) in -- $CERTSDIR*) rm -f $symlink;; -+ case $(readlink "$symlink") in -+ "$CERTSDIR"*) rm -f "$symlink";; - esac - done - find . -type l -print | while read symlink - do -- test -f $symlink || rm -f $symlink -+ test -f "$symlink" || rm -f "$symlink" - done - echo "done." - fi - --echo -n "Updating certificates in $ETCCERTSDIR... " -+printf "Updating certificates in $ETCCERTSDIR... " - - # Handle certificates that should be removed. This is an explicit act - # by prefixing lines in the configuration files with exclamation marks (!). --sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt -+sed -n -e '/^$/d' -e 's/^!//p' "$CERTSCONF" | while read crt - do - remove "$CERTSDIR/$crt" - done - --sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt -+sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt - do - if ! test -f "$CERTSDIR/$crt" - then -@@ -151,14 +158,14 @@ mv -f "$TEMPBUNDLE" "$CERTBUNDLE" - - echo "$ADDED_CNT added, $REMOVED_CNT removed; done." - --HOOKSDIR=/etc/ca-certificates/update.d --echo -n "Running hooks in $HOOKSDIR...." -+HOOKSDIR="$ROOT/etc/ca-certificates/update.d" -+printf "Running hooks in $HOOKSDIR...." - VERBOSE_ARG= - [ "$verbose" = 0 ] || VERBOSE_ARG=--verbose --eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook -+eval run-parts $VERBOSE_ARG --test -- \""$HOOKSDIR"\" | while read hook - do - ( cat $ADDED -- cat $REMOVED ) | $hook || echo E: $hook exited with code $?. -+ cat $REMOVED ) | "$hook" || echo E: "$hook" exited with code $?. - done - echo "done." - diff --git a/app-misc/ca-certificates/files/ca-certificates-20150426-nss-certdata2pem-py3.patch b/app-misc/ca-certificates/files/ca-certificates-20150426-nss-certdata2pem-py3.patch deleted file mode 100644 index d639aefb4c09..000000000000 --- a/app-misc/ca-certificates/files/ca-certificates-20150426-nss-certdata2pem-py3.patch +++ /dev/null @@ -1,97 +0,0 @@ -https://bugs.debian.org/789753 -https://bugs.gentoo.org/548374 - ---- a/ca-certificates/mozilla/certdata2pem.py -+++ b/ca-certificates/mozilla/certdata2pem.py -@@ -31,7 +31,11 @@ objects = [] - # Dirty file parser. - in_data, in_multiline, in_obj = False, False, False - field, type, value, obj = None, None, None, dict() --for line in open('certdata.txt', 'r'): -+try: -+ f = open('certdata.txt', 'r', encoding='utf-8') -+except TypeError: -+ f = open('certdata.txt', 'r') -+for line in f: - # Ignore the file header. - if not in_data: - if line.startswith('BEGINDATA'): -@@ -53,7 +53,7 @@ for line in open('certdata.txt', 'r'): - if type == 'MULTILINE_OCTAL': - line = line.strip() - for i in re.finditer(r'\\([0-3][0-7][0-7])', line): -- value += chr(int(i.group(1), 8)) -+ value.append(int(i.group(1), 8)) - else: - value += line - continue -@@ -70,13 +70,13 @@ for line in open('certdata.txt', 'r'): - field, type = line_parts - value = None - else: -- raise NotImplementedError, 'line_parts < 2 not supported.' -+ raise NotImplementedError('line_parts < 2 not supported.') - if type == 'MULTILINE_OCTAL': - in_multiline = True -- value = "" -+ value = bytearray() - continue - obj[field] = value --if len(obj.items()) > 0: -+if len(obj) > 0: - objects.append(obj) - - # Read blacklist. -@@ -95,7 +95,7 @@ for obj in objects: - if obj['CKA_CLASS'] not in ('CKO_NETSCAPE_TRUST', 'CKO_NSS_TRUST'): - continue - if obj['CKA_LABEL'] in blacklist: -- print "Certificate %s blacklisted, ignoring." % obj['CKA_LABEL'] -+ print("Certificate %s blacklisted, ignoring." % obj['CKA_LABEL']) - elif obj['CKA_TRUST_SERVER_AUTH'] in ('CKT_NETSCAPE_TRUSTED_DELEGATOR', - 'CKT_NSS_TRUSTED_DELEGATOR'): - trust[obj['CKA_LABEL']] = True -@@ -104,13 +104,13 @@ for obj in objects: - trust[obj['CKA_LABEL']] = True - elif obj['CKA_TRUST_SERVER_AUTH'] in ('CKT_NETSCAPE_UNTRUSTED', - 'CKT_NSS_NOT_TRUSTED'): -- print '!'*74 -- print "UNTRUSTED BUT NOT BLACKLISTED CERTIFICATE FOUND: %s" % obj['CKA_LABEL'] -- print '!'*74 -+ print('!'*74) -+ print("UNTRUSTED BUT NOT BLACKLISTED CERTIFICATE FOUND: %s" % obj['CKA_LABEL']) -+ print('!'*74) - else: -- print "Ignoring certificate %s. SAUTH=%s, EPROT=%s" % \ -+ print("Ignoring certificate %s. SAUTH=%s, EPROT=%s" % \ - (obj['CKA_LABEL'], obj['CKA_TRUST_SERVER_AUTH'], -- obj['CKA_TRUST_EMAIL_PROTECTION']) -+ obj['CKA_TRUST_EMAIL_PROTECTION'])) - - for obj in objects: - if obj['CKA_CLASS'] == 'CKO_CERTIFICATE': -@@ -121,13 +121,19 @@ for obj in objects: - .replace('(', '=')\ - .replace(')', '=')\ - .replace(',', '_') -- bname = bname.decode('string_escape') -- fname = bname + '.crt' -+ -+ # this is the only way to decode the way NSS stores multi-byte UTF-8 -+ if bytes != str: -+ bname = bname.encode('utf-8') -+ bname = bname.decode('unicode_escape').encode('latin-1').decode('utf-8') -+ fname = (bname + '.crt').encode('utf-8') -+ - if os.path.exists(fname): -- print "Found duplicate certificate name %s, renaming." % bname -- fname = bname + '_2.crt' -+ print("Found duplicate certificate name %s, renaming." % fname) -+ fname = (bname + '_2.crt').encode('utf-8') - f = open(fname, 'w') - f.write("-----BEGIN CERTIFICATE-----\n") -- f.write("\n".join(textwrap.wrap(base64.b64encode(obj['CKA_VALUE']), 64))) -+ encoded = base64.b64encode(obj['CKA_VALUE']).decode('utf-8') -+ f.write("\n".join(textwrap.wrap(encoded, 64))) - f.write("\n-----END CERTIFICATE-----\n") - |