+2002-03-29 12:12 nmav <nmav@gnutls.org>
+
+ * lib/: gnutls_algorithms.c, gnutls_cipher.c, gnutls_cipher_int.c,
+ gnutls_cipher_int.h, gnutls_compress.c, gnutls_compress_int.c,
+ gnutls_compress_int.h, gnutls_constate.c, gnutls_handshake.c,
+ gnutls_hash_int.c, gnutls_hash_int.h, gnutls_int.h, gnutls_kx.c,
+ gnutls_sig.c, gnutls_srp.c, gnutls_state.c, gnutls_ui.c,
+ x509_sig_check.c:
+
+ Prefixed with underscore several internal functions.
+
+2002-03-29 11:38 nmav <nmav@gnutls.org>
+
+ * lib/: auth_cert.c, auth_dhe.c, auth_rsa.c, gnutls_algorithms.c,
+ gnutls_algorithms.h, gnutls_cert.c, gnutls_cert.h, gnutls_global.c,
+ gnutls_x509.c:
+
+ removed unneeded functions
+
+2002-03-29 11:38 nmav <nmav@gnutls.org>
+
+ * src/: cli-gaa.c, cli-gaa.h, cli.c, cli.gaa:
+
+ added crlf option
+
+2002-03-29 11:16 nmav <nmav@gnutls.org>
+
+ * ChangeLog, doc/TODO, lib/auth_rsa.c, lib/gnutls_int.h,
+ lib/gnutls_pk.c, lib/gnutls_pk.h, lib/gnutls_sig.c, lib/x509_der.c,
+ lib/x509_sig_check.c, src/cli.c, src/serv-gaa.c, src/serv-gaa.h,
+ src/serv.gaa:
+
+ Some cleanups in the certificate authentication. Parameters are
+ passed together with the length, to avoid abuse.
+
2002-03-28 12:46 nmav <nmav@gnutls.org>
* lib/: gnutls_x509.c, x509_b64.c:
fprintf(stderr, "memory error\n");
exit(1);
}
- gnutls_certificate_set_x509_trust_file(xcred, CAFILE, CRLFILE, GNUTLS_X509_FMT_PEM);
+ gnutls_certificate_set_x509_trust_file(xcred, CAFILE, GNUTLS_X509_FMT_PEM);
for (t = 0; t < 2; t++) { /* connect 2 times to the server */
}
/* set's the trusted cas file
*/
- gnutls_certificate_set_x509_trust_file(xcred, CAFILE, CRLFILE, GNUTLS_X509_FMT_PEM);
+ gnutls_certificate_set_x509_trust_file(xcred, CAFILE, GNUTLS_X509_FMT_PEM);
/* connects to server
*/
printf("- Peer's certificate is invalid\n");
if ( status & GNUTLS_CERT_EXPIRED)
printf("- Peer's certificate is expired\n");
- if ( status & GNUTLS_CERT_NOT_TRUSTED)
- printf("- Peer's certificate is not trusted\n");
- else
- printf("- Peer's certificate is trusted\n");
if ( status & GNUTLS_CERT_CORRUPTED)
printf("- Peer's certificate is corrupted.\n");
if ( status & GNUTLS_CERT_REVOKED)
printf("- Peer's certificate is revoked\n");
+
+ if ( status & GNUTLS_CERT_NOT_TRUSTED)
+ printf("- Peer's certificate is not trusted\n");
+ else
+ printf("- Peer's certificate is trusted\n");
}
/* Check if we have been using ephemeral Diffie Hellman.
fprintf(stderr, "memory error\n");
exit(1);
}
- if (gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE, CRLFILE) < 0) {
+ if (gnutls_certificate_set_x509_trust_file(x509_cred, CAFILE,
+ GNUTLS_X509_FMT_PEM) < 0) {
fprintf(stderr, "X509 PARSE ERROR\nDid you have ca.pem?\n");
exit(1);
}
- if (gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE) < 0) {
+ if (gnutls_certificate_set_x509_key_file(x509_cred, CERTFILE, KEYFILE,
+ GNUTLS_X509_FMT_PEM) < 0) {
fprintf(stderr, "X509 PARSE ERROR\nDid you have key.pem and cert.pem?\n");
exit(1);
}
int gnutls_certificate_set_dh_params(GNUTLS_CERTIFICATE_CREDENTIALS res, GNUTLS_DH_PARAMS);
int gnutls_certificate_set_x509_trust_file( GNUTLS_CERTIFICATE_CREDENTIALS res, char* CAFILE,
- char* CRLFILE, GNUTLS_X509_CertificateFmt);
-int gnutls_certificate_set_x509_trust_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const gnutls_datum *CA,
- const gnutls_datum *CRL, GNUTLS_X509_CertificateFmt);
+ GNUTLS_X509_CertificateFmt);
+int gnutls_certificate_set_x509_trust_mem(GNUTLS_CERTIFICATE_CREDENTIALS res,
+ const gnutls_datum *CA, GNUTLS_X509_CertificateFmt);
int gnutls_certificate_set_x509_key_file( GNUTLS_CERTIFICATE_CREDENTIALS res,
char *CERTFILE, char* KEYFILE, GNUTLS_X509_CertificateFmt);
* gnutls_certificate_set_x509_trust_mem - Used to add trusted CAs in a GNUTLS_CERTIFICATE_CREDENTIALS structure
* @res: is an &GNUTLS_CERTIFICATE_CREDENTIALS structure.
* @CA: is a list of trusted CAs or a DER certificate
- * @CRL: is a list of CRLs (ignored for now)
* @type: is DER or PEM
*
* This function adds the trusted CAs in order to verify client
* certificates. This function may be called multiple times.
*
**/
-int gnutls_certificate_set_x509_trust_mem(GNUTLS_CERTIFICATE_CREDENTIALS res, const gnutls_datum *CA,
- const gnutls_datum *CRL, GNUTLS_X509_CertificateFmt type)
+int gnutls_certificate_set_x509_trust_mem(GNUTLS_CERTIFICATE_CREDENTIALS res,
+ const gnutls_datum *CA, GNUTLS_X509_CertificateFmt type)
{
int ret, ret2;
* gnutls_certificate_set_x509_trust_file - Used to add trusted CAs in a GNUTLS_CERTIFICATE_CREDENTIALS structure
* @res: is an &GNUTLS_CERTIFICATE_CREDENTIALS structure.
* @CAFILE: is a file containing the list of trusted CAs (DER or PEM list)
- * @CRLFILE: is a file containing CRLs (ignored for now)
* @type: is PEM or DER
*
* This function sets the trusted CAs in order to verify client
* Returns the number of certificate processed.
*
**/
-int gnutls_certificate_set_x509_trust_file(GNUTLS_CERTIFICATE_CREDENTIALS res, char *CAFILE,
- char *CRLFILE, GNUTLS_X509_CertificateFmt type)
+int gnutls_certificate_set_x509_trust_file(GNUTLS_CERTIFICATE_CREDENTIALS res,
+ char *CAFILE, GNUTLS_X509_CertificateFmt type)
{
int ret, ret2;
if (x509_cafile != NULL) {
ret =
gnutls_certificate_set_x509_trust_file(xcred, x509_cafile,
- x509_crlfile, x509ctype);
+ x509ctype);
if (ret < 0) {
fprintf(stderr, "Error setting the x509 trust file\n");
} else {
if (x509_cafile != NULL) {
if ((ret=gnutls_certificate_set_x509_trust_file
- (cert_cred, x509_cafile, x509_crlfile, x509ctype)) < 0) {
+ (cert_cred, x509_cafile, x509ctype)) < 0) {
fprintf(stderr, "Error reading '%s'\n", x509_cafile);
exit(1);
} else {