in SubTemplates/IoT/Lambdas/provision_device/client/provisioning_handler.py [0:0]
def get_current_certs(self):
""" Gets the currently active production certificates for a device.
"""
non_bootstrap_certs = glob.glob('{}/[!boot]*.crt'.format(self.secure_cert_path))
non_bootstrap_key = glob.glob('{}/[!boot]*.key'.format(self.secure_cert_path))
#Get the current cert
if len(non_bootstrap_certs) > 0:
self.claim_cert = os.path.basename(non_bootstrap_certs[0])
#Get the current key
if len(non_bootstrap_key) > 0:
self.secure_key = os.path.basename(non_bootstrap_key[0])