summaryrefslogtreecommitdiff
path: root/lib/includes/gnutls
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-12-11 18:58:27 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-12-11 18:58:27 +0100
commitb4566f433f23d82ed36461cf7eb45cde839d8296 (patch)
tree52dca840470f3f41bf37f2fb757c66147f8907fb /lib/includes/gnutls
parent40a545318bced43171e062949b01988b6cda8e18 (diff)
downloadgnutls-b4566f433f23d82ed36461cf7eb45cde839d8296.tar.gz
Introduced gnutls_*_privkey_sign_hash2() that is a high level function to produce signatures.
Diffstat (limited to 'lib/includes/gnutls')
-rw-r--r--lib/includes/gnutls/abstract.h10
-rw-r--r--lib/includes/gnutls/compat.h9
-rw-r--r--lib/includes/gnutls/openpgp.h12
-rw-r--r--lib/includes/gnutls/x509.h10
4 files changed, 30 insertions, 11 deletions
diff --git a/lib/includes/gnutls/abstract.h b/lib/includes/gnutls/abstract.h
index f80d136359..2e68632b23 100644
--- a/lib/includes/gnutls/abstract.h
+++ b/lib/includes/gnutls/abstract.h
@@ -104,9 +104,13 @@ int gnutls_privkey_sign_data (gnutls_privkey_t signer,
unsigned int flags,
const gnutls_datum_t * data,
gnutls_datum_t * signature);
-int gnutls_privkey_sign_hash (gnutls_privkey_t key,
- const gnutls_datum_t * hash,
- gnutls_datum_t * signature);
+
+int
+gnutls_privkey_sign_hash2 (gnutls_privkey_t signer,
+ gnutls_digest_algorithm_t hash_algo,
+ unsigned int flags,
+ const gnutls_datum_t * hash_data,
+ gnutls_datum_t * signature);
int gnutls_privkey_decrypt_data (gnutls_privkey_t signer,
unsigned int flags,
diff --git a/lib/includes/gnutls/compat.h b/lib/includes/gnutls/compat.h
index a31f067485..aaee9d8f4e 100644
--- a/lib/includes/gnutls/compat.h
+++ b/lib/includes/gnutls/compat.h
@@ -223,9 +223,10 @@ gnutls_sign_callback_get (gnutls_session_t session, void **userdata);
gnutls_datum_t * signature)
_GNUTLS_GCC_ATTR_DEPRECATED;
- int gnutls_openpgp_privkey_sign_hash (gnutls_openpgp_privkey_t key,
- const gnutls_datum_t * hash,
- gnutls_datum_t * signature)
- _GNUTLS_GCC_ATTR_DEPRECATED;
+ int gnutls_x509_crt_verify_hash (gnutls_x509_crt_t crt,
+ unsigned int flags,
+ const gnutls_datum_t * hash,
+ const gnutls_datum_t * signature)
+ _GNUTLS_GCC_ATTR_DEPRECATED;
#endif /* _GNUTLS_COMPAT_H */
diff --git a/lib/includes/gnutls/openpgp.h b/lib/includes/gnutls/openpgp.h
index 4babbcc652..d6961458c1 100644
--- a/lib/includes/gnutls/openpgp.h
+++ b/lib/includes/gnutls/openpgp.h
@@ -169,6 +169,18 @@ extern "C"
const char *password,
unsigned int flags);
+ int gnutls_openpgp_privkey_sign_hash2 (gnutls_openpgp_privkey_t signer,
+ gnutls_digest_algorithm_t hash_algo,
+ unsigned int flags,
+ const gnutls_datum_t * hash_data,
+ gnutls_datum_t * signature);
+
+ int gnutls_openpgp_privkey_sign_data2 (gnutls_openpgp_privkey_t signer,
+ gnutls_digest_algorithm_t hash,
+ unsigned int flags,
+ const gnutls_datum_t * data,
+ gnutls_datum_t * signature);
+
int gnutls_openpgp_privkey_decrypt_data (gnutls_openpgp_privkey_t key,
unsigned int flags,
const gnutls_datum_t * ciphertext,
diff --git a/lib/includes/gnutls/x509.h b/lib/includes/gnutls/x509.h
index 80bb435999..21923a3ba4 100644
--- a/lib/includes/gnutls/x509.h
+++ b/lib/includes/gnutls/x509.h
@@ -729,10 +729,12 @@ extern "C"
unsigned int flags,
const gnutls_datum_t * data,
const gnutls_datum_t * signature);
- int gnutls_x509_crt_verify_hash (gnutls_x509_crt_t crt,
- unsigned int flags,
- const gnutls_datum_t * hash,
- const gnutls_datum_t * signature);
+
+ int gnutls_x509_privkey_sign_hash2 (gnutls_x509_privkey_t signer,
+ gnutls_digest_algorithm_t hash_algo,
+ unsigned int flags,
+ const gnutls_datum_t * hash_data,
+ gnutls_datum_t * signature);
int gnutls_x509_crt_get_verify_algorithm (gnutls_x509_crt_t crt,
const gnutls_datum_t * signature,