summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-05-03 22:29:21 +0200
committerSimon Josefsson <simon@josefsson.org>2009-05-03 22:29:21 +0200
commit2d2b4693689d5f3b858e2d983c428f2e4a24d364 (patch)
treefe1557c51142e9ab149a44a2cca32ec24d7d2f64
parent6ab3a57a4af0a0e64f4afe2794682128d108ff34 (diff)
downloadgnutls-2d2b4693689d5f3b858e2d983c428f2e4a24d364.tar.gz
Fix syntax-check warnings.
-rw-r--r--.x-sc_GPL_version4
-rw-r--r--.x-sc_avoid_if_before_free3
-rw-r--r--.x-sc_cast_of_alloca_return_value3
-rw-r--r--.x-sc_cast_of_argument_to_free1
-rw-r--r--.x-sc_file_system2
-rw-r--r--.x-sc_m4_quote_check1
-rw-r--r--.x-sc_makefile_check2
-rw-r--r--.x-sc_program_name5
-rw-r--r--.x-sc_prohibit_HAVE_MBRTOWC2
-rw-r--r--.x-sc_prohibit_S_IS_definition2
-rw-r--r--.x-sc_space_tab9
-rw-r--r--.x-sc_the_the3
-rw-r--r--.x-sc_two_space_separator_in_usage3
-rw-r--r--.x-sc_useless_cpp_parens4
-rw-r--r--NEWS2
-rw-r--r--cfg.mk5
-rw-r--r--doc/examples/ex-serv-export.c5
-rw-r--r--doc/gnutls.texi3
-rw-r--r--gtk-doc.make6
-rw-r--r--lib/gnutls.asn46
-rw-r--r--lib/m4/hooks.m460
-rw-r--r--lib/openpgp/Makefile.am4
-rw-r--r--lib/pkix.asn61
-rw-r--r--lib/x509/Makefile.am2
-rw-r--r--libextra/m4/hooks.m49
-rw-r--r--m4/valgrind.m48
-rw-r--r--src/Makefile.am2
-rw-r--r--src/certtool-cfg.c3
-rw-r--r--src/certtool.c11
-rw-r--r--src/crypt.c5
-rw-r--r--src/psk.c5
-rw-r--r--src/serv.c6
-rw-r--r--src/tls_test.c2
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/resume.c5
-rw-r--r--tests/x509dn.c7
36 files changed, 175 insertions, 128 deletions
diff --git a/.x-sc_GPL_version b/.x-sc_GPL_version
new file mode 100644
index 0000000000..fce02216d0
--- /dev/null
+++ b/.x-sc_GPL_version
@@ -0,0 +1,4 @@
+^doc/lgpl-2.1.texi
+^doc/protocol/
+^lib/
+^m4/pkg.m4
diff --git a/.x-sc_avoid_if_before_free b/.x-sc_avoid_if_before_free
new file mode 100644
index 0000000000..dbc2f0dfbf
--- /dev/null
+++ b/.x-sc_avoid_if_before_free
@@ -0,0 +1,3 @@
+^gl/
+^lib/gl/
+^src/cfg/
diff --git a/.x-sc_cast_of_alloca_return_value b/.x-sc_cast_of_alloca_return_value
new file mode 100644
index 0000000000..1edcd73ec1
--- /dev/null
+++ b/.x-sc_cast_of_alloca_return_value
@@ -0,0 +1,3 @@
+^gl/
+^guile/
+^lib/gl/
diff --git a/.x-sc_cast_of_argument_to_free b/.x-sc_cast_of_argument_to_free
new file mode 100644
index 0000000000..8dcd9685c0
--- /dev/null
+++ b/.x-sc_cast_of_argument_to_free
@@ -0,0 +1 @@
+^src/cfg/
diff --git a/.x-sc_file_system b/.x-sc_file_system
new file mode 100644
index 0000000000..075cd88a6e
--- /dev/null
+++ b/.x-sc_file_system
@@ -0,0 +1,2 @@
+^doc/doxygen/
+^doc/protocol/
diff --git a/.x-sc_m4_quote_check b/.x-sc_m4_quote_check
new file mode 100644
index 0000000000..be1faa8775
--- /dev/null
+++ b/.x-sc_m4_quote_check
@@ -0,0 +1 @@
+^lib/gl/m4/intl.m4
diff --git a/.x-sc_makefile_check b/.x-sc_makefile_check
new file mode 100644
index 0000000000..9a2efd1e50
--- /dev/null
+++ b/.x-sc_makefile_check
@@ -0,0 +1,2 @@
+^gl/
+^lib/gl/
diff --git a/.x-sc_program_name b/.x-sc_program_name
new file mode 100644
index 0000000000..64bb52e483
--- /dev/null
+++ b/.x-sc_program_name
@@ -0,0 +1,5 @@
+^doc/
+^gl/
+^lib/gl/
+^src/cfg/
+^tests/
diff --git a/.x-sc_prohibit_HAVE_MBRTOWC b/.x-sc_prohibit_HAVE_MBRTOWC
new file mode 100644
index 0000000000..9a2efd1e50
--- /dev/null
+++ b/.x-sc_prohibit_HAVE_MBRTOWC
@@ -0,0 +1,2 @@
+^gl/
+^lib/gl/
diff --git a/.x-sc_prohibit_S_IS_definition b/.x-sc_prohibit_S_IS_definition
new file mode 100644
index 0000000000..bf7f14e07c
--- /dev/null
+++ b/.x-sc_prohibit_S_IS_definition
@@ -0,0 +1,2 @@
+^gl/sys_stat.in.h
+^lib/gl/sys_stat.in.h
diff --git a/.x-sc_space_tab b/.x-sc_space_tab
new file mode 100644
index 0000000000..8868024ea6
--- /dev/null
+++ b/.x-sc_space_tab
@@ -0,0 +1,9 @@
+*.png
+^ChangeLog
+^doc/protocol/
+^gl/
+^lib/gl/
+^lib/minitasn1/
+^libextra/gl/
+^tests/nist-pkits/
+^tests/x509paths/
diff --git a/.x-sc_the_the b/.x-sc_the_the
new file mode 100644
index 0000000000..47e5e223d3
--- /dev/null
+++ b/.x-sc_the_the
@@ -0,0 +1,3 @@
+^doc/protocol/
+^lib/minitasn1/
+^tests/rsa-md5-collision/mbox
diff --git a/.x-sc_two_space_separator_in_usage b/.x-sc_two_space_separator_in_usage
new file mode 100644
index 0000000000..ec74edbb63
--- /dev/null
+++ b/.x-sc_two_space_separator_in_usage
@@ -0,0 +1,3 @@
+^build-aux/gnupload
+^doc/gnutls.texi
+^tests/sha2/sha2
diff --git a/.x-sc_useless_cpp_parens b/.x-sc_useless_cpp_parens
new file mode 100644
index 0000000000..6f383c1ae5
--- /dev/null
+++ b/.x-sc_useless_cpp_parens
@@ -0,0 +1,4 @@
+^gl/
+^lib/gl/
+^src/cfg/
+^src/.*-gaa.c
diff --git a/NEWS b/NEWS
index 6ddbaa6eea..18040c29e3 100644
--- a/NEWS
+++ b/NEWS
@@ -3131,7 +3131,7 @@ up to date information.
** Fix gnutls-cli-debug regarding resume support detection.
Earlier, if the session-id from the server had a length of 0, it would
-indicate the the server supports resumption, which isn't the case.
+indicate that the server supports resumption, which isn't the case.
Reported by Kataja Kai <kai.kataja@op.fi>.
** Fix building of examples on FreeBSD by including netinet/in.h.
diff --git a/cfg.mk b/cfg.mk
index e1ffa98a51..d74dec3d01 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -29,7 +29,10 @@ endif
PODIR := lib/po
PO_DOMAIN := libgnutls
-local-checks-to-skip = sc_prohibit_strcmp
+local-checks-to-skip = sc_prohibit_strcmp sc_prohibit_atoi_atof \
+ sc_error_message_uppercase sc_prohibit_have_config_h \
+ sc_require_config_h sc_require_config_h_first \
+ sc_trailing_blank sc_unmarked_diagnostics sc_immutable_NEWS
autoreconf:
for f in $(PODIR)/*.po.in; do \
diff --git a/doc/examples/ex-serv-export.c b/doc/examples/ex-serv-export.c
index 12e0588bb2..afea7373e6 100644
--- a/doc/examples/ex-serv-export.c
+++ b/doc/examples/ex-serv-export.c
@@ -1,4 +1,4 @@
-/* Copyright 2007, 2008 Free Software Foundation
+/* Copyright 2007, 2008, 2009 Free Software Foundation
*
* Copying and distribution of this file, with or without modification,
* are permitted in any medium without royalty provided the copyright
@@ -292,8 +292,7 @@ wrap_db_init (void)
static void
wrap_db_deinit (void)
{
- if (cache_db)
- free (cache_db);
+ free (cache_db);
cache_db = NULL;
return;
}
diff --git a/doc/gnutls.texi b/doc/gnutls.texi
index 7c84e809b1..5dd8325c6b 100644
--- a/doc/gnutls.texi
+++ b/doc/gnutls.texi
@@ -1,5 +1,4 @@
\input texinfo @c -*-texinfo-*-
-@comment $Id$
@comment %**start of header
@setfilename gnutls.info
@include version.texi
@@ -18,7 +17,7 @@
This manual is last updated @value{UPDATED} for version
@value{VERSION} of GNU TLS.
-Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+Copyright @copyright{} 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/gtk-doc.make b/gtk-doc.make
index d423389934..7dfee8645f 100644
--- a/gtk-doc.make
+++ b/gtk-doc.make
@@ -23,7 +23,7 @@ GPATH = $(srcdir)
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-EXTRA_DIST = \
+EXTRA_DIST = \
$(content_files) \
$(HTML_IMAGES) \
$(DOC_MAIN_SGML_FILE) \
@@ -33,8 +33,8 @@ EXTRA_DIST = \
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-SCANOBJ_FILES = \
- $(DOC_MODULE).args \
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).interfaces \
$(DOC_MODULE).prerequisites \
diff --git a/lib/gnutls.asn b/lib/gnutls.asn
index 0cb98414d0..f485c27d6d 100644
--- a/lib/gnutls.asn
+++ b/lib/gnutls.asn
@@ -17,27 +17,27 @@ RSAPublicKey ::= SEQUENCE {
-- CRT algorithm.
--
RSAPrivateKey ::= SEQUENCE {
- version Version,
- modulus INTEGER, -- (Usually large) n
- publicExponent INTEGER, -- (Usually small) e
- privateExponent INTEGER, -- (Usually large) d
- prime1 INTEGER, -- (Usually large) p
- prime2 INTEGER, -- (Usually large) q
- exponent1 INTEGER, -- (Usually large) d mod (p-1)
- exponent2 INTEGER, -- (Usually large) d mod (q-1)
- coefficient INTEGER, -- (Usually large) (inverse of q) mod p
- otherPrimeInfos OtherPrimeInfos OPTIONAL
+ version Version,
+ modulus INTEGER, -- (Usually large) n
+ publicExponent INTEGER, -- (Usually small) e
+ privateExponent INTEGER, -- (Usually large) d
+ prime1 INTEGER, -- (Usually large) p
+ prime2 INTEGER, -- (Usually large) q
+ exponent1 INTEGER, -- (Usually large) d mod (p-1)
+ exponent2 INTEGER, -- (Usually large) d mod (q-1)
+ coefficient INTEGER, -- (Usually large) (inverse of q) mod p
+ otherPrimeInfos OtherPrimeInfos OPTIONAL
}
Version ::= INTEGER { two-prime(0), multi(1) }
--- (CONSTRAINED BY { version must be multi if otherPrimeInfos present }) --
+-- (CONSTRAINED BY { version must be multi if otherPrimeInfos present }) --
OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo
OtherPrimeInfo ::= SEQUENCE {
- prime INTEGER, -- ri
- exponent INTEGER, -- di
- coefficient INTEGER -- ti
+ prime INTEGER, -- ri
+ exponent INTEGER, -- di
+ coefficient INTEGER -- ti
}
-- for signature calculation
@@ -74,19 +74,19 @@ DSASignatureValue ::= SEQUENCE {
}
DSAPrivateKey ::= SEQUENCE {
- version INTEGER, -- should be zero
- p INTEGER,
- q INTEGER,
- g INTEGER,
- Y INTEGER, -- public
- priv INTEGER
+ version INTEGER, -- should be zero
+ p INTEGER,
+ q INTEGER,
+ g INTEGER,
+ Y INTEGER, -- public
+ priv INTEGER
}
-- from PKCS#3
DHParameter ::= SEQUENCE {
- prime INTEGER, -- p
- base INTEGER, -- g
- privateValueLength INTEGER OPTIONAL
+ prime INTEGER, -- p
+ base INTEGER, -- g
+ privateValueLength INTEGER OPTIONAL
}
diff --git a/lib/m4/hooks.m4 b/lib/m4/hooks.m4
index 7a191c5a6e..43260cd2e2 100644
--- a/lib/m4/hooks.m4
+++ b/lib/m4/hooks.m4
@@ -51,7 +51,7 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
included_libtasn1=no)
if test "$included_libtasn1" = "no"; then
AC_LIB_HAVE_LINKFLAGS(tasn1,, [#include <libtasn1.h>],
- [asn1_check_version (NULL)])
+ [asn1_check_version (NULL)])
if test "$ac_cv_libtasn1" != yes; then
included_libtasn1=yes
AC_MSG_WARN([[
@@ -84,7 +84,7 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
fi
AC_SUBST(LZO_LIBS)
if test "$use_lzo" = "yes"; then
- AC_DEFINE(USE_LZO, 1, [whether to use the LZO compression])
+ AC_DEFINE([USE_LZO], 1, [whether to use the LZO compression])
if test "$LZO_LIBS" = "-llzo"; then
AC_CHECK_HEADERS(lzo1x.h)
elif test "$LZO_LIBS" = "-llzo2"; then
@@ -101,7 +101,7 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
test_mac(x,y,z);
return 0;
], [
- AC_DEFINE(C99_MACROS, 1, [C99 macros are supported])
+ AC_DEFINE([C99_MACROS], 1, [C99 macros are supported])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
@@ -110,9 +110,9 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
AC_MSG_CHECKING([whether to enable Opaque PRF input support])
AC_ARG_ENABLE(opaque-prf-input,
- AS_HELP_STRING([--enable-opaque-prf-input=DD],
- [enable Opaque PRF input using DD as extension type]),
- ac_opaque_prf_input=$enableval, ac_opaque_prf_input=no)
+ AS_HELP_STRING([--enable-opaque-prf-input=DD],
+ [enable Opaque PRF input using DD as extension type]),
+ ac_opaque_prf_input=$enableval, ac_opaque_prf_input=no)
if test "$ac_opaque_prf_input" != "no"; then
if ! echo $ac_opaque_prf_input | egrep -q '^[[0-9]]+$'; then
ac_opaque_prf_input=no
@@ -124,7 +124,7 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
fi
if test "$ac_opaque_prf_input" != "no"; then
AC_MSG_RESULT([yes (extension value $ac_opaque_prf_input)])
- AC_DEFINE_UNQUOTED(ENABLE_OPRFI, $ac_opaque_prf_input,
+ AC_DEFINE_UNQUOTED([ENABLE_OPRFI], $ac_opaque_prf_input,
[enable Opaque PRF Input])
else
AC_MSG_RESULT(no)
@@ -133,12 +133,12 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
AC_MSG_CHECKING([whether to disable SRP authentication support])
AC_ARG_ENABLE(srp-authentication,
- AS_HELP_STRING([--disable-srp-authentication],
- [disable the SRP authentication support]),
- ac_enable_srp=no)
+ AS_HELP_STRING([--disable-srp-authentication],
+ [disable the SRP authentication support]),
+ ac_enable_srp=no)
if test x$ac_enable_srp != xno; then
AC_MSG_RESULT(no)
- AC_DEFINE(ENABLE_SRP, 1, [enable SRP authentication])
+ AC_DEFINE([ENABLE_SRP], 1, [enable SRP authentication])
else
ac_full=0
AC_MSG_RESULT(yes)
@@ -147,12 +147,12 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
AC_MSG_CHECKING([whether to disable PSK authentication support])
AC_ARG_ENABLE(psk-authentication,
- AS_HELP_STRING([--disable-psk-authentication],
- [disable the PSK authentication support]),
- ac_enable_psk=no)
+ AS_HELP_STRING([--disable-psk-authentication],
+ [disable the PSK authentication support]),
+ ac_enable_psk=no)
if test x$ac_enable_psk != xno; then
AC_MSG_RESULT(no)
- AC_DEFINE(ENABLE_PSK, 1, [enable PSK authentication])
+ AC_DEFINE([ENABLE_PSK], 1, [enable PSK authentication])
else
ac_full=0
AC_MSG_RESULT(yes)
@@ -161,12 +161,12 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
AC_MSG_CHECKING([whether to disable anonymous authentication support])
AC_ARG_ENABLE(anon-authentication,
- AS_HELP_STRING([--disable-anon-authentication],
- [disable the anonymous authentication support]),
- ac_enable_anon=no)
+ AS_HELP_STRING([--disable-anon-authentication],
+ [disable the anonymous authentication support]),
+ ac_enable_anon=no)
if test x$ac_enable_anon != xno; then
AC_MSG_RESULT(no)
- AC_DEFINE(ENABLE_ANON, 1, [enable anonymous authentication])
+ AC_DEFINE([ENABLE_ANON], 1, [enable anonymous authentication])
else
ac_full=0
AC_MSG_RESULT(yes)
@@ -180,36 +180,36 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
AC_MSG_CHECKING([whether to disable Camellia cipher])
if test "$enable_camellia" != "no"; then
AC_MSG_RESULT([no])
- AC_DEFINE(ENABLE_CAMELLIA, 1, [enable camellia block cipher])
+ AC_DEFINE([ENABLE_CAMELLIA], 1, [enable camellia block cipher])
else
AC_MSG_RESULT([yes])
fi
AC_MSG_CHECKING([whether to disable extra PKI stuff])
AC_ARG_ENABLE(extra-pki,
- AS_HELP_STRING([--disable-extra-pki],
- [only enable the basic PKI stuff]),
- enable_pki=$enableval, enable_pki=yes)
+ AS_HELP_STRING([--disable-extra-pki],
+ [only enable the basic PKI stuff]),
+ enable_pki=$enableval, enable_pki=yes)
if test "$enable_pki" != "yes"; then
ac_full=0
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
- AC_DEFINE(ENABLE_PKI, 1, [whether to include all the PKCS/PKI stuff])
+ AC_DEFINE([ENABLE_PKI], 1, [whether to include all the PKCS/PKI stuff])
fi
AM_CONDITIONAL(ENABLE_PKI, test "$enable_pki" = "yes")
ac_enable_openpgp=yes
AC_MSG_CHECKING([whether to disable OpenPGP Certificate authentication support])
AC_ARG_ENABLE(openpgp-authentication,
- AS_HELP_STRING([--disable-openpgp-authentication],
- [disable the OpenPGP authentication support]),
- ac_enable_openpgp=no)
+ AS_HELP_STRING([--disable-openpgp-authentication],
+ [disable the OpenPGP authentication support]),
+ ac_enable_openpgp=no)
if test x$ac_enable_openpgp = xno; then
AC_MSG_RESULT(yes)
ac_full=0
else
- AC_DEFINE(ENABLE_OPENPGP, 1, [use openpgp authentication])
+ AC_DEFINE([ENABLE_OPENPGP], 1, [use openpgp authentication])
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(ENABLE_OPENPGP, test "$ac_enable_openpgp" = "yes")
@@ -221,11 +221,11 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
AC_CHECK_SIZEOF(int)
case $ac_cv_sizeof_void_p in
$ac_cv_sizeof_long)
- AC_DEFINE(GNUTLS_POINTER_TO_INT_CAST, [(long)],
+ AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [(long)],
[Additional cast to bring void* to a type castable to int.])
;;
*)
- AC_DEFINE(GNUTLS_POINTER_TO_INT_CAST, [])
+ AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [])
;;
esac
])
diff --git a/lib/openpgp/Makefile.am b/lib/openpgp/Makefile.am
index 6210a9dc58..1cdfb1bf10 100644
--- a/lib/openpgp/Makefile.am
+++ b/lib/openpgp/Makefile.am
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation
+# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
#
# Author: Nikos Mavrogiannopoulos
#
@@ -24,7 +24,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = \
-I$(srcdir)/../gl \
-I$(builddir)/../gl \
- -I$(srcdir)/../includes \
+ -I$(srcdir)/../includes \
-I$(builddir)/../includes \
-I$(srcdir)/.. \
-I$(srcdir)/../opencdk
diff --git a/lib/pkix.asn b/lib/pkix.asn
index ca6953e77e..833f73d0c6 100644
--- a/lib/pkix.asn
+++ b/lib/pkix.asn
@@ -220,16 +220,16 @@ X520telephoneNumber ::= PrintableString
id-at-facsimileTelephoneNumber AttributeType ::= {id-at 23}
X520facsimileTelephoneNumber ::= PrintableString
-id-at-pseudonym AttributeType ::= {id-at 65}
-X520pseudonym ::= DirectoryString
+id-at-pseudonym AttributeType ::= {id-at 65}
+X520pseudonym ::= DirectoryString
-id-at-name AttributeType ::= {id-at 41}
-X520name ::= DirectoryString
+id-at-name AttributeType ::= {id-at 41}
+X520name ::= DirectoryString
-id-at-streetAddress AttributeType ::= {id-at 9}
-X520streetAddress ::= DirectoryString
+id-at-streetAddress AttributeType ::= {id-at 9}
+X520streetAddress ::= DirectoryString
-id-at-postalAddress AttributeType ::= {id-at 16}
+id-at-postalAddress AttributeType ::= {id-at 16}
X520postalAddress ::= PostalAddress
PostalAddress ::= SEQUENCE OF DirectoryString
@@ -532,35 +532,35 @@ pkcs-5-PBKDF2-params ::= SEQUENCE {
-- PKCS #12 stuff
pkcs-12-PFX ::= SEQUENCE {
- version INTEGER {v3(3)},
- authSafe pkcs-7-ContentInfo,
- macData pkcs-12-MacData OPTIONAL
+ version INTEGER {v3(3)},
+ authSafe pkcs-7-ContentInfo,
+ macData pkcs-12-MacData OPTIONAL
}
pkcs-12-PbeParams ::= SEQUENCE {
- salt OCTET STRING,
- iterations INTEGER
+ salt OCTET STRING,
+ iterations INTEGER
}
pkcs-12-MacData ::= SEQUENCE {
- mac pkcs-7-DigestInfo,
- macSalt OCTET STRING,
- iterations INTEGER DEFAULT 1
+ mac pkcs-7-DigestInfo,
+ macSalt OCTET STRING,
+ iterations INTEGER DEFAULT 1
-- Note: The default is for historical reasons and its use is
-- deprecated. A higher value, like 1024 is recommended.
}
pkcs-12-AuthenticatedSafe ::= SEQUENCE OF pkcs-7-ContentInfo
- -- Data if unencrypted
- -- EncryptedData if password-encrypted
- -- EnvelopedData if public key-encrypted
+ -- Data if unencrypted
+ -- EncryptedData if password-encrypted
+ -- EnvelopedData if public key-encrypted
pkcs-12-SafeContents ::= SEQUENCE OF pkcs-12-SafeBag
pkcs-12-SafeBag ::= SEQUENCE {
- bagId OBJECT IDENTIFIER,
- bagValue [0] EXPLICIT ANY DEFINED BY badId,
- bagAttributes SET OF pkcs-12-PKCS12Attribute OPTIONAL
+ bagId OBJECT IDENTIFIER,
+ bagValue [0] EXPLICIT ANY DEFINED BY badId,
+ bagAttributes SET OF pkcs-12-PKCS12Attribute OPTIONAL
}
-- Bag types
@@ -574,20 +574,19 @@ pkcs-12-PKCS8ShroudedKeyBag ::= pkcs-8-EncryptedPrivateKeyInfo
-- CertBag
pkcs-12-CertBag ::= SEQUENCE {
- certId OBJECT IDENTIFIER,
- certValue [0] EXPLICIT ANY DEFINED BY certId
+ certId OBJECT IDENTIFIER,
+ certValue [0] EXPLICIT ANY DEFINED BY certId
}
-- x509Certificate BAG-TYPE ::= {OCTET STRING IDENTIFIED BY {pkcs-9-certTypes 1}}
-- DER-encoded X.509 certificate stored in OCTET STRING
pkcs-12-CRLBag ::= SEQUENCE {
- crlId OBJECT IDENTIFIER,
- crlValue [0] EXPLICIT ANY DEFINED BY crlId
+ crlId OBJECT IDENTIFIER,
+ crlValue [0] EXPLICIT ANY DEFINED BY crlId
}
--- x509CRL BAG-TYPE ::=
--- {OCTET STRING IDENTIFIED BY {pkcs-9-crlTypes 1}}
+-- x509CRL BAG-TYPE ::= {OCTET STRING IDENTIFIED BY {pkcs-9-crlTypes 1}}
-- DER-encoded X.509 CRL stored in OCTET STRING
pkcs-12-PKCS12Attribute ::= Attribute
@@ -642,12 +641,12 @@ CountryOfResidence ::= PrintableString (SIZE (2))
-- rfc3820
ProxyCertInfo ::= SEQUENCE {
- pCPathLenConstraint INTEGER (0..MAX) OPTIONAL,
- proxyPolicy ProxyPolicy }
+ pCPathLenConstraint INTEGER (0..MAX) OPTIONAL,
+ proxyPolicy ProxyPolicy }
ProxyPolicy ::= SEQUENCE {
- policyLanguage OBJECT IDENTIFIER,
- policy OCTET STRING OPTIONAL }
+ policyLanguage OBJECT IDENTIFIER,
+ policy OCTET STRING OPTIONAL }
-- rfc3920 section 5.1.1
diff --git a/lib/x509/Makefile.am b/lib/x509/Makefile.am
index 510d202683..3f145aae90 100644
--- a/lib/x509/Makefile.am
+++ b/lib/x509/Makefile.am
@@ -22,7 +22,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = \
-I$(srcdir)/../gl \
-I$(builddir)/../gl \
- -I$(srcdir)/../includes \
+ -I$(srcdir)/../includes \
-I$(builddir)/../includes \
-I$(srcdir)/.. \
$(LIBOPENCDK_CFLAGS)
diff --git a/libextra/m4/hooks.m4 b/libextra/m4/hooks.m4
index fdbd82f853..b9ee2dde68 100644
--- a/libextra/m4/hooks.m4
+++ b/libextra/m4/hooks.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
#
# Author: Nikos Mavrogiannopoulos, Simon Josefsson
@@ -24,10 +24,9 @@ AC_DEFUN([LIBGNUTLS_EXTRA_HOOKS],
[
AC_MSG_CHECKING([whether to disable OpenSSL compatibility layer])
AC_ARG_ENABLE(openssl-compatibility,
- AS_HELP_STRING([--disable-openssl-compatibility],
- [disable the OpenSSL compatibility support]),
- enable_openssl=$withval,
- enable_openssl=yes)
+ AS_HELP_STRING([--disable-openssl-compatibility],
+ [disable the OpenSSL compatibility support]),
+ enable_openssl=$withval, enable_openssl=yes)
AC_MSG_RESULT($enable_openssl)
AM_CONDITIONAL(ENABLE_OPENSSL, test "$enable_openssl" = "yes")
])
diff --git a/m4/valgrind.m4 b/m4/valgrind.m4
index 0cd106abeb..5a8006a5c7 100644
--- a/m4/valgrind.m4
+++ b/m4/valgrind.m4
@@ -1,5 +1,5 @@
# valgrind.m4 serial 1
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -20,11 +20,11 @@ AC_DEFUN([sj_VALGRIND],
else
opt_valgrind_tests=no
VALGRIND=
- fi
+ fi
AC_MSG_CHECKING([whether self tests are run under valgrind])
AC_ARG_ENABLE(valgrind-tests,
- AS_HELP_STRING([--enable-valgrind-tests],
- [run self tests under valgrind]),
+ AS_HELP_STRING([--enable-valgrind-tests],
+ [run self tests under valgrind]),
opt_valgrind_tests=$enableval)
AC_MSG_RESULT($opt_valgrind_tests)
])
diff --git a/src/Makefile.am b/src/Makefile.am
index 7138ef19d5..90dea994f1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -94,7 +94,7 @@ noinst_LTLIBRARIES += libcmd-certtool.la
libcmd_certtool_la_CFLAGS =
libcmd_certtool_la_SOURCES = certtool.gaa certtool-gaa.h \
certtool-gaa.c certtool-cfg.h certtool-cfg.c
-libcmd_certtool_la_LIBADD = ../gl/libgnu.la @LTLIBREADLINE@
+libcmd_certtool_la_LIBADD = ../gl/libgnu.la $(LTLIBREADLINE)
libcmd_certtool_la_LIBADD += ../lib/libgnutls.la ../libextra/libgnutls-extra.la
libcmd_certtool_la_LIBADD += ../gl/libgnu.la
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c
index 074a0cc058..920dca94f9 100644
--- a/src/certtool-cfg.c
+++ b/src/certtool-cfg.c
@@ -340,8 +340,7 @@ get_confirmed_pass (bool empty_ok)
if (pass)
printf ("Password missmatch, try again.\n");
- if (copy)
- free (copy);
+ free (copy);
pass = getpass ("Enter password: ");
copy = strdup (pass);
diff --git a/src/certtool.c b/src/certtool.c
index 950c03d6a4..f7342dd955 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -1040,9 +1040,8 @@ certificate_info (void)
GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED);
if (ret == GNUTLS_E_SHORT_MEMORY_BUFFER)
{
- error (0, 0,
- "Too many certificates (%d), will only read the first %d.",
- crt_num, MAX_CRTS);
+ error (0, 0, "too many certificates (%d); "
+ "will only read the first %d", crt_num, MAX_CRTS);
crt_num = MAX_CRTS;
ret = gnutls_x509_crt_list_import (crt, &crt_num, &pem,
info.incert_format, 0);
@@ -1056,8 +1055,8 @@ certificate_info (void)
if (count > 1 && info.outcert_format == GNUTLS_X509_FMT_DER)
{
- error (0, 0, "cannot output multiple certificates in DER format, "
- "using PEM instead.");
+ error (0, 0, "cannot output multiple certificates in DER format; "
+ "using PEM instead");
info.outcert_format = GNUTLS_X509_FMT_PEM;
}
@@ -2167,7 +2166,7 @@ _verify_x509_mem (const void *cert, int cert_size)
fprintf (outfile, "\tIssued by: %s\n", name);
if (strcmp (issuer_name, name) != 0)
- error (EXIT_FAILURE, 0, "the last certificate is not self signed.");
+ error (EXIT_FAILURE, 0, "the last certificate is not self signed");
fprintf (outfile, "\tVerification output: ");
print_verification_res (x509_cert_list[x509_ncerts - 1],
diff --git a/src/crypt.c b/src/crypt.c
index 8c53a01259..e7e872dcae 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Simon Josefsson
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson
* Copyright (C) 2001,2003 Nikos Mavrogiannopoulos
* Copyright (C) 2004 Free Software Foundation
*
@@ -42,6 +42,7 @@
/* Gnulib portability files. */
#include <getpass.h>
#include <minmax.h>
+#include <progname.h>
#include <version-etc.h>
/* This may need some rewrite. A lot of stuff which should be here
@@ -396,6 +397,8 @@ main (int argc, char **argv)
int salt, ret;
struct passwd *pwd;
+ set_program_name (argv[0]);
+
if ((ret = gnutls_global_init ()) < 0)
{
fprintf (stderr, "global_init: %s\n", gnutls_strerror (ret));
diff --git a/src/psk.c b/src/psk.c
index 1ae05d01ff..b0047e08ee 100644
--- a/src/psk.c
+++ b/src/psk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation
*
* This file is part of GNUTLS.
*
@@ -21,6 +21,7 @@
/* Gnulib portability files. */
#include <version-etc.h>
+#include <progname.h>
#ifndef ENABLE_PSK
@@ -74,6 +75,8 @@ main (int argc, char **argv)
gnutls_datum_t dkey;
size_t hex_key_size = sizeof (hex_key);
+ set_program_name (argv[0]);
+
if ((ret = gnutls_global_init ()) < 0)
{
fprintf (stderr, "global_init: %s\n", gnutls_strerror (ret));
diff --git a/src/serv.c b/src/serv.c
index 1ced4becf0..0679dee295 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -140,10 +140,8 @@ static void
listener_free (listener_item * j)
{
- if (j->http_request)
- free (j->http_request);
- if (j->http_response)
- free (j->http_response);
+ free (j->http_request);
+ free (j->http_response);
if (j->fd >= 0)
{
gnutls_bye (j->tls_session, GNUTLS_SHUT_WR);
diff --git a/src/tls_test.c b/src/tls_test.c
index 25a29854cf..dae853c86a 100644
--- a/src/tls_test.c
+++ b/src/tls_test.c
@@ -32,6 +32,7 @@
#include <common.h>
#include <tls_test-gaa.h>
+#include <progname.h>
#include <version-etc.h>
#define ERR(err,s) if (err==-1) {perror(s);return(1);}
@@ -164,6 +165,7 @@ main (int argc, char **argv)
char portname[6];
struct addrinfo hints, *res, *ptr;
+ set_program_name (argv[0]);
gaa_parser (argc, argv);
#ifndef _WIN32
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 58a7f575dc..3615226bb5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -72,7 +72,7 @@ if ENABLE_OPENPGP
ctests += openpgpself
endif
-tlsia_LDADD = ../libextra/libgnutls-extra.la $(LDADD) @LTLIBREADLINE@
+tlsia_LDADD = ../libextra/libgnutls-extra.la $(LDADD) $(LTLIBREADLINE)
endif
if ENABLE_OPRFI
diff --git a/tests/resume.c b/tests/resume.c
index b70bac444b..92803bbbca 100644
--- a/tests/resume.c
+++ b/tests/resume.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -443,8 +443,7 @@ wrap_db_init (void)
static void
wrap_db_deinit (void)
{
- if (cache_db)
- free (cache_db);
+ free (cache_db);
cache_db = NULL;
return;
}
diff --git a/tests/x509dn.c b/tests/x509dn.c
index 27ad6f1cd4..920e83600d 100644
--- a/tests/x509dn.c
+++ b/tests/x509dn.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation
*
* Author: Simon Josefsson
*
@@ -520,14 +520,15 @@ doit (void)
server ();
wait (&status);
-#if defined(WIFEXITED) && defined(WEXITSTATUS)
+#if defined WIFEXITED && defined WEXITSTATUS
if (WIFEXITED (status) && WEXITSTATUS (status))
{
fail ("server: client failed with exit status %d\n",
WEXITSTATUS (status));
}
#endif
-#if defined(WIFSIGNALED) && defined(WTERMSIG)
+
+#if defined WIFSIGNALED && defined WTERMSIG
if (WIFSIGNALED (status))
{
fail ("server: client failed with fatal signal %d\n",