raannakasturi commited on
Commit
f1fabdd
·
1 Parent(s): 359083d

refactor: Update getZeroSSLEAB.py and main.py

Browse files
Files changed (2) hide show
  1. getZeroSSLEAB.py +0 -1
  2. main.py +14 -7
getZeroSSLEAB.py CHANGED
@@ -8,7 +8,6 @@ def gen_zero_ssl_eab():
8
  url = "https://api.zerossl.com/acme/eab-credentials"
9
  headers = {'Content-Type': 'application/json'}
10
  resp = requests.post(url, params={'access_key': apikey}, headers=headers)
11
- print(resp.json())
12
  if resp.json()['success'] == False:
13
  print("Error: ", resp.json()['error'])
14
  return "Error", "Error"
 
8
  url = "https://api.zerossl.com/acme/eab-credentials"
9
  headers = {'Content-Type': 'application/json'}
10
  resp = requests.post(url, params={'access_key': apikey}, headers=headers)
 
11
  if resp.json()['success'] == False:
12
  print("Error: ", resp.json()['error'])
13
  return "Error", "Error"
main.py CHANGED
@@ -71,15 +71,22 @@ def main(i_domains, wildcard, email, ca_server, key_type, key_size=None, key_cur
71
  except Exception as e:
72
  print(f"Error deleting TXT records or no TXT records exists: {e}")
73
  return private_key, csr, cert
74
- '''
75
  if __name__ == "__main__":
76
- DOMAINS = 'thenayankasturi.eu.org, *.thenayankasturi.eu.org'
77
- ca_server = "Let's Encrypt" #Let's Encrypt (Testing), Let's Encrypt, Buypass (Testing), Buypass, ZeroSSL, Google (Testing), Google, SSL.com
78
- EMAIL = "raannakasturi@mail.com"
79
  key_type = "ec"
80
- key_curve = "ec256"
81
  key_size = None
82
  KID = None
83
  HMAC = None
84
- main(i_domains=DOMAINS, wildcard=True, email=EMAIL, ca_server=ca_server, key_type=key_type, key_size=key_size,key_curve=key_curve, kid=KID, hmac=HMAC)
85
- '''
 
 
 
 
 
 
 
 
71
  except Exception as e:
72
  print(f"Error deleting TXT records or no TXT records exists: {e}")
73
  return private_key, csr, cert
74
+
75
  if __name__ == "__main__":
76
+ DOMAINS = 'raannakasturi.eu.org'
77
+ ca_server = "Buypass (Testing)" #Let's Encrypt (Testing), Let's Encrypt, Buypass (Testing), Buypass, ZeroSSL, Google (Testing), Google, SSL.com
78
+ EMAIL = "raannak@mail.com"
79
  key_type = "ec"
80
+ key_curve = "ec384"
81
  key_size = None
82
  KID = None
83
  HMAC = None
84
+ private_key, csr, cert = main(i_domains=DOMAINS, wildcard=True, email=EMAIL, ca_server=ca_server, key_type=key_type, key_size=key_size,key_curve=key_curve, kid=KID, hmac=HMAC)
85
+ print("Private Key:")
86
+ print(private_key.decode('utf-8'))
87
+ print()
88
+ print("CSR:")
89
+ print(csr.decode('utf-8'))
90
+ print()
91
+ print("Certificate:")
92
+ print(cert.decode('utf-8'))