def verify(file_path): """Verify a signed package""" if _conda_43(): raise ValueError( "Signing is not supported with Conda v4.3 and above. Aborting.") from .sign import verify return verify(file_path)
def sign(file_path, key_name_or_path=None): """Create a signature file for accompanying a package""" if _conda_43(): raise ValueError( "Signing is not supported with Conda v4.3 and above. Aborting.") from .sign import sign_and_write return sign_and_write(file_path, key_name_or_path)
def import_sign_key(private_key_path, new_name=None): """ private_key_path: specify a private key to be imported. The public key is generated automatically. Specify ```new_name``` also to rename the private key in the copied location. """ if _conda_43(): raise ValueError("Signing is not supported with Conda v4.3 and above. Aborting.") from .sign import import_key return import_key(private_key_path, new_name=new_name)
def keygen(name="conda_build_signing", size=2048): """Create a private/public key pair for package verification purposes name: string name of key to be generated. size: length of the RSA key, in bits. Should be power of 2. """ if _conda_43(): raise ValueError("Signing is not supported with Conda v4.3 and above. Aborting.") from .sign import keygen return keygen(name, size)
def sign(file_path, key_name_or_path=None): if _conda_43(): raise ValueError( "Signing is not supported with Conda v4.3 and above. Aborting.") from .sign import sign_and_write return sign_and_write(file_path, key_name_or_path)