Fetch the results for the specified zone.
(logger, jobs_manager, fbc, access_token, zone)
| 79 | |
| 80 | |
| 81 | def fetch_domain(logger, jobs_manager, fbc, access_token, zone): |
| 82 | """ |
| 83 | Fetch the results for the specified zone. |
| 84 | """ |
| 85 | fb_url = ( |
| 86 | (fbc.BASE_URL + fbc.VERSION + "/certificates?query=") |
| 87 | + zone |
| 88 | + ("&access_token=" + access_token + "&limit=500" + "") |
| 89 | ) |
| 90 | # "&fields=cert_hash_sha256,domains,issuer_name,certificate_pem" |
| 91 | |
| 92 | cert_results = [] |
| 93 | |
| 94 | while fb_url is not None: |
| 95 | result = make_https_request(logger, jobs_manager, fb_url) |
| 96 | |
| 97 | if result is None: |
| 98 | logger.warning("Error querying: " + zone) |
| 99 | return None |
| 100 | |
| 101 | cert_results = cert_results + result["data"] |
| 102 | |
| 103 | try: |
| 104 | paging = result["paging"] |
| 105 | fb_url = paging["next"] |
| 106 | except: |
| 107 | fb_url = None |
| 108 | |
| 109 | return cert_results |
| 110 | |
| 111 | |
| 112 | def check_save_location(storage_manager, save_location): |
no test coverage detected