Bugzilla – Attachment 472 Details for
Bug 4605
tl-ldap-certalias traceback on invalid certificate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that adds error handling of invalid certificates.
tl-ldap-certalias.patch (text/plain), 1.05 KB, created by
Henrik Andersson
on 2013-04-18 13:50:26 CEST
(
hide
)
Description:
Patch that adds error handling of invalid certificates.
Filename:
MIME Type:
Creator:
Henrik Andersson
Created:
2013-04-18 13:50:26 CEST
Size:
1.05 KB
patch
obsolete
>Index: tl-ldap-certalias >=================================================================== >--- tl-ldap-certalias (revision 27083) >+++ tl-ldap-certalias (working copy) >@@ -68,6 +68,9 @@ > > self.contents = load_cert(self.raw) > >+ def is_cert(self): >+ return self.contents is not None >+ > def __getitem__(self, item): > """A bit of syntactic sugar to allow the Certificate class to > look like the dict returned by load_cert.""" >@@ -873,6 +876,11 @@ > # Make sure that the certificate is valid. > # > c = Certificate(certificate) >+ >+ if not c.is_cert(): >+ eprint("Invalid cert on user %s" % dn) >+ continue >+ > if not allow_invalid_certificates: > (valid, reason) = certificate_is_valid(c) > if not valid: >@@ -882,6 +890,7 @@ > vprint(" Reason: %s" % reason) > continue > >+ > userlist[uid] += [c] > >
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 4605
: 472