there must be at least one subject name to sign

This commit is contained in:
Seth Schoen 2012-07-01 23:14:55 -07:00
parent a927dae732
commit 83a1ee779b

View file

@ -176,6 +176,9 @@ class session(object):
self.die(r, r.UnsafeKey)
return
names = CSR.subject_names(csr)
if len(names) == 0:
self.die(r, r.BadCSR)
return
for san in names: # includes CN as well as SANs
if not safe("hostname", san) or not CSR.can_sign(san):
# TODO: Is there a problem including client-supplied data in the URL?