X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Fsilcpkcs.h;h=857824f440f37828849041148980137effbf6830;hb=cf7c57c5507866dab44cc92c9ee772cfc80eddbd;hp=dab35b3003e2eeb60ae434e7a2d01afe309a0a51;hpb=26c4ca7fbbc1e3afaa28d561f4b873a06879797e;p=silc.git diff --git a/lib/silccrypt/silcpkcs.h b/lib/silccrypt/silcpkcs.h index dab35b30..857824f4 100644 --- a/lib/silccrypt/silcpkcs.h +++ b/lib/silccrypt/silcpkcs.h @@ -170,6 +170,7 @@ typedef struct { unsigned char *signature, SilcUInt32 signature_size, SilcUInt32 *ret_signature_len, + SilcBool compute_hash, SilcHash hash); SilcBool (*verify)(void *public_key, unsigned char *signature, @@ -278,6 +279,7 @@ struct SilcPKCSObjectStruct { unsigned char *signature, SilcUInt32 signature_size, SilcUInt32 *ret_signature_len, + SilcBool compute_hash, SilcHash hash); SilcBool (*verify)(void *public_key, unsigned char *signature, @@ -687,18 +689,21 @@ SilcBool silc_pkcs_decrypt(SilcPrivateKey private_key, * SilcBool silc_pkcs_sign(SilcPrivateKey private_key, * unsigned char *src, SilcUInt32 src_len, * unsigned char *dst, SilcUInt32 dst_size, - * SilcUInt32 *dst_len, SilcHash hash); + * SilcUInt32 *dst_len, SilcBool compute_hash, + * SilcHash hash); * * DESCRIPTION * * Generates signature with the private key. Returns FALSE on error. - * If `hash' is non-NULL the `src' will be hashed before signing. + * If `compute_hash' is TRUE the `hash' will be used to compute a + * digest over the `src'. The `hash' must always be valid. * ***/ SilcBool silc_pkcs_sign(SilcPrivateKey private_key, unsigned char *src, SilcUInt32 src_len, unsigned char *dst, SilcUInt32 dst_size, - SilcUInt32 *dst_len, SilcHash hash); + SilcUInt32 *dst_len, SilcBool compute_hash, + SilcHash hash); /****f* silccrypt/SilcPKCSAPI/silc_pkcs_verify *