[svn] ksba - r258 - in trunk: . doc gl src
svn author wk
cvs at cvs.gnupg.org
Wed Nov 29 20:17:02 CET 2006
Author: wk
Date: 2006-11-29 20:17:00 +0100 (Wed, 29 Nov 2006)
New Revision: 258
Added:
trunk/gl/dummyobj.c
Removed:
trunk/debian/
Modified:
trunk/ChangeLog
trunk/Makefile.am
trunk/THANKS
trunk/TODO
trunk/autogen.sh
trunk/configure.ac
trunk/doc/ChangeLog
trunk/doc/Makefile.am
trunk/doc/ksba.texi
trunk/gl/Makefile.am
trunk/src/ChangeLog
trunk/src/cert.c
Log:
Removed Debian stuff.
A few fixes.
Add a dummyobj to help with broken ar(1) on OS X
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/ChangeLog 2006-11-29 19:17:00 UTC (rev 258)
@@ -1,3 +1,15 @@
+2006-11-29 Werner Koch <wk at g10code.com>
+
+ * gl/dummyobj.c: New.
+
+2006-11-15 Werner Koch <wk at g10code.com>
+
+ * autogen.sh: Add convenience option --build-amd64.
+
+2006-10-20 Werner Koch <wk at g10code.com>
+
+ * Makefile.am (stowinstall): New convenience target.
+
2006-08-31 Werner Koch <wk at g10code.com>
Released 1.0.0.
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/Makefile.am 2006-11-29 19:17:00 UTC (rev 258)
@@ -38,5 +38,7 @@
dist-hook:
@set -e; echo "$(VERSION)" > $(distdir)/VERSION
+stowinstall:
+ $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libksba
Modified: trunk/THANKS
===================================================================
--- trunk/THANKS 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/THANKS 2006-11-29 19:17:00 UTC (rev 258)
@@ -2,6 +2,7 @@
Bernhard Herzog bh at intevation.de
+Brad Hards bradh at frogmouth.net
Daiki Ueno ueno at unixuser.org
Stéphane Corthésy stephane at sente.ch
Thomas Koester tkoester at intevation.de
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/TODO 2006-11-29 19:17:00 UTC (rev 258)
@@ -51,3 +51,16 @@
** The ASN.1 parse tree is not released in all places
** Some memory is not released in case of errors.
+* src/crl.c
+** certificateIssuer not supported
+ To support this we need to have an extended ksba_crl_get_item
+ function to either return the issuer or at least set a flag to
+ indicate that such an extension is available. If this new API is
+ used we will move detection of the critical certificateIssuer
+ extension into the old ksba_crl_get_item and bail out only there.
+ If the new version of that function is used there won't be a need to
+ bail out. Example of a CRL using this extension:
+ http://pks.telesec.de/telesec/servlet/download_cr (2006-09-04).
+
+** Allow fetching of all entry extensions.
+
Modified: trunk/autogen.sh
===================================================================
--- trunk/autogen.sh 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/autogen.sh 2006-11-29 19:17:00 UTC (rev 258)
@@ -84,8 +84,55 @@
# ***** end W32 build script *******
+# ***** AMD64 cross build script *******
+# Used to cross-compile for AMD64 (for testing)
+if test "$1" = "--build-amd64"; then
+ tmp=`dirname $0`
+ tsdir=`cd "$tmp"; pwd`
+ shift
+ if [ ! -f $tsdir/config.guess ]; then
+ echo "$tsdir/config.guess not found" >&2
+ exit 1
+ fi
+ build=`$tsdir/config.guess`
+ [ -z "$amd64root" ] && amd64root="$HOME/amd64root"
+ echo "Using $amd64root as standard install directory" >&2
+
+ # Locate the cross compiler
+ crossbindir=
+ for host in x86_64-linux-gnu amd64-linux-gnu; do
+ if ${host}-gcc --version >/dev/null 2>&1 ; then
+ crossbindir=/usr/${host}/bin
+ conf_CC="CC=${host}-gcc"
+ break;
+ fi
+ done
+ if [ -z "$crossbindir" ]; then
+ echo "Cross compiler kit not installed" >&2
+ echo "Stop." >&2
+ exit 1
+ fi
+
+ if [ -f "$tsdir/config.log" ]; then
+ if ! head $tsdir/config.log | grep "$host" >/dev/null; then
+ echo "Please run a 'make distclean' first" >&2
+ exit 1
+ fi
+ fi
+ $tsdir/configure --enable-maintainer-mode --prefix=${amd64root} \
+ --host=${host} --build=${build} \
+ --with-gpg-error-prefix=${amd64root}
+
+ rc=$?
+ exit $rc
+fi
+# ***** end AMD64 cross build script *******
+
+
+
+
# Grep the required versions from configure.ac
autoconf_vers=`sed -n '/^AC_PREREQ(/ {
s/^.*(\(.*\))/\1/p
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/configure.ac 2006-11-29 19:17:00 UTC (rev 258)
@@ -29,7 +29,7 @@
m4_define([my_version], [1.0.1])
m4_define([my_issvn], [yes])
-m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
+m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
|| echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
AC_INIT([libksba], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
[gpa-dev at gnupg.org])
Modified: trunk/doc/ChangeLog
===================================================================
--- trunk/doc/ChangeLog 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/doc/ChangeLog 2006-11-29 19:17:00 UTC (rev 258)
@@ -1,3 +1,9 @@
+2006-11-03 Werner Koch <wk at g10code.com>
+
+ * ksba.texi (ksba_cert_get_key_usage): Add list of attributes.
+ Provided by Brad Hards.
+ (ksba_cert_get_key_ext_usage): New.
+
2006-07-03 Werner Koch <wk at g10code.com>
* ksba.texi (DNs): New section
Modified: trunk/doc/Makefile.am
===================================================================
--- trunk/doc/Makefile.am 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/doc/Makefile.am 2006-11-29 19:17:00 UTC (rev 258)
@@ -25,3 +25,12 @@
info_TEXINFOS = ksba.texi
ksba_TEXINFOS = gpl.texi
+online: ksba.html ksba.pdf
+ set -e; \
+ echo "Uploading current manuals to www.gnupg.org ..."; \
+ user=werner ; \
+ (cd ksba.html && rsync -vr --exclude='.svn' . \
+ $${user}@cvs.gnupg.org:webspace/manuals/ksba/ ); \
+ rsync -v ksba.pdf $${user}@cvs.gnupg.org:webspace/manuals/
+
+
Modified: trunk/doc/ksba.texi
===================================================================
--- trunk/doc/ksba.texi 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/doc/ksba.texi 2006-11-29 19:17:00 UTC (rev 258)
@@ -568,8 +568,41 @@
@deftypefun gpg_error_t ksba_cert_get_key_usage (@w{ksba_cert_t @var{cert}, unsigned int *@var{r_flags}})
Get the key usage flags. The function returns @code{GPG_ERR_NO_DATA} if no
-key usage is specified.
+key usage is specified. The usage flags are as shown in RFC3280, section
+4.2.1.3. The key usage flags are represented by a bitmask, and you can
+test each bit using symbolic constants, which tells you if that usage
+is set on the certificate. The constants are
+
+ at table @code
+ at item KSBA_KEYUSAGE_DIGITAL_SIGNATURE
+Usable for digitalSignature.
+ at item KSBA_KEYUSAGE_NON_REPUDIATION
+Usable for nonRepudiation.
+ at item KSBA_KEYUSAGE_KEY_ENCIPHERMENT
+Usable for keyEncipherment.
+ at item KSBA_KEYUSAGE_DATA_ENCIPHERMENT
+Usable for dataEncipherment.
+ at item KSBA_KEYUSAGE_KEY_AGREEMENT
+Usable for for keyAgreement.
+ at item KSBA_KEYUSAGE_KEY_CERT_SIGN
+Usable for keyCertSign.
+ at item KSBA_KEYUSAGE_CRL_SIGN
+Usable for cRLSign.
+ at item KSBA_KEYUSAGE_ENCIPHER_ONLY
+Usable for encipherOnly.
+ at item KSBA_KEYUSAGE_DECIPHER_ONLY
+Usable for decipherOnly.
+ at end table
+
+These are the basic constraints on usage of a certificate. If you need
+to get additional constraints, see @code{ksba_cert_get_ext_key_usages}.
@end deftypefun
+
+ at deftypefun gpg_error_t ksba_cert_get_ext_key_usages (@w{ksba_cert_t @var{cert}, char **@var{result}})
+
+Return a string containing the extended usages for the certificate,
+delimited by linefeeds.
+ at end deftypefun
@deftypefun gpg_error_t ksba_cert_get_cert_policies (@w{ksba_cert_t @var{cert}, char **@var{r_policies}})
Modified: trunk/gl/Makefile.am
===================================================================
--- trunk/gl/Makefile.am 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/gl/Makefile.am 2006-11-29 19:17:00 UTC (rev 258)
@@ -15,8 +15,8 @@
noinst_LTLIBRARIES = libgnu.la
-libgnu_la_SOURCES =
-libgnu_la_LIBADD = @LTLIBOBJS@
+libgnu_la_SOURCES = dummyobj.c
+libgnu_la_LIBADD = @LTLIBOBJS@
EXTRA_DIST =
BUILT_SOURCES =
SUFFIXES =
Added: trunk/gl/dummyobj.c
===================================================================
--- trunk/gl/dummyobj.c 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/gl/dummyobj.c 2006-11-29 19:17:00 UTC (rev 258)
@@ -0,0 +1,9 @@
+/* dummyobj.c -- Dummy to help libtool with a broken ar(1) */
+
+int
+_ksba_dummyobj_for_broken_ar (int foo)
+{
+ return foo;
+}
+
+
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/src/ChangeLog 2006-11-29 19:17:00 UTC (rev 258)
@@ -1,3 +1,17 @@
+2006-11-29 Werner Koch <wk at g10code.com>
+
+ * ocsp.c (parse_single_response): Fixed skipping of the NULL.
+
+ * cert.c (ksba_cert_get_image): Cast an arg for printf.
+
+2006-10-18 Werner Koch <wk at g10code.com>
+
+ * cert.c (ksba_cert_get_key_usage): Map GPG_ERR_NO_VALUE to
+ GPG_ERR_NO_DATA. This is required in case no extensions at all
+ are available.
+ (ksba_cert_get_cert_policies, ksba_cert_get_ext_key_usages)
+ (ksba_cert_get_auth_key_id, get_simple_octet_string_ext): Ditto.
+
2006-08-31 Werner Koch <wk at g10code.com>
* ocsp.h (struct ocsp_extension_s): New.
Modified: trunk/src/cert.c
===================================================================
--- trunk/src/cert.c 2006-08-31 16:03:56 UTC (rev 257)
+++ trunk/src/cert.c 2006-11-29 19:17:00 UTC (rev 258)
@@ -1127,7 +1127,8 @@
if (!strcmp (oid, oidstr_keyUsage))
break;
}
- if (gpg_err_code (err) == GPG_ERR_EOF)
+ if (gpg_err_code (err) == GPG_ERR_EOF
+ || gpg_err_code (err) == GPG_ERR_NO_VALUE)
return gpg_error (GPG_ERR_NO_DATA); /* no key usage */
if (err)
return err;
@@ -1355,7 +1356,7 @@
if (gpg_err_code (err) == GPG_ERR_EOF)
err = 0;
- if (!*r_policies)
+ if (!*r_policies || gpg_err_code (err) == GPG_ERR_NO_VALUE)
err = gpg_error (GPG_ERR_NO_DATA);
leave:
@@ -1446,7 +1447,7 @@
if (gpg_err_code (err) == GPG_ERR_EOF)
err = 0;
- if (!*result)
+ if (!*result || gpg_err_code (err) == GPG_ERR_NO_VALUE)
err = gpg_error (GPG_ERR_NO_DATA);
leave:
@@ -1750,7 +1751,8 @@
if (!strcmp (oid, oidstr_authorityKeyIdentifier))
break;
}
- if (gpg_err_code (err) == GPG_ERR_EOF)
+ if (gpg_err_code (err) == GPG_ERR_EOF
+ || gpg_err_code (err) == GPG_ERR_NO_VALUE)
return gpg_error (GPG_ERR_NO_DATA); /* not available */
if (err)
return err;
@@ -1893,7 +1895,8 @@
}
if (err)
{
- if (gpg_err_code (err) == GPG_ERR_EOF)
+ if (gpg_err_code (err) == GPG_ERR_EOF
+ || gpg_err_code (err) == GPG_ERR_NO_VALUE)
return gpg_error (GPG_ERR_NO_DATA);
return err;
}
More information about the Gnupg-commits
mailing list