Permalink
Browse files

add create root key function

  • Loading branch information...
genunity committed Dec 3, 2018
1 parent 7e8252b commit 4de17d6ebc876a113a9c7349fe03300b373ac3dd
Showing with 7 additions and 1 deletion.
  1. +7 −1 greengo/greengo.py
@@ -4,6 +4,7 @@
import json
import yaml
import shutil
import urllib
from time import sleep
import logging
from boto3 import session
@@ -104,6 +105,11 @@ def create(self):

log.info("[END] creating group {0}".format(self.group['Group']['name']))

def create_root_key(self):
if not os.path.isfile(self.group['certs']['keypath']+"/root-CA.crt"):
urllib.urlretrieve("https://www.symantec.com/content/en/us/enterprise/verisign/roots/VeriSign-Class%203-Public-Primary-Certification-Authority-G5.pem",self.group['certs']['keypath']+"/root-CA.crt")


def deploy(self):
if not self.state:
log.info("There is nothing to deploy. Do create first.")
@@ -796,7 +802,7 @@ def _create_ggc_config_file(self, path, name, core_thing):

config = {
"coreThing": {
"caPath": "root.ca.pem",
"caPath": "root-CA.crt",
"certPath": core_thing['thingName'] + ".pem",
"keyPath": core_thing['thingName'] + ".key",
"thingArn": core_thing['thingArn'],

0 comments on commit 4de17d6

Please sign in to comment.