X509 Extension Authority Information Access: URI of Registry
authorLoic Baron <loic.baron@lip6.fr>
Thu, 9 Feb 2017 02:23:35 +0000 (03:23 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Thu, 9 Feb 2017 02:23:35 +0000 (03:23 +0100)
sfa/trust/hierarchy.py

index 5e76dbf..9e008b1 100644 (file)
@@ -262,6 +262,11 @@ class Hierarchy:
 
         gid.set_pubkey(pkey)
         gid.encode()
+        if 'http' in self.config.SFA_REGISTRY_HOST:
+            url = 'caIssuers;URI:' + str(self.config.SFA_REGISTRY_HOST) +':'+ str(self.config.SFA_REGISTRY_PORT)
+        else:
+            url = 'caIssuers;URI:https://' + str(self.config.SFA_REGISTRY_HOST) +':'+ str(self.config.SFA_REGISTRY_PORT)
+        gid.set_data(url, 'authorityInfoAccess')
         gid.sign()
 
         return gid