diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-03-12 10:57:56 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2003-03-12 10:57:56 +0000 |
commit | f2b8289f8cc87c07b54714859fee9c6e053717bf (patch) | |
tree | 69a0cdb436b0f4303dd7b93be27073f677d7bd6e /lib/gnutls_cert.h | |
parent | edb61853219e078ae2d478d998a8ed06315c68f5 (diff) | |
download | gnutls-f2b8289f8cc87c07b54714859fee9c6e053717bf.tar.gz |
* Added ability to generate RSA keys.
* Increased the maximum parameter size in order to read some large keys
by some CAs. Patch by Ian Peters <itp@ximian.com>.
* Rolled back some of yesterdays changes. The gnutls_x509_privkey, was
replaced (again) by the gnutls_privkey.
Diffstat (limited to 'lib/gnutls_cert.h')
-rw-r--r-- | lib/gnutls_cert.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/gnutls_cert.h b/lib/gnutls_cert.h index c2a6c9cd03..44ac3ce0af 100644 --- a/lib/gnutls_cert.h +++ b/lib/gnutls_cert.h @@ -51,6 +51,28 @@ typedef struct gnutls_cert { } gnutls_cert; +typedef struct gnutls_privkey_int { + MPI params[MAX_PRIV_PARAMS_SIZE];/* the size of params depends on the public + * key algorithm + */ + /* + * RSA: [0] is modulus + * [1] is public exponent + * [2] is private exponent + * [3] is prime1 (p) + * [4] is prime2 (q) + * [5] is coefficient (u == inverse of p mod q) + * DSA: [0] is p + * [1] is q + * [2] is g + * [3] is y (public key) + * [4] is x (private key) + */ + int params_size; /* holds the number of params */ + + gnutls_pk_algorithm pk_algorithm; +} gnutls_privkey; + struct gnutls_session_int; /* because gnutls_session is not defined when this file is included */ typedef enum ConvFlags { @@ -64,6 +86,8 @@ int _gnutls_x509_cert2gnutls_cert(gnutls_cert * gcert, const gnutls_datum *derCe void _gnutls_free_cert(gnutls_cert* cert); int _gnutls_cert_get_dn(gnutls_cert * cert, gnutls_datum * odn); +void _gnutls_privkey_deinit(gnutls_privkey *key); + int _gnutls_cert_supported_kx( const gnutls_cert* cert, gnutls_kx_algorithm **alg, int *alg_size); #endif |