The nova.crypto Module

Wrappers around standard crypto data elements.

Includes root and intermediate CAs, SSH key_pairs and x509 certificates.

ca_folder(project_id=None)
ca_path(project_id=None)
compute_md5(fp)

Compute an md5 hash.

Parameters:fp (file) – File pointer to the file to MD5 hash. The file pointer will be reset to the beginning of the file before the method returns.
Return type:tuple
Returns:the hex digest version of the MD5 hash
convert_from_sshrsa_to_pkcs8(pubkey)

Convert a ssh public key to openssl format Equivalent to the ssh-keygen’s -m option

crl_path(project_id=None)
decrypt_text(project_id, text)
ensure_ca_filesystem()

Ensure the CA filesystem exists.

fetch_ca(project_id=None)
fetch_crl(project_id)

Get crl file for project.

generate_fingerprint(public_key)
generate_key_pair(bits=None)
generate_vpn_files(project_id)
generate_x509_cert(user_id, project_id, bits=1024)

Generate and sign a cert for user in project.

key_path(project_id=None)
revoke_cert(project_id, file_name)

Revoke a cert by file name.

revoke_certs_by_project(project_id)

Revoke all project certs.

revoke_certs_by_user(user_id)

Revoke all user certs.

revoke_certs_by_user_and_project(user_id, project_id)

Revoke certs for user in project.

sign_csr(csr_text, project_id=None)
ssh_encrypt_text(ssh_public_key, text)

Encrypt text with an ssh public key.

Previous topic

The nova.context Module

Next topic

The nova.db.api Module

This Page