x509 lists handling, thanks Michele and Luca Zachetti

This commit is contained in:
Massimo Di Pierro
2011-12-03 22:37:49 -06:00
parent eaa7b651eb
commit 6bdee2560c
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.3 (2011-12-03 01:04:16) dev
Version 1.99.3 (2011-12-03 22:37:30) dev
+4 -4
View File
@@ -86,10 +86,10 @@ class X509Auth(object):
p = profile = dict()
username = p['username'] = self.subject.CN or self.subject.commonName
p['first_name'] = self.subject.givenName or username
p['last_name'] = self.subject.surname
p['email'] = self.subject.Email or self.subject.emailAddress
username = p['username'] = reduce(lambda a,b: '%s | %s' % (a,b), self.subject.CN or self.subject.commonName)
p['first_name'] = reduce(lambda a,b: '%s | %s' % (a,b),self.subject.givenName or username)
p['last_name'] = reduce(lambda a,b: '%s | %s' % (a,b),self.subject.surname)
p['email'] = reduce(lambda a,b: '%s | %s' % (a,b),self.subject.Email or self.subject.emailAddress)
# IMPORTANT WE USE THE CERT SERIAL AS UNIQUE KEY FOR THE USER
p['registration_id'] = self.serial