now client reads CA offerings from dot file

This commit is contained in:
James Kasten
2012-11-07 22:13:14 -05:00
parent e1c737e9d9
commit 85c0d141f7
2 changed files with 12 additions and 1 deletions
+4
View File
@@ -0,0 +1,4 @@
EFF (DV);The EFF Trustify CA, Domain Validated - FREE
UMich (DV);The Michigan Trustify CA, Domain Validated - FREE
TrustUS (DV);The TrustUS Trustify CA, Domain Validated - FREE
TrustUS (OV);The TrustUS Trustify CA, Orgainization Validated - 10 USD
+8 -1
View File
@@ -59,10 +59,17 @@ def filter_names(names):
def choice_of_ca():
# XXX This is a stub
d = dialog.Dialog()
choices = [("EFF", "The EFF Trustify CA"), ("UMich", "The Michigan Trustify CA")]
choices = get_cas()
#choices = [("EFF", "The EFF Trustify CA"), ("UMich", "The Michigan Trustify CA")]
random.shuffle(choices)
result = d.menu("Pick a Certificate Authority. They're all unique and special!", width=70, choices=choices)
def get_cas():
with open(".ca_offerings") as f:
choices = [line.split(";", 1) for line in f]
return choices
# based on M2Crypto unit test written by Toby Allsopp
from M2Crypto import EVP, X509, RSA