Ian Peters <itp@ximian.com>
Arne Thomassen <arne@arne-thomassen.de>
Casey Marshall <rsdio@metastatic.org>
+Dimitri Papadopoulos-Orfanos <papadopo@shfj.cea.fr>
size_t session_data_size)
{
int ret;
- gnutls_datum psession = { (opaque*)session_data, session_data_size };
+ gnutls_datum psession;
+
+ psession.data = (opaque*)session_data;
+ psession.size = session_data_size;
if (session_data==NULL || session_data_size == 0) {
gnutls_assert();
gnutls_x509_crt_fmt format, unsigned int flags)
{
int result = 0, need_free = 0;
- gnutls_datum _data = { data->data, data->size };
+ gnutls_datum _data;
+
+ _data.data = data->data;
+ _data.size = data->size;
if (pkcs12==NULL) {
gnutls_assert();
if (!ssl)
return NULL;
- err = gnutls_certificate_allocate_cred(&ssl->gnutls_cred);
+ err = gnutls_certificate_allocate_credentials(&ssl->gnutls_cred);
if (err < 0)
{
last_error = err;
gnutls_kx_set_priority (ssl->gnutls_state, ctx->method->kx_priority);
gnutls_mac_set_priority (ssl->gnutls_state, ctx->method->mac_priority);
- gnutls_cred_set (ssl->gnutls_state, GNUTLS_CRD_CERTIFICATE, ssl->gnutls_cred);
+ gnutls_credentials_set (ssl->gnutls_state, GNUTLS_CRD_CERTIFICATE, ssl->gnutls_cred);
if (ctx->certfile)
gnutls_certificate_set_x509_trust_file(ssl->gnutls_cred, ctx->certfile,
ctx->certfile_type);
void SSL_free(SSL *ssl)
{
- gnutls_certificate_free_cred(ssl->gnutls_cred);
+ gnutls_certificate_free_credentials(ssl->gnutls_cred);
gnutls_deinit(ssl->gnutls_state);
free(ssl);
}
# include <io.h>
#endif
+void print_license(void);
+void certtool_version(void);
+
#}
helpnode "Certtool help\nUsage: certtool [options]"
#include <common.h>
-void print_license(void);
+void print_serv_license(void);
void serv_version(void);
#include <stdio.h>
{
int tmp;
char a;
- if(sscanf(arg, "%d%c", &tmp, &a) != 1)
+ if(sscanf(arg, "%d%c", &tmp, &a) < 1)
{
printf("Option %s: '%s' isn't an integer\n", gaa_current_option, arg);
GAAERROR(-1);
{
float tmp;
char a;
- if(sscanf(arg, "%f%c", &tmp, &a) != 1)
+ if(sscanf(arg, "%f%c", &tmp, &a) < 1)
{
printf("Option %s: '%s' isn't a float number\n", gaa_current_option, arg);
GAAERROR(-1);
case GAAOPTID_copyright:
OK = 0;
#line 97 "serv.gaa"
-{ print_license(); exit(0); ;};
+{ print_serv_license(); exit(0); ;};
return GAA_OK;
break;
}
+void print_serv_license(void)
+{
+ fprintf(stdout,
+ "\nCopyright (C) 2001-2003 Paul Sheer, Nikos Mavroyanopoulos\n"
+ "This program is free software; you can redistribute it and/or modify \n"
+ "it under the terms of the GNU General Public License as published by \n"
+ "the Free Software Foundation; either version 2 of the License, or \n"
+ "(at your option) any later version. \n" "\n"
+ "This program is distributed in the hope that it will be useful, \n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of \n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \n"
+ "GNU General Public License for more details. \n" "\n"
+ "You should have received a copy of the GNU General Public License \n"
+ "along with this program; if not, write to the Free Software \n"
+ "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n");
+}
+
#ifdef HAVE_LIBOPENCDK
static int
#include <common.h>
-void print_license(void);
+void print_serv_license(void);
void serv_version(void);
#}
option (h, help) { gaa_help(); exit(0); } "prints this help"
option (v, version) { serv_version(); exit(0); } "prints the program's version number"
-option ( copyright) { print_license(); exit(0); } "prints the program's license"
+option ( copyright) { print_serv_license(); exit(0); } "prints the program's license"
init { $generate=0; $port=5556; $http=0; $ciphers=NULL;