Lines 68-73
Link Here
|
68 |
|
68 |
|
69 |
self.contents = load_cert(self.raw) |
69 |
self.contents = load_cert(self.raw) |
70 |
|
70 |
|
|
|
71 |
def is_cert(self): |
72 |
return self.contents is not None |
73 |
|
71 |
def __getitem__(self, item): |
74 |
def __getitem__(self, item): |
72 |
"""A bit of syntactic sugar to allow the Certificate class to |
75 |
"""A bit of syntactic sugar to allow the Certificate class to |
73 |
look like the dict returned by load_cert.""" |
76 |
look like the dict returned by load_cert.""" |
Lines 873-878
Link Here
|
873 |
# Make sure that the certificate is valid. |
876 |
# Make sure that the certificate is valid. |
874 |
# |
877 |
# |
875 |
c = Certificate(certificate) |
878 |
c = Certificate(certificate) |
|
|
879 |
|
880 |
if not c.is_cert(): |
881 |
eprint("Invalid cert on user %s" % dn) |
882 |
continue |
883 |
|
876 |
if not allow_invalid_certificates: |
884 |
if not allow_invalid_certificates: |
877 |
(valid, reason) = certificate_is_valid(c) |
885 |
(valid, reason) = certificate_is_valid(c) |
878 |
if not valid: |
886 |
if not valid: |
Lines 882-887
Link Here
|
882 |
vprint(" Reason: %s" % reason) |
890 |
vprint(" Reason: %s" % reason) |
883 |
continue |
891 |
continue |
884 |
|
892 |
|
|
|
893 |
|
885 |
userlist[uid] += [c] |
894 |
userlist[uid] += [c] |
886 |
|
895 |
|
887 |
|
896 |
|