code: def check_key_cert_match(keyfile, certfile):
      
      key_modulus = subprocess.check_output(
          'openssl rsa -noout -modulus -in {}'.format(keyfile),
          shell=True)
      cert_modulus = subprocess.check_output(
          'openssl x509 -noout -modulus -in {}'.format(certfile),
          shell=True)
      return key_modulus == cert_modulus
docs: check if the ssl key matches the certificate
      :param keyfile: file path to the ssl key
      :param certfile: file path to the ssl certificate
      :returns: true or false