)]}'
{"octavia/common/tls_utils/cert_parser.py":[{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[{"line_number":68,"context_line":"def _read_private_key(private_key_pem, passphrase\u003dNone):"},{"line_number":69,"context_line":"    \"\"\"Reads a private key PEM block and returns a RSAPrivatekey"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    :param private_key_pem: The pivate key PEM block"},{"line_number":72,"context_line":"    :param passphrase: Optional passphrase needed to decrypt the private key"},{"line_number":73,"context_line":"    :returns: a RSAPrivatekey object"},{"line_number":74,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_956f562a","line":71,"updated":"2016-09-30 11:46:00.000000000","message":"nit: \"pivate key\"","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[{"line_number":68,"context_line":"def _read_private_key(private_key_pem, passphrase\u003dNone):"},{"line_number":69,"context_line":"    \"\"\"Reads a private key PEM block and returns a RSAPrivatekey"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    :param private_key_pem: The pivate key PEM block"},{"line_number":72,"context_line":"    :param passphrase: Optional passphrase needed to decrypt the private key"},{"line_number":73,"context_line":"    :returns: a RSAPrivatekey object"},{"line_number":74,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_b6135cb7","line":71,"in_reply_to":"3a98d1f4_956f562a","updated":"2016-09-30 20:58:08.000000000","message":"Done","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def _pem_print_cert(cert\u003dNone):"},{"line_number":121,"context_line":"    \"\"\"Prints a PEM-encoded certificate given a X509Certificat object"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    :param intermediates: X509Certificate object"},{"line_number":124,"context_line":"    :returns: A PEM-encoded X509 certificate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_f5497ab8","line":121,"updated":"2016-09-30 11:46:00.000000000","message":"nit: X509Certificat\n\n/me imagines a Cerificate cat","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def _pem_print_cert(cert\u003dNone):"},{"line_number":121,"context_line":"    \"\"\"Prints a PEM-encoded certificate given a X509Certificat object"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    :param intermediates: X509Certificate object"},{"line_number":124,"context_line":"    :returns: A PEM-encoded X509 certificate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_366f4c2c","line":121,"in_reply_to":"3a98d1f4_f5497ab8","updated":"2016-09-30 20:58:08.000000000","message":"Haha! well, I do blame kitty...","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        data \u003d str(data)"},{"line_number":198,"context_line":"    for certLine in data.replace(\u0027\\r\u0027, \u0027\u0027).split(\u0027\\n\u0027):"},{"line_number":199,"context_line":"        if not certLine:"},{"line_number":200,"context_line":"            break"},{"line_number":201,"context_line":"        certLine \u003d certLine.strip()"},{"line_number":202,"context_line":"        if state \u003d\u003d stSpam:"},{"line_number":203,"context_line":"            if certLine in startMarkers:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_b5aff228","line":200,"updated":"2016-09-30 11:46:00.000000000","message":"Is it possible to have a blank line before we reach the end? Could this be a \"continue\" to safely avoid that (if it is even a possibility) since the for-loop would terminate eventually anyway?","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        data \u003d str(data)"},{"line_number":198,"context_line":"    for certLine in data.replace(\u0027\\r\u0027, \u0027\u0027).split(\u0027\\n\u0027):"},{"line_number":199,"context_line":"        if not certLine:"},{"line_number":200,"context_line":"            break"},{"line_number":201,"context_line":"        certLine \u003d certLine.strip()"},{"line_number":202,"context_line":"        if state \u003d\u003d stSpam:"},{"line_number":203,"context_line":"            if certLine in startMarkers:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_36274ccb","line":200,"in_reply_to":"3a98d1f4_b5aff228","updated":"2016-09-30 20:58:08.000000000","message":"Aah-- good point. This was code inherited from the above referenced pyasn1-modules method, and I agree that break is not appropriate here. (Sorry-- it was late last night I was piecing the last of this together.)","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            asn1Spec\u003drfc2315.SignedData())"},{"line_number":244,"context_line":"    except Exception:"},{"line_number":245,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"},{"line_number":246,"context_line":"        raise exceptions.UnreadableCert"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    for cert in content.getComponentByName(\u0027certificates\u0027):"},{"line_number":249,"context_line":"        yield der_encoder.encode(cert)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_351f626d","line":246,"updated":"2016-09-30 11:46:00.000000000","message":"Somehow the repetition of this exception makes me want to consolidate the above, but I\u0027m not sure it makes it any more readable, so it\u0027s probably fine, unless you can think of a really obvious way to do it.","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[{"line_number":243,"context_line":"            asn1Spec\u003drfc2315.SignedData())"},{"line_number":244,"context_line":"    except Exception:"},{"line_number":245,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"},{"line_number":246,"context_line":"        raise exceptions.UnreadableCert"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    for cert in content.getComponentByName(\u0027certificates\u0027):"},{"line_number":249,"context_line":"        yield der_encoder.encode(cert)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_39e9ffe6","line":246,"in_reply_to":"3a98d1f4_351f626d","updated":"2016-09-30 20:58:08.000000000","message":"I wrote it this way because I wanted it to be more obvious where or what part of the process generated the exception. And at least this way we get a line number in a traceback which is somewhat helpful. It seemed to me like a very annoying troubleshooting problem if we wrap a dozen complicated calls together in a \"try\" block and generate a single exception if any one of them fails. Especially given the complication of ASN1 encoding in the first place... good luck determining exactly what it is about your particular PKCS7 block that this code didn\u0027t like, eh!\n\nI also considered whether it might make sense to have several different kinds of exceptions we could throw in this and the other related methods-- but I actually anticipate that most people won\u0027t be generating their PKCS7 bundles themselves, so in almost all cases, this code should either work entirely or fail early. If other people have stronger opinions about this, I can see about refining the above and using something with more detail than just \"Unreadable Certificate.\"","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"adf0484cf3e062e3c69bc727fcaa3b15ed3a2ced","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        raise exceptions.NeedsPassphrase"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def print_private_key(private_key, passphrase\u003dNone):"},{"line_number":91,"context_line":"    \"\"\"Prints an unencrypted PEM-encoded private key"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    :param private_key: The private key in PEM format (encrypted or not)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_abeee788","line":90,"range":{"start_line":90,"start_character":4,"end_line":90,"end_character":9},"updated":"2016-10-05 23:24:34.000000000","message":"Print seems misleading.  Isn\u0027t it extract or decode?","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fb8bfd077ebe302dccc225460574711082aac9ed","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        raise exceptions.NeedsPassphrase"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def print_private_key(private_key, passphrase\u003dNone):"},{"line_number":91,"context_line":"    \"\"\"Prints an unencrypted PEM-encoded private key"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    :param private_key: The private key in PEM format (encrypted or not)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_b4bf245f","line":90,"range":{"start_line":90,"start_character":4,"end_line":90,"end_character":9},"in_reply_to":"1a95cdbc_abeee788","updated":"2016-10-06 02:43:13.000000000","message":"Not really-- I mean, this method essentially does the same thing as a no-op if the key handed to it isn\u0027t encrypted. And if it is encrypted, it\u0027ll decrypt it if possible and return a PEM-encoded RSA key, suitable for printing into a certificate file on an amphora (or wherever-- this method could be used for managing the keys uses for the REST API keys). So... it\u0027s not exactly \"extract.\" Though I agree that \"print\" seems odd when it\u0027s really just preparing something for print. Maybe \"prepare\"?","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"adf0484cf3e062e3c69bc727fcaa3b15ed3a2ced","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            yield _pem_print_cert(_get_x509_from_der_bytes(x509Pem))"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def _pem_print_cert(cert\u003dNone):"},{"line_number":121,"context_line":"    \"\"\"Prints a PEM-encoded certificate given a X509Certificate object"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    :param intermediates: X509Certificate object"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_2bb1f78f","line":120,"range":{"start_line":120,"start_character":9,"end_line":120,"end_character":14},"updated":"2016-10-05 23:24:34.000000000","message":"Same here, extract or decode?","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fb8bfd077ebe302dccc225460574711082aac9ed","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            yield _pem_print_cert(_get_x509_from_der_bytes(x509Pem))"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"def _pem_print_cert(cert\u003dNone):"},{"line_number":121,"context_line":"    \"\"\"Prints a PEM-encoded certificate given a X509Certificate object"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    :param intermediates: X509Certificate object"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_1478d8c3","line":120,"range":{"start_line":120,"start_character":9,"end_line":120,"end_character":14},"in_reply_to":"1a95cdbc_2bb1f78f","updated":"2016-10-06 02:43:13.000000000","message":"No, extract is more akin to what you\u0027re doing when you pull an X509 certificate out of a PKCS7 bundle. That should already have been done when this method is called, and what it returns is suitable for printing into a PEM certificate file. Maybe \"prepare\" is better here? Eh... I\u0027ll change the name of both methods in the next patch set.","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"adf0484cf3e062e3c69bc727fcaa3b15ed3a2ced","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    if six.PY3:"},{"line_number":197,"context_line":"        data \u003d str(data)"},{"line_number":198,"context_line":"    for certLine in data.replace(\u0027\\r\u0027, \u0027\u0027).split(\u0027\\n\u0027):"},{"line_number":199,"context_line":"        if not certLine:"},{"line_number":200,"context_line":"            continue"},{"line_number":201,"context_line":"        certLine \u003d certLine.strip()"},{"line_number":202,"context_line":"        if state \u003d\u003d stSpam:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_ee263d67","line":199,"updated":"2016-10-05 23:24:34.000000000","message":"There are a few branches here that aren\u0027t tested.","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fb8bfd077ebe302dccc225460574711082aac9ed","unresolved":false,"context_lines":[{"line_number":196,"context_line":"    if six.PY3:"},{"line_number":197,"context_line":"        data \u003d str(data)"},{"line_number":198,"context_line":"    for certLine in data.replace(\u0027\\r\u0027, \u0027\u0027).split(\u0027\\n\u0027):"},{"line_number":199,"context_line":"        if not certLine:"},{"line_number":200,"context_line":"            continue"},{"line_number":201,"context_line":"        certLine \u003d certLine.strip()"},{"line_number":202,"context_line":"        if state \u003d\u003d stSpam:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_7454bc20","line":199,"in_reply_to":"1a95cdbc_ee263d67","updated":"2016-10-06 02:43:13.000000000","message":"Aah-- Ok. I\u0027ll add some spam to the test input to hit the branches not hit.","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"adf0484cf3e062e3c69bc727fcaa3b15ed3a2ced","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    except Exception:"},{"line_number":234,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"},{"line_number":235,"context_line":"        raise exceptions.UnreadableCert"},{"line_number":236,"context_line":"    if contentType !\u003d rfc2315.signedData:"},{"line_number":237,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"},{"line_number":238,"context_line":"        raise exceptions.UnreadableCert"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_ce08a1dc","line":236,"updated":"2016-10-05 23:24:34.000000000","message":"There are a few branches here that aren\u0027t tested.","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fb8bfd077ebe302dccc225460574711082aac9ed","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    except Exception:"},{"line_number":234,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"},{"line_number":235,"context_line":"        raise exceptions.UnreadableCert"},{"line_number":236,"context_line":"    if contentType !\u003d rfc2315.signedData:"},{"line_number":237,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"},{"line_number":238,"context_line":"        raise exceptions.UnreadableCert"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_7f19f578","line":236,"in_reply_to":"1a95cdbc_ce08a1dc","updated":"2016-10-06 02:43:13.000000000","message":"So, I thought about this too. Unfortunately, to test all the exceptions paths here, I\u0027d need a PKCS7 bundle whose outer envelope is valid, yet it contains invalid data inside the envelope. As I have very few tools to generate PKCS7 bundles, and these enforce proper internal structure for what we\u0027re trying to do... I don\u0027t know of any way to generate the test erroneous input here. Yet I didn\u0027t want to *not* do this in a try/except block because it\u0027s possible that somebody might actually come up with such a malformed PKCS7 bundle at some point, and I thought it would be better to gracefully emit an error than potentially crash the o-cw or other octavia controller daemons. So yes, there are a few untested code paths here, but they will only trigger if you\u0027ve got some really weird input data (so... the error returned is actually correct anyway.)\n\nWhat do you think?","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"adf0484cf3e062e3c69bc727fcaa3b15ed3a2ced","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    :returns: crypto high-level x509 data from the DER-encoded certificate"},{"line_number":327,"context_line":"    \"\"\""},{"line_number":328,"context_line":"    try:"},{"line_number":329,"context_line":"        x509cert \u003d x509.load_der_x509_certificate(certificate_der,"},{"line_number":330,"context_line":"                                                  backends.default_backend())"},{"line_number":331,"context_line":"    except Exception:"},{"line_number":332,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_ce2fc13c","line":329,"updated":"2016-10-05 23:24:34.000000000","message":"The exception path isn\u0027t tested here.","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"0fa760e13ecb689466079830427cf42330bd222c","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    :returns: crypto high-level x509 data from the DER-encoded certificate"},{"line_number":327,"context_line":"    \"\"\""},{"line_number":328,"context_line":"    try:"},{"line_number":329,"context_line":"        x509cert \u003d x509.load_der_x509_certificate(certificate_der,"},{"line_number":330,"context_line":"                                                  backends.default_backend())"},{"line_number":331,"context_line":"    except Exception:"},{"line_number":332,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_fff6e5f7","line":329,"in_reply_to":"1a95cdbc_9f4de174","updated":"2016-10-06 02:46:48.000000000","message":"Hmmm... actually, on second thought, I could just whack this method directly in a test instead of the indirect way it\u0027s done now. I\u0027ll go ahead and do that.","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"fb8bfd077ebe302dccc225460574711082aac9ed","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    :returns: crypto high-level x509 data from the DER-encoded certificate"},{"line_number":327,"context_line":"    \"\"\""},{"line_number":328,"context_line":"    try:"},{"line_number":329,"context_line":"        x509cert \u003d x509.load_der_x509_certificate(certificate_der,"},{"line_number":330,"context_line":"                                                  backends.default_backend())"},{"line_number":331,"context_line":"    except Exception:"},{"line_number":332,"context_line":"        LOG.exception(_LE(\u0027Unreadable Certificate.\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_9f4de174","line":329,"in_reply_to":"1a95cdbc_ce2fc13c","updated":"2016-10-06 02:43:13.000000000","message":"Similar problem as the above: At this point when this method is called, we\u0027ve already extracted the certificate out of the PKCS7 bundle, and I don\u0027t know of any tools which will let me encapsulate a badly-encoded X509 certificate in a proper PKCS7 bundle.","commit_id":"01d9a0b289a4ab1546bf87c9d7d4f89f31185c8e"}],"octavia/tests/unit/amphorae/drivers/haproxy/test_rest_api_driver.py":[{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            \u0027sni_certs\u0027: sconts"},{"line_number":90,"context_line":"        }"},{"line_number":91,"context_line":"        self.driver.client.get_cert_md5sum.side_effect \u003d ["},{"line_number":92,"context_line":"            exc.NotFound, \u0027Fake_MD5\u0027, \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027]"},{"line_number":93,"context_line":"        self.driver.jinja.build_config.side_effect \u003d [\u0027fake_config\u0027]"},{"line_number":94,"context_line":"        self.driver.client.get_listener_status.side_effect \u003d ["},{"line_number":95,"context_line":"            dict(status\u003d\u0027ACTIVE\u0027)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_20280286","line":92,"updated":"2016-09-30 11:46:00.000000000","message":"The old one wasn\u0027t fake enough for you?\n\nTHINGS WERE JUST TOO REAL, MAN. TOO REAL.","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            \u0027sni_certs\u0027: sconts"},{"line_number":90,"context_line":"        }"},{"line_number":91,"context_line":"        self.driver.client.get_cert_md5sum.side_effect \u003d ["},{"line_number":92,"context_line":"            exc.NotFound, \u0027Fake_MD5\u0027, \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027]"},{"line_number":93,"context_line":"        self.driver.jinja.build_config.side_effect \u003d [\u0027fake_config\u0027]"},{"line_number":94,"context_line":"        self.driver.client.get_listener_status.side_effect \u003d ["},{"line_number":95,"context_line":"            dict(status\u003d\u0027ACTIVE\u0027)]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_240c763a","line":92,"in_reply_to":"3a98d1f4_20280286","updated":"2016-09-30 20:58:08.000000000","message":"Haha! Having a real md5sum in here threw me off when I was troubleshooting this method at first. So I updated this mostly out of spite for the 30 minutes or so I lost on that. XD","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                         sample_certs.X509_IMDS]) + \u0027\\n\u0027"},{"line_number":114,"context_line":"        ucp_calls \u003d ["},{"line_number":115,"context_line":"            mock.call(self.amp, self.sl.id,"},{"line_number":116,"context_line":"                      sample_certs.X509_CERT_CN + \u0027.pem\u0027, fp1),"},{"line_number":117,"context_line":"            mock.call(self.amp, self.sl.id,"},{"line_number":118,"context_line":"                      sample_certs.X509_CERT_CN_2 + \u0027.pem\u0027, fp2),"},{"line_number":119,"context_line":"            mock.call(self.amp, self.sl.id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_805ab628","line":116,"updated":"2016-09-30 11:46:00.000000000","message":"It irks me a little bit that this isn\u0027t _1 but that\u0027s probably just my OCD.","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                         sample_certs.X509_IMDS]) + \u0027\\n\u0027"},{"line_number":114,"context_line":"        ucp_calls \u003d ["},{"line_number":115,"context_line":"            mock.call(self.amp, self.sl.id,"},{"line_number":116,"context_line":"                      sample_certs.X509_CERT_CN + \u0027.pem\u0027, fp1),"},{"line_number":117,"context_line":"            mock.call(self.amp, self.sl.id,"},{"line_number":118,"context_line":"                      sample_certs.X509_CERT_CN_2 + \u0027.pem\u0027, fp2),"},{"line_number":119,"context_line":"            mock.call(self.amp, self.sl.id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_c44e726e","line":116,"in_reply_to":"3a98d1f4_805ab628","updated":"2016-09-30 20:58:08.000000000","message":"Yeah, I was on the fence about that as well, but, you know, it\u0027s \"www.example.com\" not \"www1.example.com\". XD\n\nObviously, feel free to submit a patch to change all that if it bugs you enough. XD","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"}],"tools/pkcs7_2_pem.py":[{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3a98d1f4_e0b7fa37","updated":"2016-09-30 11:46:00.000000000","message":"Is this filename really using \"2\" to mean \"to\"?\nYou didn\u0027t like pkcs7_to_pem.py?","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3a98d1f4_c45f52e3","in_reply_to":"3a98d1f4_e0b7fa37","updated":"2016-09-30 20:58:08.000000000","message":"Haha! Yes-- I\u0027ll go ahead and rename it.","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":10273,"name":"Adam Harwell","email":"flux.adam@gmail.com","username":"rm_you"},"change_message_id":"9a7c9ffd7a05b05e9786bde3a017f0d07c416fe9","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    idx \u003d -1"},{"line_number":46,"context_line":"    state \u003d stSpam"},{"line_number":47,"context_line":"    if six.PY3:"},{"line_number":48,"context_line":"        data \u003d str(data, encoding\u003d\"UTF-8\")"},{"line_number":49,"context_line":"    for certLine in data.replace(\u0027\\r\u0027, \u0027\u0027).split(\u0027\\n\u0027):"},{"line_number":50,"context_line":"        if not certLine:"},{"line_number":51,"context_line":"            break"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_c0dcbe75","line":48,"updated":"2016-09-30 11:46:00.000000000","message":"interesting, this is essentially the same function as in cert_parser.py, but split out into a utility? But, this is slightly different (you didn\u0027t specify the encoding in the other one).","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"bb18c7457984d6e5cc09fa874e0a35ac35e88744","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    idx \u003d -1"},{"line_number":46,"context_line":"    state \u003d stSpam"},{"line_number":47,"context_line":"    if six.PY3:"},{"line_number":48,"context_line":"        data \u003d str(data, encoding\u003d\"UTF-8\")"},{"line_number":49,"context_line":"    for certLine in data.replace(\u0027\\r\u0027, \u0027\u0027).split(\u0027\\n\u0027):"},{"line_number":50,"context_line":"        if not certLine:"},{"line_number":51,"context_line":"            break"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_84538ae1","line":48,"in_reply_to":"3a98d1f4_c0dcbe75","updated":"2016-09-30 20:58:08.000000000","message":"Yes-- I wanted to make a utility which made it a little easier for people to see what the code is actually doing, and to essentially duplicate the functionality of \"openssl pkcs7 -in \u003cfile\u003e -print_certs\" without actually calling out to openssl on the shell. For whatever reason, I found that in this utility I needed to specify the encoding as UTF-8, whereas in the octavia code, it breaks if I do that. But only for python3. I know that string handling in general is a bit... odd in python3, so I\u0027m chalking this up to there being slightly different meta-information surrounding the string that gets passed in the octavia code versus what gets slurped in with sys.stdin.buffer.read() in this utility. I wasn\u0027t able to get to the bottom of it, but am open to suggestions if you have any.\n\nIn any case, it looks to me like both the octavia code and this utility work with python3 despite this one-line difference.","commit_id":"6bcc469c10cb7b9d3bc17d44fec703301076afc8"}]}
