hunyadi-dev commented on a change in pull request #995: URL: https://github.com/apache/nifi-minifi-cpp/pull/995#discussion_r572724767
########## File path: docker/test/integration/minifi/core/SSL_cert_utils.py ########## @@ -0,0 +1,54 @@ +import time +import logging + +from M2Crypto import X509, EVP, RSA, ASN1 + +def gen_cert(): + """ + Generate TLS certificate request for testing + """ + + req, key = gen_req() + pub_key = req.get_pubkey() + subject = req.get_subject() + cert = X509.X509() + # noinspection PyTypeChecker + cert.set_serial_number(1) + cert.set_version(2) + cert.set_subject(subject) + t = int(time.time()) + now = ASN1.ASN1_UTCTIME() + now.set_time(t) + now_plus_year = ASN1.ASN1_UTCTIME() + now_plus_year.set_time(t + 60 * 60 * 24 * 365) + cert.set_not_before(now) + cert.set_not_after(now_plus_year) + issuer = X509.X509_Name() + issuer.C = 'US' + issuer.CN = 'minifi-listen' + cert.set_issuer(issuer) + cert.set_pubkey(pub_key) + cert.sign(key, 'sha256') + + return cert, key + +def rsa_gen_key_callback(): + pass Review comment: Updated. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org