Skip to content
Snippets Groups Projects
Commit d0a945fa authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[*] Fix script creation certificate.

parent bccfdbb9
No related branches found
No related tags found
1 merge request!43Support 4552
......@@ -3,6 +3,7 @@ from CellFrame import init, Cert, CryptoKeyType
# from string import Template
# import os
import sys
import os
import json
import MyAuthConf
import random
......@@ -96,13 +97,15 @@ elif action == "init_root_ca":
print("(!) Wrong algo name \""+rootCaAlgoName+"\", possible names: sig_bliss, sig_tesla, sig_picnic, sig_dil")
help()
exit(-1)
# Create certs
print("Init root "+str(rootCaNumber)+" certificates with algo "
+ rootCaAlgoName)
print("Record somewhere the restore string(without braces): \""
+ restoreString+"\"")
for cur in range(int(rootCaNumber)):
cname = MyAuthConf.getNetworkName(appName, "_") + "_root_" + str(cur)
cert = Cert.generate(cname, rootCaAlgo, restoreString)
cert.save()
cname = MyAuthConf.getNetworkName(appName, "-") + ".root." + str(cur)
Cert.folderAdd (os.getcwd()+"/var/lib/ca/")
certobject = Cert.generate(cname, rootCaAlgo, restoreString)
dir(certobject)
certobject.save()
print("Save certificate")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment