Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 402418 Details for
Bug 548374
app-misc/ca-certificates - enable dev-lang/python-3
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Make mozilla-supplied certificate conversion script work with python-3.
python3-compat.patch (text/plain), 2.82 KB, created by
Felix Tiede
on 2015-05-02 06:54:39 UTC
(
hide
)
Description:
Make mozilla-supplied certificate conversion script work with python-3.
Filename:
MIME Type:
Creator:
Felix Tiede
Created:
2015-05-02 06:54:39 UTC
Size:
2.82 KB
patch
obsolete
>diff -purN ca-certificates/mozilla/certdata2pem.py ca-certificates.new/mozilla/certdata2pem.py >--- ca-certificates/mozilla/certdata2pem.py 2014-09-24 18:11:05.000000000 +0200 >+++ ca-certificates.new/mozilla/certdata2pem.py 2015-04-19 08:37:09.670582024 +0200 >@@ -70,7 +70,7 @@ 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 = "" >@@ -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,13 @@ for obj in objects: > .replace('(', '=')\ > .replace(')', '=')\ > .replace(',', '_') >- bname = bname.decode('string_escape') >+ bname = bname.encode().decode('unicode_escape') > fname = bname + '.crt' > if os.path.exists(fname): >- print "Found duplicate certificate name %s, renaming." % bname >+ print("Found duplicate certificate name %s, renaming." % bname) > fname = bname + '_2.crt' > f = open(fname, 'w') > f.write("-----BEGIN CERTIFICATE-----\n") >- f.write("\n".join(textwrap.wrap(base64.b64encode(obj['CKA_VALUE']), 64))) >+ f.write("\n".join(textwrap.wrap(base64.b64encode(obj['CKA_VALUE'].encode('raw_unicode_escape')).decode(), 64))) > f.write("\n-----END CERTIFICATE-----\n") >
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 548374
:
402418
|
402420
|
412862