summaryrefslogtreecommitdiff
path: root/lib/crypto-backend.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-11-11 13:20:20 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-11-11 13:27:24 +0100
commit12a28f4fa86e8420bdaeafba0fddfbd028a446ee (patch)
treee0cacf49eb66762e2bf36b17265d70925db8fb4a /lib/crypto-backend.h
parent60004868649f8731603ed2803b1fb1336e5f42b1 (diff)
downloadgnutls-12a28f4fa86e8420bdaeafba0fddfbd028a446ee.tar.gz
Added gnutls_x509_privkey_verify_params() which verifies the parameters of a private key. Added test case for private key generation.
Diffstat (limited to 'lib/crypto-backend.h')
-rw-r--r--lib/crypto-backend.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/crypto-backend.h b/lib/crypto-backend.h
index 389e025c67..ed89deb39d 100644
--- a/lib/crypto-backend.h
+++ b/lib/crypto-backend.h
@@ -255,6 +255,21 @@
#define ECC_Y 7
#define ECC_K 8
+#define DSA_P 0
+#define DSA_Q 1
+#define DSA_G 2
+#define DSA_Y 3
+#define DSA_X 4
+
+#define RSA_MODULUS 0
+#define RSA_PUB 1
+#define RSA_PRIV 2
+#define RSA_PRIME1 3
+#define RSA_PRIME2 4
+#define RSA_COEF 5
+#define RSA_E1 6
+#define RSA_E2 7
+
/**
* gnutls_direction_t:
* @GNUTLS_IMPORT: Import direction.
@@ -286,6 +301,8 @@
int (*verify) (gnutls_pk_algorithm_t, const gnutls_datum_t * data,
const gnutls_datum_t * signature,
const gnutls_pk_params_st * pub);
+ int (*verify_params) (gnutls_pk_algorithm_t,
+ const gnutls_pk_params_st * pub);
int (*generate) (gnutls_pk_algorithm_t, unsigned int nbits,
gnutls_pk_params_st *);
/* this function should convert params to ones suitable