TODO encode? comments for jose_b64encode

This commit is contained in:
Jakub Warmuz 2014-11-24 13:15:09 +01:00
parent aef18c4413
commit 882170559d
3 changed files with 7 additions and 7 deletions

View file

@ -127,7 +127,7 @@ def certificate_request(csr_der, key):
"""
return {
"type": "certificateRequest",
"csr": le_util.jose_b64encode(csr_der),
"csr": le_util.jose_b64encode(csr_der), # TODO: csr_der.encode?
"signature": crypto_util.create_sig(csr_der, key),
}
@ -148,7 +148,7 @@ def revocation_request(key_file, cert_der):
"""
return {
"type": "revocationRequest",
"certificate": le_util.jose_b64encode(cert_der),
"certificate": le_util.jose_b64encode(cert_der), # TODO: csr_der.encode?
"signature": crypto_util.create_sig(cert_der, key_file),
}

View file

@ -1116,7 +1116,7 @@ LogLevel warn \n\
self.save("SNI Challenge", True)
self.restart(True)
s = le_util.jose_b64encode(s)
s = le_util.jose_b64encode(s) # TODO: s.encode?
return {"type":"dvsni", "s":s}
def cleanup(self):

View file

@ -58,14 +58,14 @@ def create_sig(msg, key_file, nonce=None, nonce_len=CONFIG.NONCE_SIZE):
e_bytes = binascii.unhexlify(leading_zeros(hex(key.e)[2:].replace("L", "")))
return {
"nonce": le_util.jose_b64encode(nonce),
"nonce": le_util.jose_b64encode(nonce), # TODO: nonce.encode?
"alg": "RS256",
"jwk": {
"kty": "RSA",
"n": le_util.jose_b64encode(n_bytes),
"e": le_util.jose_b64encode(e_bytes),
"n": le_util.jose_b64encode(n_bytes), # TODO: n_bytes.encode?
"e": le_util.jose_b64encode(e_bytes), # TODO: e_bytes.encode?
},
"sig": le_util.jose_b64encode(signature),
"sig": le_util.jose_b64encode(signature), # TODO: signature.encode?
}