Exemplo n.º 1
0
 def get_certificates(self, options, **kwargs):
     cert_data = iam.get_all_certificates(
         account_number=self.get_option('accountNumber', options))
     return [
         dict(body=c['CertificateBody'],
              chain=c.get('CertificateChain'),
              name=c['ServerCertificateMetadata']['ServerCertificateName'])
         for c in cert_data
     ]
Exemplo n.º 2
0
 def get_certificates(self, options, **kwargs):
     cert_data = iam.get_all_certificates(
         account_number=self.get_option("accountNumber", options))
     return [
         dict(
             body=c["CertificateBody"],
             chain=c.get("CertificateChain"),
             name=c["ServerCertificateMetadata"]["ServerCertificateName"],
         ) for c in cert_data
     ]
Exemplo n.º 3
0
def test_get_all_server_certs(app):
    from lemur.plugins.lemur_aws.iam import upload_cert, get_all_certificates
    upload_cert('123456789012', 'testCert', EXTERNAL_VALID_STR, SAN_CERT_KEY)
    certs = get_all_certificates('123456789012')
    assert len(certs) == 1
Exemplo n.º 4
0
 def get_certificates(self, options, **kwargs):
     cert_data = iam.get_all_certificates(account_number=self.get_option('accountNumber', options))
     return [dict(body=c['CertificateBody'], chain=c.get('CertificateChain'),
                  name=c['ServerCertificateMetadata']['ServerCertificateName']) for c in cert_data]
Exemplo n.º 5
0
def test_get_all_server_certs(app):
    from lemur.plugins.lemur_aws.iam import upload_cert, get_all_certificates
    upload_cert('123456789012', 'testCert', EXTERNAL_VALID_STR, PRIVATE_KEY_STR)
    certs = get_all_certificates('123456789012')
    assert len(certs) == 1