X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilcapputil.h;h=827c2ff90a666a074da555cb4c2e1b70b2a8ced0;hb=fde8aa8c7b1952d14fe9275ae36836fe995ea943;hp=f054fa4d2b90be617d44a78be7c32186b3090eec;hpb=4c0b87583da634b12c5745baa19c7ec42e30376c;p=silc.git diff --git a/lib/silcutil/silcapputil.h b/lib/silcutil/silcapputil.h index f054fa4d..827c2ff9 100644 --- a/lib/silcutil/silcapputil.h +++ b/lib/silcutil/silcapputil.h @@ -44,6 +44,7 @@ * const char *pub_filename, * const char *prv_filename, * const char *pub_identifier, + * const char *passphrase, * SilcPKCS *return_pkcs, * SilcPublicKey *return_public_key, * SilcPrivateKey *return_private_key, @@ -60,6 +61,10 @@ * "UN=foobar, HN=hostname"), or if NULL the routine generates it * automatically. * + * The `passphrase' is the passphrase that is used to encrypt the + * private key file. It is recommended that you would protect your + * private key file with a passphrase. + * * The routine returns FALSE if error occurs during key generation. * Function returns TRUE when success and returns the created SilcPKCS * object, which can be used to perform public key cryptography into @@ -84,6 +89,7 @@ bool silc_create_key_pair(const char *pkcs_name, const char *pub_filename, const char *prv_filename, const char *pub_identifier, + const char *passphrase, SilcPKCS *return_pkcs, SilcPublicKey *return_public_key, SilcPrivateKey *return_private_key, @@ -96,6 +102,7 @@ bool silc_create_key_pair(const char *pkcs_name, * bool silc_load_key_pair(const char *pub_filename, * const char *prv_filename, * SilcPKCS *return_pkcs, + * const char *passphrase, * SilcPublicKey *return_public_key, * SilcPrivateKey *return_private_key); * @@ -107,11 +114,13 @@ bool silc_create_key_pair(const char *pkcs_name, * public key into `return_public_key' pointer, private key into * `return_private_key' pointer and the SilcPKCS object to the * `return_pkcs'. The SilcPKCS can be used to perform public key - * cryptographic operations. + * cryptographic operations. The `passphrase' is the passphrase + * which will be used to decrypt the private key file. * ***/ bool silc_load_key_pair(const char *pub_filename, const char *prv_filename, + const char *passphrase, SilcPKCS *return_pkcs, SilcPublicKey *return_public_key, SilcPrivateKey *return_private_key);