From cvs at cvs.gnupg.org Thu Jun 16 14:21:33 2011 From: cvs at cvs.gnupg.org (by Marcus Brinkmann) Date: Thu, 16 Jun 2011 14:21:33 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.0.1-39-gcdce637 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via cdce63759a343851cc607dbae60b1cde3869ec8e (commit) from 2adbf87bd18c6a7fe78fcd849026871f7a1603d1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cdce63759a343851cc607dbae60b1cde3869ec8e Author: Marcus Brinkmann Date: Thu Jun 16 13:46:17 2011 +0200 Release 2.0.2 diff --git a/ChangeLog b/ChangeLog index 64145a4..a82f8e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-06-16 Marcus Brinkmann + + Release 2.0.2 + + * configure.ac: Set LT version to C2/A2/R0. + 2011-04-20 Werner Koch * Makefile.am (EXTRA_DIST): s/README.SVN/README.GIT/ diff --git a/NEWS b/NEWS index e2b1e0d..ef2480b 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Noteworthy changes in version 2.0.2 +Noteworthy changes in version 2.0.2 (2010-06-16) ------------------------------------------------ * A new flag may now be used to convey comments via assuan_transact. diff --git a/configure.ac b/configure.ac index c371a37..23209a3 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ min_automake_version="1.10" # Set my_issvn to "yes" for non-released code. Remember to run an # "svn up" and "autogen.sh" right before creating a distribution. m4_define([my_version], [2.0.2]) -m4_define([my_issvn], [yes]) +m4_define([my_issvn], [no]) m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \ || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) @@ -42,8 +42,8 @@ AC_INIT([libassuan], # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBASSUAN_LT_CURRENT=1 -LIBASSUAN_LT_AGE=1 +LIBASSUAN_LT_CURRENT=2 +LIBASSUAN_LT_AGE=2 LIBASSUAN_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 ++++++ NEWS | 2 +- configure.ac | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Thu Jun 16 15:10:10 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 16 Jun 2011 15:10:10 +0200 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-67-g37228cf Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 37228cfa05005d56f0683782004edddb964f9192 (commit) from 328ac58962ac9842e1e0c21c9ad12182f0d9bed6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 37228cfa05005d56f0683782004edddb964f9192 Author: Werner Koch Date: Thu Jun 16 14:27:33 2011 +0200 Allow generation of card keys up to 4096 bit. This patch implementes a chunk mode to pass the key parameters from scdaemon to gpg. This allows to pass arbitrary long key paremeters; it is used for keys larger than 3072 bit. Note: the card key generation in gpg is currently broken. The keys are generated but it is not possible to create the self-signature because at that time the gpg-agent does not yet know about the new keys and thus can't divert the sign request to the card. We either need to run the learn command right after calling agent_scd_genkey or implement a way to sign using the currently inserted card. Another option would be to get rid of agent_scd_genkey and implement the feature directly in agent_genkey. diff --git a/NEWS b/NEWS index f37deb2..c2271af 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,9 @@ Noteworthy changes in version 2.1.0beta3 ----------------------------------------------------- - * Fixed regression in GPG'S secret key export function. + * Fixed regression in GPG's secret key export function. + + * Allow generation of card keys up to 4096 bit. Noteworthy changes in version 2.1.0beta2 (2011-03-08) diff --git a/g10/ChangeLog b/g10/ChangeLog index 67b9813..2f107eb 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,11 @@ +2011-06-16 Werner Koch + + * card-util.c (ask_card_keysize): Bump key size limit to 4096. + * call-agent.c (scd_genkey_parm_s): New. + (agent_scd_genkey): Use new struct. + (scd_genkey_cb): Implement chunked mode for KEY-DATA. + (scd_genkey_cb_append_savedbytes): New. + 2011-06-13 Werner Koch * pkglue.c (mpi_from_sexp): Use GCRYMPI_FMT_USG to avoid problems diff --git a/g10/call-agent.c b/g10/call-agent.c index 03ea168..5a10dbd 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -93,6 +93,13 @@ struct cache_nonce_parm_s }; +struct scd_genkey_parm_s +{ + struct agent_card_genkey_s *cgk; + char *savedbytes; /* Malloced space to save key parameter chunks. */ +}; + + static gpg_error_t learn_status_cb (void *opaque, const char *line); @@ -717,14 +724,43 @@ agent_scd_writekey (int keyno, const char *serialno, +static gpg_error_t +scd_genkey_cb_append_savedbytes (struct scd_genkey_parm_s *parm, + const char *line) +{ + gpg_error_t err = 0; + char *p; + + if (!parm->savedbytes) + { + parm->savedbytes = xtrystrdup (line); + if (!parm->savedbytes) + err = gpg_error_from_syserror (); + } + else + { + p = xtrymalloc (strlen (parm->savedbytes) + strlen (line) + 1); + if (!p) + err = gpg_error_from_syserror (); + else + { + strcpy (stpcpy (p, parm->savedbytes), line); + xfree (parm->savedbytes); + parm->savedbytes = p; + } + } + + return err; +} + /* Status callback for the SCD GENKEY command. */ static gpg_error_t scd_genkey_cb (void *opaque, const char *line) { - struct agent_card_genkey_s *parm = opaque; + struct scd_genkey_parm_s *parm = opaque; const char *keyword = line; int keywordlen; - gpg_error_t rc; + gpg_error_t rc = 0; for (keywordlen=0; *line && !spacep (line); line++, keywordlen++) ; @@ -733,7 +769,7 @@ scd_genkey_cb (void *opaque, const char *line) if (keywordlen == 7 && !memcmp (keyword, "KEY-FPR", keywordlen)) { - parm->fprvalid = unhexify_fpr (line, parm->fpr); + parm->cgk->fprvalid = unhexify_fpr (line, parm->cgk->fpr); } else if (keywordlen == 8 && !memcmp (keyword, "KEY-DATA", keywordlen)) { @@ -745,29 +781,47 @@ scd_genkey_cb (void *opaque, const char *line) while (spacep (line)) line++; - rc = gcry_mpi_scan (&a, GCRYMPI_FMT_HEX, line, 0, NULL); - if (rc) - log_error ("error parsing received key data: %s\n", gpg_strerror (rc)); - else if (*name == 'n' && spacep (name+1)) - parm->n = a; - else if (*name == 'e' && spacep (name+1)) - parm->e = a; + if (*name == '-' && spacep (name+1)) + rc = scd_genkey_cb_append_savedbytes (parm, line); else { - log_info ("unknown parameter name in received key data\n"); - gcry_mpi_release (a); + if (parm->savedbytes) + { + rc = scd_genkey_cb_append_savedbytes (parm, line); + if (!rc) + rc = gcry_mpi_scan (&a, GCRYMPI_FMT_HEX, + parm->savedbytes, 0, NULL); + } + else + rc = gcry_mpi_scan (&a, GCRYMPI_FMT_HEX, line, 0, NULL); + if (rc) + log_error ("error parsing received key data: %s\n", + gpg_strerror (rc)); + else if (*name == 'n' && spacep (name+1)) + parm->cgk->n = a; + else if (*name == 'e' && spacep (name+1)) + parm->cgk->e = a; + else + { + log_info ("unknown parameter name in received key data\n"); + gcry_mpi_release (a); + rc = gpg_error (GPG_ERR_INV_PARAMETER); + } + + xfree (parm->savedbytes); + parm->savedbytes = NULL; } } else if (keywordlen == 14 && !memcmp (keyword,"KEY-CREATED-AT", keywordlen)) { - parm->created_at = (u32)strtoul (line, NULL, 10); + parm->cgk->created_at = (u32)strtoul (line, NULL, 10); } else if (keywordlen == 8 && !memcmp (keyword, "PROGRESS", keywordlen)) { write_status_text (STATUS_PROGRESS, line); } - return 0; + return rc; } /* Send a GENKEY command to the SCdaemon. SERIALNO is not used in @@ -781,9 +835,13 @@ agent_scd_genkey (struct agent_card_genkey_s *info, int keyno, int force, int rc; char line[ASSUAN_LINELENGTH]; gnupg_isotime_t tbuf; + struct scd_genkey_parm_s parms; (void)serialno; + memset (&parms, 0, sizeof parms); + parms.cgk = info; + rc = start_agent (NULL, 1); if (rc) return rc; @@ -802,7 +860,9 @@ agent_scd_genkey (struct agent_card_genkey_s *info, int keyno, int force, memset (info, 0, sizeof *info); rc = assuan_transact (agent_ctx, line, NULL, NULL, default_inq_cb, NULL, - scd_genkey_cb, info); + scd_genkey_cb, &parms); + + xfree (parms.savedbytes); status_sc_op_failure (rc); return rc; diff --git a/g10/card-util.c b/g10/card-util.c index 0ffb18d..9c124bb 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -1294,7 +1294,7 @@ static unsigned int ask_card_keysize (int keyno, unsigned int nbits) { unsigned int min_nbits = 1024; - unsigned int max_nbits = 3072; /* GnuPG limit due to Assuan. */ + unsigned int max_nbits = 4096; char *prompt, *answer; unsigned int req_nbits; diff --git a/scd/ChangeLog b/scd/ChangeLog index 0a614c8..9c4d035 100644 --- a/scd/ChangeLog +++ b/scd/ChangeLog @@ -1,3 +1,9 @@ +2011-06-16 Werner Koch + + * app-openpgp.c (send_key_data): Implemented chunked mode. + (change_keyattr): Increase limit to 4096. + (do_decipher): Adjust padding for 4096 bit keys. + 2011-02-23 Werner Koch * apdu.c (apdu_open_reader): Lock in to CCID if used once. diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 6605190..fef17fa 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -756,20 +756,29 @@ static void send_key_data (ctrl_t ctrl, const char *name, const unsigned char *a, size_t alen) { - char *buf; + char *buffer, *buf; + size_t buflen; - buf = bin2hex (a, alen, NULL); - if (!buf) + buffer = buf = bin2hex (a, alen, NULL); + if (!buffer) { log_error ("memory allocation error in send_key_data\n"); return; } + buflen = strlen (buffer); + /* 768 is the hexified size for the modulus of an 3072 bit key. We + use extra chunks to transmit larger data (i.e for 4096 bit). */ + for ( ;buflen > 768; buflen -= 768, buf += 768) + send_status_info (ctrl, "KEY-DATA", + "-", 1, + buf, 768, + NULL, 0); send_status_info (ctrl, "KEY-DATA", name, (size_t)strlen(name), - buf, (size_t)strlen (buf), + buf, buflen, NULL, 0); - xfree (buf); + xfree (buffer); } @@ -2365,7 +2374,7 @@ change_keyattr (app_t app, int keyno, unsigned int nbits, assert (keyno >=0 && keyno <= 2); - if (nbits > 3072) + if (nbits > 4096) return gpg_error (GPG_ERR_TOO_LARGE); /* Read the current attributes into a buffer. */ @@ -2823,7 +2832,7 @@ do_genkey (app_t app, ctrl_t ctrl, const char *keynostr, unsigned int flags, already lead to a 527 byte long status line and thus a 4096 bit key would exceed the Assuan line length limit. */ keybits = app->app_local->keyattr[keyno].n_bits; - if (keybits > 3072) + if (keybits > 4096) return gpg_error (GPG_ERR_TOO_LARGE); /* Prepare for key generation by verifying the Admin PIN. */ @@ -3377,6 +3386,8 @@ do_decipher (app_t app, const char *keyidstr, fixuplen = 256 - indatalen; else if (indatalen >= (384-16) && indatalen < 384) /* 3072 bit key. */ fixuplen = 384 - indatalen; + else if (indatalen >= (512-16) && indatalen < 512) /* 4096 bit key. */ + fixuplen = 512 - indatalen; else fixuplen = 0; diff --git a/scd/command.c b/scd/command.c index be11ccb..a579b24 100644 --- a/scd/command.c +++ b/scd/command.c @@ -1288,11 +1288,15 @@ static const char hlp_genkey[] = "\n" "Generate a key on-card identified by NO, which is application\n" "specific. Return values are application specific. For OpenPGP\n" - "cards 2 status lines are returned:\n" + "cards 3 status lines are returned:\n" "\n" " S KEY-FPR \n" " S KEY-CREATED-AT \n" - " S KEY-DATA [p|n] \n" + " S KEY-DATA [-|p|n] \n" + "\n" + " 'p' and 'n' are the names of the RSA parameters; '-' is used to\n" + " indicate that HEXDATA is the first chunk of a parameter given\n" + " by the next KEY-DATA.\n" "\n" "--force is required to overwrite an already existing key. The\n" "KEY-CREATED-AT is required for further processing because it is\n" ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++- g10/ChangeLog | 8 +++++ g10/call-agent.c | 90 ++++++++++++++++++++++++++++++++++++++++++++--------- g10/card-util.c | 2 +- scd/ChangeLog | 6 +++ scd/app-openpgp.c | 25 ++++++++++---- scd/command.c | 8 +++- 7 files changed, 117 insertions(+), 26 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Jun 16 15:16:11 2011 From: cvs at cvs.gnupg.org (by Marcus Brinkmann) Date: Thu, 16 Jun 2011 15:16:11 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.3.1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 547aca0b24efa34634f23f91f2dc81a63cb4d9bc (commit) from b34add3fe438a693e236a835135bd11b4e177daa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 547aca0b24efa34634f23f91f2dc81a63cb4d9bc Author: Marcus Brinkmann Date: Thu Jun 16 14:38:59 2011 +0200 Release 1.3.1 diff --git a/ChangeLog b/ChangeLog index f5eefa6..d0ea8a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-06-16 Marcus Brinkmann + + Release 1.3.1 + + * configure.ac: Set LT version to C19/A8/R0. + 2011-05-06 Marcus Brinkmann * Makefile.am (SUBDIRS): Remove complus. diff --git a/NEWS b/NEWS index 04aeb1e..d9f7366 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.3.1 (unreleased) +Noteworthy changes in version 1.3.1 (2011-06-16) ------------------------------------------------ * Ported to Windows CE. diff --git a/configure.ac b/configure.ac index 55f6b85..7722562 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ min_automake_version="1.11" # SVN version is the most recent one in a branch. To disable the SVN # version for the real release, set the my_issvn macro to no. m4_define(my_version, [1.3.1]) -m4_define(my_issvn, [yes]) +m4_define(my_issvn, [no]) m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \ || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) @@ -51,10 +51,10 @@ AC_INIT([gpgme], # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=18 +LIBGPGME_LT_CURRENT=19 # Subtract 2 from this value if you want to make the LFS transition an # ABI break. [Note to self: Remove this comment with the next regular break.] -LIBGPGME_LT_AGE=7 +LIBGPGME_LT_AGE=8 LIBGPGME_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 6 ++++++ NEWS | 2 +- configure.ac | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Jun 27 15:00:57 2011 From: cvs at cvs.gnupg.org (by Ben Kibbey) Date: Mon, 27 Jun 2011 15:00:57 +0200 Subject: [git] Pinentry - branch, master, updated. pinentry-0.8.1-2-g8f64210 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The standard pinentry collection". The branch, master has been updated via 8f64210ccec8c298fe6430246368966634486732 (commit) from 5190773293bc38550bbc8aeb1b539bfb47a47c78 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8f64210ccec8c298fe6430246368966634486732 Author: Ben Kibbey Date: Sun Jun 26 15:56:11 2011 -0400 Pinentry timeout support. This adds a new pinentry command SETTIMEOUT and pinentry command line option --timeout to set the number of seconds until the pinentry dialog closes itself (default is 60 seconds). Only the qt4 program has been modified to make use of it. The timer is cancelled when user input is detected. For confirmation dialog boxes with a Cancel button, the button press is emulated after the timer expires. For a confirmation box without a Cancel button, nothing happens. diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c index 4c2b8d5..13b45f2 100644 --- a/pinentry/pinentry.c +++ b/pinentry/pinentry.c @@ -73,6 +73,7 @@ struct pinentry pinentry = 0, /* TTY LC_CTYPE. */ 0, /* TTY LC_MESSAGES. */ 0, /* Debug mode. */ + 60, /* Pinentry timeout in seconds. */ #ifdef ENABLE_ENHANCED 0, /* Enhanced mode. */ #endif @@ -413,6 +414,7 @@ usage (void) " --ttytype NAME Set the tty terminal type\n" " --lc-ctype Set the tty LC_CTYPE value\n" " --lc-messages Set the tty LC_MESSAGES value\n" +" --timeout SECS Timeout waiting for input after this many seconds\n" #ifdef ENABLE_ENHANCED " -e, --enhanced Ask for timeout and insurance, too\n" #endif @@ -498,6 +500,7 @@ pinentry_parse_opts (int argc, char *argv[]) { "colors", required_argument, 0, 'c' }, { "help", no_argument, 0, 'h' }, { "version", no_argument, &opt_version, 1 }, + { "timeout", required_argument, 0, 'o' }, { NULL, 0, NULL, 0 }}; while ((opt = getopt_long (argc, argv, "degh", opts, NULL)) != -1) @@ -587,6 +590,9 @@ pinentry_parse_opts (int argc, char *argv[]) &pinentry.color_so_bright); break; + case 'o': + pinentry.timeout = atoi(optarg); + break; default: fprintf (stderr, "%s: oops: option not handled\n", this_pgmname); break; @@ -819,6 +825,15 @@ cmd_setcancel (ASSUAN_CONTEXT ctx, char *line) static int +cmd_settimeout (ASSUAN_CONTEXT ctx, char *line) +{ + if (line && *line) + pinentry.timeout = atoi(line); + + return 0; +} + +static int cmd_settitle (ASSUAN_CONTEXT ctx, char *line) { char *newt; @@ -1052,6 +1067,7 @@ register_commands (ASSUAN_CONTEXT ctx) { "SETQUALITYBAR_TT", 0, cmd_setqualitybar_tt }, { "GETINFO", 0, cmd_getinfo }, { "SETTITLE", 0, cmd_settitle }, + { "SETTIMEOUT", 0, cmd_settimeout }, { NULL } }; int i, j, rc; diff --git a/pinentry/pinentry.h b/pinentry/pinentry.h index 30452f5..d4f86f9 100644 --- a/pinentry/pinentry.h +++ b/pinentry/pinentry.h @@ -72,6 +72,9 @@ struct pinentry /* True if debug mode is requested. */ int debug; + /* The number of seconds before giving up while waiting for user input. */ + int timeout; + #ifdef ENABLE_ENHANCED /* True if enhanced mode is requested. */ int enhanced; diff --git a/qt4/Makefile.am b/qt4/Makefile.am index 66568a7..054427a 100644 --- a/qt4/Makefile.am +++ b/qt4/Makefile.am @@ -45,4 +45,5 @@ pinentry_qt4_SOURCES = pinentrydialog.h pinentrydialog.cpp \ main.cpp secstring.h secstring.cpp qsecurelineedit.h \ qsecurelineedit.cpp pinentrydialog.moc qsecurelineedit.moc \ qrc_pinentry.cpp \ - qsecurelineedit_p.h + qsecurelineedit_p.h \ + pinentryconfirm.cpp pinentryconfirm.h pinentryconfirm.moc diff --git a/qt4/main.cpp b/qt4/main.cpp index 55c14f5..7fdef37 100644 --- a/qt4/main.cpp +++ b/qt4/main.cpp @@ -28,6 +28,7 @@ #include "config.h" #endif +#include "pinentryconfirm.h" #include "pinentrydialog.h" #include "pinentry.h" @@ -152,7 +153,7 @@ qt_cmd_handler (pinentry_t pe) if (want_pass) { - PinEntryDialog pinentry (parent, 0, true, !!pe->quality_bar); + PinEntryDialog pinentry (parent, 0, pe->timeout, true, !!pe->quality_bar); pinentry.setPinentryInfo (pe); pinentry.setPrompt (escape_accel (from_utf8 (pe->prompt)) ); @@ -201,7 +202,7 @@ qt_cmd_handler (pinentry_t pe) pe->notok ? QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel : /* else */ QMessageBox::Ok|QMessageBox::Cancel ; - QMessageBox box( QMessageBox::Information, title, desc, buttons, parent ); + PinentryConfirm box( QMessageBox::Information, pe->timeout, title, desc, buttons, parent ); const struct { QMessageBox::StandardButton button; diff --git a/qt4/pinentryconfirm.cpp b/qt4/pinentryconfirm.cpp new file mode 100644 index 0000000..b22aef5 --- /dev/null +++ b/qt4/pinentryconfirm.cpp @@ -0,0 +1,42 @@ +/* + pinentryconfirm.cpp - A QMessageBox with a timeout + + Copyright (C) 2011 Ben Kibbey + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +#include "pinentryconfirm.h" +#include + +PinentryConfirm::PinentryConfirm(Icon icon, int timeout, const QString &title, + const QString &desc, StandardButtons buttons, QWidget *parent) : + QMessageBox(icon, title, desc, buttons, parent) +{ + if (timeout > 0) { + _timer = new QTimer(this); + connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + _timer->start(timeout*1000); + } +} + +void PinentryConfirm::slotTimeout() +{ + QAbstractButton *b = button(QMessageBox::Cancel); + + if (b) + b->animateClick(0); +} + +#include "pinentryconfirm.moc" diff --git a/qt4/pinentryconfirm.h b/qt4/pinentryconfirm.h new file mode 100644 index 0000000..3113750 --- /dev/null +++ b/qt4/pinentryconfirm.h @@ -0,0 +1,41 @@ +/* + pinentryconfirm.h - A QMessageBox with a timeout + + Copyright (C) 2011 Ben Kibbey + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ +#ifndef PINENTRYCONFIRM_H +#define PINENTRYCONFIRM_H + +#include +#include + +class PinentryConfirm : public QMessageBox +{ + Q_OBJECT + public: + PinentryConfirm(Icon, int timeout, const QString &title, + const QString &desc, StandardButtons buttons, + QWidget *parent); + + private slots: + void slotTimeout(); + + private: + QTimer *_timer; +}; + +#endif diff --git a/qt4/pinentryconfirm.moc b/qt4/pinentryconfirm.moc new file mode 100644 index 0000000..e69e08e --- /dev/null +++ b/qt4/pinentryconfirm.moc @@ -0,0 +1,79 @@ +/**************************************************************************** +** Meta object code from reading C++ file 'pinentryconfirm.h' +** +** Created: Sun Jun 26 15:32:15 2011 +** by: The Qt Meta Object Compiler version 62 (Qt 4.7.3) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#include "pinentryconfirm.h" +#if !defined(Q_MOC_OUTPUT_REVISION) +#error "The header file 'pinentryconfirm.h' doesn't include ." +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.7.3. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +QT_BEGIN_MOC_NAMESPACE +static const uint qt_meta_data_PinentryConfirm[] = { + + // content: + 5, // revision + 0, // classname + 0, 0, // classinfo + 1, 14, // methods + 0, 0, // properties + 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount + + // slots: signature, parameters, type, tag, flags + 17, 16, 16, 16, 0x08, + + 0 // eod +}; + +static const char qt_meta_stringdata_PinentryConfirm[] = { + "PinentryConfirm\0\0slotTimeout()\0" +}; + +const QMetaObject PinentryConfirm::staticMetaObject = { + { &QMessageBox::staticMetaObject, qt_meta_stringdata_PinentryConfirm, + qt_meta_data_PinentryConfirm, 0 } +}; + +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &PinentryConfirm::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + +const QMetaObject *PinentryConfirm::metaObject() const +{ + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; +} + +void *PinentryConfirm::qt_metacast(const char *_clname) +{ + if (!_clname) return 0; + if (!strcmp(_clname, qt_meta_stringdata_PinentryConfirm)) + return static_cast(const_cast< PinentryConfirm*>(this)); + return QMessageBox::qt_metacast(_clname); +} + +int PinentryConfirm::qt_metacall(QMetaObject::Call _c, int _id, void **_a) +{ + _id = QMessageBox::qt_metacall(_c, _id, _a); + if (_id < 0) + return _id; + if (_c == QMetaObject::InvokeMetaMethod) { + switch (_id) { + case 0: slotTimeout(); break; + default: ; + } + _id -= 1; + } + return _id; +} +QT_END_MOC_NAMESPACE diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp index 541baf4..95096d4 100644 --- a/qt4/pinentrydialog.cpp +++ b/qt4/pinentrydialog.cpp @@ -87,8 +87,13 @@ QPixmap icon( QStyle::StandardPixmap which ) return pm; } -PinEntryDialog::PinEntryDialog( QWidget* parent, const char* name, bool modal, - bool enable_quality_bar ) +void PinEntryDialog::slotTimeout() +{ + reject(); +} + +PinEntryDialog::PinEntryDialog( QWidget* parent, const char* name, + int timeout, bool modal, bool enable_quality_bar ) : QDialog( parent, Qt::WindowStaysOnTopHint ), _grabbed( false ) { setWindowFlags( windowFlags() & ~Qt::WindowContextHelpButtonHint ); @@ -143,6 +148,12 @@ PinEntryDialog::PinEntryDialog( QWidget* parent, const char* name, bool modal, _cancel->setIcon( style()->standardIcon( QStyle::SP_DialogCancelButton ) ); } + if (timeout > 0) { + _timer = new QTimer(this); + connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + _timer->start(timeout*1000); + } + connect( buttons, SIGNAL(accepted()), this, SLOT(accept()) ); connect( buttons, SIGNAL(rejected()), this, SLOT(reject()) ); connect( _edit, SIGNAL( textChanged(secqstring) ), @@ -257,6 +268,7 @@ void PinEntryDialog::updateQuality(const secqstring & txt ) int percent; QPalette pal; + _timer->stop(); if (!_have_quality_bar || !_pinentry_info) return; secstring pinStr = toUtf8(txt); diff --git a/qt4/pinentrydialog.h b/qt4/pinentrydialog.h index 416abfe..6657060 100644 --- a/qt4/pinentrydialog.h +++ b/qt4/pinentrydialog.h @@ -26,6 +26,7 @@ #include #include +#include #include "secstring.h" #include "pinentry.h" @@ -49,7 +50,7 @@ class PinEntryDialog : public QDialog { Q_PROPERTY( QString prompt READ prompt WRITE setPrompt ) public: friend class PinEntryController; // TODO: remove when assuan lets me use Qt eventloop. - explicit PinEntryDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, bool enable_quality_bar = false ); + explicit PinEntryDialog( QWidget* parent = 0, const char* name = 0, int timeout = 0, bool modal = false, bool enable_quality_bar = false ); void setDescription( const QString& ); QString description() const; @@ -73,6 +74,7 @@ public: public slots: void updateQuality(const secqstring&); + void slotTimeout(); protected: /* reimp */ void showEvent( QShowEvent* event ); @@ -92,6 +94,7 @@ private: bool _grabbed; bool _have_quality_bar; pinentry_t _pinentry_info; + QTimer* _timer; }; #endif // __PINENTRYDIALOG_H__ diff --git a/qt4/pinentrydialog.moc b/qt4/pinentrydialog.moc index c9a0930..a99da49 100644 --- a/qt4/pinentrydialog.moc +++ b/qt4/pinentrydialog.moc @@ -1,8 +1,8 @@ /**************************************************************************** ** Meta object code from reading C++ file 'pinentrydialog.h' ** -** Created: Mon Mar 16 13:03:03 2009 -** by: The Qt Meta Object Compiler version 59 (Qt 4.4.1) +** Created: Sun Jun 26 15:13:15 2011 +** by: The Qt Meta Object Compiler version 62 (Qt 4.7.3) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ @@ -10,8 +10,8 @@ #include "pinentrydialog.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'pinentrydialog.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION < 59 -#error "This file was generated using the moc from 4.4.1. It" +#elif Q_MOC_OUTPUT_REVISION != 62 +#error "This file was generated using the moc from 4.7.3. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif @@ -20,29 +20,33 @@ QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_PinEntryDialog[] = { // content: - 1, // revision + 5, // revision 0, // classname 0, 0, // classinfo - 1, 10, // methods - 4, 15, // properties + 2, 14, // methods + 4, 24, // properties 0, 0, // enums/sets + 0, 0, // constructors + 0, // flags + 0, // signalCount // slots: signature, parameters, type, tag, flags 16, 15, 15, 15, 0x0a, + 42, 15, 15, 15, 0x0a, // properties: name, type, flags - 50, 42, 0x0a095103, - 62, 42, 0x0a095103, - 79, 68, 0x0009510b, - 83, 42, 0x0a095103, + 64, 56, 0x0a095103, + 76, 56, 0x0a095103, + 93, 82, 0x0009510b, + 97, 56, 0x0a095103, 0 // eod }; static const char qt_meta_stringdata_PinEntryDialog[] = { "PinEntryDialog\0\0updateQuality(secqstring)\0" - "QString\0description\0error\0secqstring\0" - "pin\0prompt\0" + "slotTimeout()\0QString\0description\0" + "error\0secqstring\0pin\0prompt\0" }; const QMetaObject PinEntryDialog::staticMetaObject = { @@ -50,9 +54,13 @@ const QMetaObject PinEntryDialog::staticMetaObject = { qt_meta_data_PinEntryDialog, 0 } }; +#ifdef Q_NO_DATA_RELOCATION +const QMetaObject &PinEntryDialog::getStaticMetaObject() { return staticMetaObject; } +#endif //Q_NO_DATA_RELOCATION + const QMetaObject *PinEntryDialog::metaObject() const { - return &staticMetaObject; + return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; } void *PinEntryDialog::qt_metacast(const char *_clname) @@ -71,8 +79,10 @@ int PinEntryDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a) if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: updateQuality((*reinterpret_cast< const secqstring(*)>(_a[1]))); break; + case 1: slotTimeout(); break; + default: ; } - _id -= 1; + _id -= 2; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { ----------------------------------------------------------------------- Summary of changes: pinentry/pinentry.c | 16 ++++++ pinentry/pinentry.h | 3 + qt4/Makefile.am | 3 +- qt4/main.cpp | 5 +- qt4/{secstring.h => pinentryconfirm.cpp} | 54 +++++++++++---------- qt4/{secstring.h => pinentryconfirm.h} | 43 ++++++++-------- qt4/pinentryconfirm.moc | 79 ++++++++++++++++++++++++++++++ qt4/pinentrydialog.cpp | 16 +++++- qt4/pinentrydialog.h | 5 ++- qt4/pinentrydialog.moc | 40 +++++++++------ 10 files changed, 196 insertions(+), 68 deletions(-) copy qt4/{secstring.h => pinentryconfirm.cpp} (51%) copy qt4/{secstring.h => pinentryconfirm.h} (52%) create mode 100644 qt4/pinentryconfirm.moc hooks/post-receive -- The standard pinentry collection http://git.gnupg.org From cvs at cvs.gnupg.org Mon Jun 27 16:33:14 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 27 Jun 2011 16:33:14 +0200 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-68-g7d68c6b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 7d68c6b0ec4dff3596b261984c978dca5ba1e732 (commit) from 37228cfa05005d56f0683782004edddb964f9192 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7d68c6b0ec4dff3596b261984c978dca5ba1e732 Author: Werner Koch Date: Mon Jun 27 15:56:47 2011 +0200 Add question "What are DH/DSS keys?" ... and the answer of course. diff --git a/doc/faq.org b/doc/faq.org index 0e31c02..d980f81 100644 --- a/doc/faq.org +++ b/doc/faq.org @@ -64,7 +64,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates display in some browsers for the web page version of this file, and have been split into two or more lines. For these commands please remember to enter the entire command-string on one line or the - command will error, or at minimum not give the desired results. + command will error, or at minimum not give the desired results. Please keep in mind that this FAQ contains information that may not apply to your particular version, as new features and bug fixes are @@ -95,7 +95,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates ** Is GnuPG compatible with PGP? :PROPERTIES: :CUSTOM_ID: is-gnupg-compatible-with-pgp - :END: + :END: In general, yes. GnuPG and newer PGP releases should be implementing the OpenPGP standard. But there are some interoperability problems. @@ -165,7 +165,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates version as it includes additional features, functions and security fixes that may not have existed in prior versions. -* Installation +* Installation ** Which OSes does GnuPG run on? :PROPERTIES: @@ -435,7 +435,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates :CUSTOM_ID: get-rid-of-the-version-and-comment-headers-in-armored-messages :END: - Use + Use : --no-version --comment '' @@ -454,7 +454,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates =--charset=. It is important that your active character set matches the one displayed --- if not, restrict yourself to plain 7 bit ASCII and no mapping has to be done. - + ** How can I get list of key IDs used to encrypt a message? :PROPERTIES: :CUSTOM_ID: how-can-i-get-list-of-key-ids-used-to-encrypt-a-message @@ -489,7 +489,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates automated environment is: On a secure machine: - + 1. If you want to do automatic signing, create a signing subkey for your key. Use the interactive key editing menu by issueing the command @@ -499,7 +499,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates 1. Make sure that you use a passphrase (needed by the current implementation). - 1. + 1. : gpg --export-secret-subkeys --no-comment foo >secring.auto 1. Copy secring.auto and the public keyring to a test directory. @@ -839,7 +839,6 @@ update this FAQ in the next month. See the section "Changes" for recent updates : $ gpg --s2k-cipher-algo 3des --compress-algo 1 --rfc1991 \ : --export-secret-keys - ** GnuPG no longer installs a ~/.gnupg/options file. Is it missing? :PROPERTIES: :CUSTOM_ID: gnupg-no-longer-installs-a-options-file-is-it-missing @@ -910,6 +909,22 @@ update this FAQ in the next month. See the section "Changes" for recent updates Thanks to David Shaw for this information! +** What are DH/DSS keys? + :PROPERTIES: + :CUSTOM_ID: what-are-dh-dss-keys + :END: + + PGP uses a different name for the former default encryption + algorithm Elgamal: They name it DH, which usually stands for the + Diffie-Hellman key exchange algorithm. It has been said that this + had historic patent and business reasons. It is however exactly + the same thing as the Elgamal algorithm. + + They also use the acronym DSS (Digital Signature Standard) instead + of the DSA (Digital Signature Algorithm). The difference is that + DSS requires the use of certain hash algorithms; however OpenPGP + allows the use of more than those hash algorithms, thus GPG usually + uses the term DSA. * Problems and Error Messages @@ -957,7 +972,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates : $ chmod u+s /path/to/gpg or - + : $ chmod 4755 /path/to/gpg Some refrain from using setuid(root) unless absolutely required for @@ -1042,7 +1057,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates If you use GnuPG to process those messages, the extra dashes are removed. Good mail clients remove those extra dashes when - displaying such a message. + displaying such a message. ** What is the thing with "can't handle multiple signatures"? :PROPERTIES: ----------------------------------------------------------------------- Summary of changes: doc/faq.org | 35 +++++++++++++++++++++++++---------- 1 files changed, 25 insertions(+), 10 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Jun 27 16:49:34 2011 From: cvs at cvs.gnupg.org (by Bernhard Reiter) Date: Mon, 27 Jun 2011 16:49:34 +0200 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-69-gf194773 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via f1947735407db34988668b075541e3297e476e59 (commit) from 7d68c6b0ec4dff3596b261984c978dca5ba1e732 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f1947735407db34988668b075541e3297e476e59 Author: Bernhard Reiter Date: Wed Jun 22 12:18:50 2011 +0200 doc/gpgsm.texi com-certs.pem mini-fix [[PGP Signed Part:Undecided]] [1. text/plain] Example path for com-certs.pem corrected. [2. text/x-diff; doc.diff] diff --git a/doc/gpgsm.texi b/doc/gpgsm.texi index 2beaf2d..1f4950a 100644 --- a/doc/gpgsm.texi +++ b/doc/gpgsm.texi @@ -833,7 +833,7 @@ This file is a collection of common certificates used to populated a newly created @file{pubring.kbx}. An administrator may replace this file with a custom one. The format is a concatenation of PEM encoded X.509 certificates. This global file is installed in the data directory -(e.g. @file{/usr/share/gnupg/qualified.txt}). +(e.g. @file{/usr/share/gnupg/com-certs.pem}). @end table ----------------------------------------------------------------------- Summary of changes: doc/gpgsm.texi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Jun 28 11:08:35 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 28 Jun 2011 11:08:35 +0200 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-70-gc9e4736 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via c9e473618fd32c9f337aae031b8d3f93e04b304d (commit) from f1947735407db34988668b075541e3297e476e59 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c9e473618fd32c9f337aae031b8d3f93e04b304d Author: Werner Koch Date: Tue Jun 28 10:32:46 2011 +0200 Fixed an URL typo in the FAQ. diff --git a/doc/faq.org b/doc/faq.org index d980f81..ee6c0c7 100644 --- a/doc/faq.org +++ b/doc/faq.org @@ -8,7 +8,7 @@ #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc #+LINK: gnupgweb http://www.gnupg.org/ #+LINK: roundup https://bugs.g10code.com/gnupg/issue -###+STYLE: +#+STYLE: # FIXME: This FAQ needs a heavy cleanup. For now I only switched to # org-mode format for easier maintenance. @@ -1140,7 +1140,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates the list of reported bugs on the documentation page). If you're not sure about it being a bug, you can send mail to the gnupg-devel list. Otherwise, use the bug tracking system - [[http://busg.gnupg.org][bugs.gnupg.org]]. + [[http://bugs.gnupg.org][bugs.gnupg.org]]. ** Why doesn't GnuPG support X.509 certificates? :PROPERTIES: ----------------------------------------------------------------------- Summary of changes: doc/faq.org | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Jun 28 20:01:50 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 28 Jun 2011 20:01:50 +0200 Subject: [git] Pinentry - branch, master, updated. pinentry-0.8.1-3-g671a1a7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The standard pinentry collection". The branch, master has been updated via 671a1a70eceb7a31feb0df997fbc8eb25f722895 (commit) from 8f64210ccec8c298fe6430246368966634486732 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 671a1a70eceb7a31feb0df997fbc8eb25f722895 Author: Werner Koch Date: Tue Jun 28 19:22:56 2011 +0200 Get rid of the runtime warning about "editing-canceled". Actually this property is only used by GtkTreeView which we don't use. However newer gtk versions require this to be a property and thus we implement it as a dummy. diff --git a/ChangeLog b/ChangeLog index e84517c..9b208d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-06-28 Werner Koch + + * gtk+-2/gtksecentry.c (PROP_EDITING_CANCELED): New. + (gtk_secure_entry_class_init, gtk_secure_entry_set_property) + (gtk_secure_entry_get_property): Implement as dummy it to get rid + of a runtime warning. + 2010-12-16 Werner Koch Release 0.8.1. diff --git a/gtk+-2/gtksecentry.c b/gtk+-2/gtksecentry.c index 146cec7..cfe6aea 100644 --- a/gtk+-2/gtksecentry.c +++ b/gtk+-2/gtksecentry.c @@ -22,7 +22,7 @@ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ /* @@ -70,7 +70,8 @@ enum { PROP_ACTIVATES_DEFAULT, PROP_WIDTH_CHARS, PROP_SCROLL_OFFSET, - PROP_TEXT + PROP_TEXT, + PROP_EDITING_CANCELED }; static guint signals[LAST_SIGNAL] = { 0 }; @@ -425,6 +426,10 @@ gtk_secure_entry_class_init(GtkSecureEntryClass * class) class->delete_from_cursor = gtk_secure_entry_delete_from_cursor; class->activate = gtk_secure_entry_real_activate; + g_object_class_override_property (gobject_class, + PROP_EDITING_CANCELED, + "editing-canceled"); + g_object_class_install_property(gobject_class, PROP_CURSOR_POSITION, g_param_spec_int("cursor_position", @@ -705,6 +710,14 @@ gtk_secure_entry_set_property(GObject * object, gtk_secure_entry_set_text(entry, g_value_get_string(value)); break; + case PROP_EDITING_CANCELED: + /* We may want to implement the GtkCelllEditable methods. + However it is only used by GtkTreeView and we don't use that + here. We provide this property only to get rid of a Gtk+ + runtime warning. */ + entry->editing_canceled = g_value_get_boolean (value); + break; + case PROP_SCROLL_OFFSET: case PROP_CURSOR_POSITION: default: @@ -748,6 +761,9 @@ gtk_secure_entry_get_property(GObject * object, case PROP_TEXT: g_value_set_string(value, gtk_secure_entry_get_text(entry)); break; + case PROP_EDITING_CANCELED: + g_value_set_boolean (value, entry->editing_canceled); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); @@ -2655,14 +2671,14 @@ gtk_secure_entry_new(void) * be clamped to the range 0-65536. * * Creates a new #GtkSecureEntry widget with the given maximum length. - * + * * Note: the existence of this function is inconsistent * with the rest of the GTK+ API. The normal setup would * be to just require the user to make an extra call * to gtk_secure_entry_set_max_length() instead. It is not * expected that this function will be removed, but * it would be better practice not to use it. - * + * * Return value: a new #GtkSecureEntry. **/ GtkWidget * @@ -2735,7 +2751,7 @@ gtk_secure_entry_set_position(GtkSecureEntry * entry, gint position) * gtk_secure_entry_set_invisible_char: * @entry: a #GtkSecureEntry * @ch: a Unicode character - * + * * Sets the character to use in place of the actual text when * gtk_secure_entry_set_visibility() has been called to set text visibility * to %FALSE. i.e. this is the character used in "password mode" to @@ -2743,7 +2759,7 @@ gtk_secure_entry_set_position(GtkSecureEntry * entry, gint position) * invisible char is an asterisk ('*'). If you set the invisible char * to 0, then the user will get no feedback at all; there will be * no text on the screen as they type. - * + * **/ void gtk_secure_entry_set_invisible_char(GtkSecureEntry * entry, gunichar ch) @@ -2766,7 +2782,7 @@ gtk_secure_entry_set_invisible_char(GtkSecureEntry * entry, gunichar ch) * for entries with visisbility set to false. See gtk_secure_entry_set_invisible_char(). * * Return value: the current invisible char, or 0, if the entry does not - * show invisible text at all. + * show invisible text at all. **/ gunichar gtk_secure_entry_get_invisible_char(GtkSecureEntry * entry) @@ -2809,7 +2825,7 @@ gtk_secure_entry_select_region(GtkSecureEntry * entry, * @max: the maximum length of the entry, or 0 for no maximum. * (other than the maximum length of entries.) The value passed in will * be clamped to the range 0-65536. - * + * * Sets the maximum allowed length of the contents of the widget. If * the current contents are longer than the given length, then they * will be truncated to fit. @@ -2859,7 +2875,7 @@ gtk_secure_entry_get_max_length(GtkSecureEntry * entry) * (For experts: if @setting is %TRUE, the entry calls * gtk_window_activate_default() on the window containing the entry, in * the default handler for the "activate" signal.) - * + * **/ void gtk_secure_entry_set_activates_default(GtkSecureEntry * entry, @@ -2877,9 +2893,9 @@ gtk_secure_entry_set_activates_default(GtkSecureEntry * entry, /** * gtk_secure_entry_get_activates_default: * @entry: a #GtkSecureEntry - * + * * Retrieves the value set by gtk_secure_entry_set_activates_default(). - * + * * Return value: %TRUE if the entry will activate the default widget **/ gboolean @@ -2900,7 +2916,7 @@ gtk_secure_entry_get_activates_default(GtkSecureEntry * entry) * request, the size can still be affected by * how you pack the widget into containers. If @n_chars is -1, the * size reverts to the default entry size. - * + * **/ void gtk_secure_entry_set_width_chars(GtkSecureEntry * entry, gint n_chars) @@ -2917,9 +2933,9 @@ gtk_secure_entry_set_width_chars(GtkSecureEntry * entry, gint n_chars) /** * gtk_secure_entry_get_width_chars: * @entry: a #GtkSecureEntry - * + * * Gets the value set by gtk_secure_entry_set_width_chars(). - * + * * Return value: number of chars to request space for, or negative if unset **/ gint @@ -2934,7 +2950,7 @@ gtk_secure_entry_get_width_chars(GtkSecureEntry * entry) * gtk_secure_entry_set_has_frame: * @entry: a #GtkSecureEntry * @setting: new value - * + * * Sets whether the entry has a beveled frame around it. **/ void @@ -2955,9 +2971,9 @@ gtk_secure_entry_set_has_frame(GtkSecureEntry * entry, gboolean setting) /** * gtk_secure_entry_get_has_frame: * @entry: a #GtkSecureEntry - * + * * Gets the value set by gtk_secure_entry_set_has_frame(). - * + * * Return value: whether the entry has a beveled frame **/ gboolean @@ -2972,7 +2988,7 @@ gtk_secure_entry_get_has_frame(GtkSecureEntry * entry) /** * gtk_secure_entry_get_layout: * @entry: a #GtkSecureEntry - * + * * Gets the #PangoLayout used to display the entry. * The layout is useful to e.g. convert text positions to * pixel positions, in combination with gtk_secure_entry_get_layout_offsets(). @@ -2983,7 +2999,7 @@ gtk_secure_entry_get_has_frame(GtkSecureEntry * entry) * gtk_secure_entry_layout_index_to_text_index() and * gtk_secure_entry_text_index_to_layout_index() are needed to convert byte * indices in the layout to byte indices in the entry contents. - * + * * Return value: the #PangoLayout for this entry **/ PangoLayout * @@ -3003,12 +3019,12 @@ gtk_secure_entry_get_layout(GtkSecureEntry * entry) * gtk_secure_entry_layout_index_to_text_index: * @entry: a #GtkSecureEntry * @layout_index: byte index into the entry layout text - * + * * Converts from a position in the entry contents (returned * by gtk_secure_entry_get_text()) to a position in the * entry's #PangoLayout (returned by gtk_secure_entry_get_layout(), * with text retrieved via pango_layout_get_text()). - * + * * Return value: byte index into the entry contents **/ gint @@ -3040,11 +3056,11 @@ gtk_secure_entry_layout_index_to_text_index(GtkSecureEntry * entry, * gtk_secure_entry_text_index_to_layout_index: * @entry: a #GtkSecureEntry * @text_index: byte index into the entry contents - * + * * Converts from a position in the entry's #PangoLayout(returned by * gtk_secure_entry_get_layout()) to a position in the entry contents * (returned by gtk_secure_entry_get_text()). - * + * * Return value: byte index into the entry layout text **/ gint @@ -3082,7 +3098,7 @@ gtk_secure_entry_text_index_to_layout_index(GtkSecureEntry * entry, * Also useful to convert mouse events into coordinates inside the * #PangoLayout, e.g. to take some action if some part of the entry text * is clicked. - * + * * Note that as the user scrolls around in the entry the offsets will * change; you'll need to connect to the "notify::scroll_offset" * signal to track this. Remember when using the #PangoLayout @@ -3093,7 +3109,7 @@ gtk_secure_entry_text_index_to_layout_index(GtkSecureEntry * entry, * gtk_secure_entry_layout_index_to_text_index() and * gtk_secure_entry_text_index_to_layout_index() are needed to convert byte * indices in the layout to byte indices in the entry contents. - * + * **/ void gtk_secure_entry_get_layout_offsets(GtkSecureEntry * entry, diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c index 232b4c7..da4dc77 100644 --- a/gtk+-2/pinentry-gtk-2.c +++ b/gtk+-2/pinentry-gtk-2.c @@ -11,12 +11,12 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ @@ -97,7 +97,7 @@ constrain_size (GtkWidget *win, GtkRequisition *req, gpointer data) GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE); } - + /* Realize the window as transient if we grab the keyboard. This makes the window a modal dialog to the root window, which helps the window manager. See the following quote from: @@ -273,7 +273,7 @@ changed_text_handler (GtkWidget *widget) snprintf (textbuf, sizeof textbuf, "%d%%", percent); color.green = 0xffff; } - gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), (double)percent/100.0); gtk_progress_bar_set_text (GTK_PROGRESS_BAR (qualitybar), textbuf); gtk_widget_modify_bg (qualitybar, GTK_STATE_PRELIGHT, &color); @@ -327,7 +327,7 @@ create_window (int confirm_mode) G_CALLBACK (ungrab_keyboard), NULL); } gtk_window_add_accel_group (GTK_WINDOW (win), acc); - + wvbox = gtk_vbox_new (FALSE, HIG_LARGE * 2); gtk_container_add (GTK_CONTAINER (win), wvbox); gtk_container_set_border_width (GTK_CONTAINER (wvbox), HIG_LARGE); @@ -435,7 +435,7 @@ create_window (int confirm_mode) 2, 0); gtk_box_pack_start (GTK_BOX (sbox), time_out, FALSE, FALSE, 0); gtk_widget_show (time_out); - + w = gtk_label_new ("seconds"); gtk_box_pack_start (GTK_BOX (sbox), w, FALSE, FALSE, 0); gtk_widget_show (w); @@ -483,7 +483,7 @@ create_window (int confirm_mode) (gpointer) CONFIRM_CANCEL); GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT); } - + if (confirm_mode && !pinentry->one_button && pinentry->notok) { msg = pinentry_utf8_validate (pinentry->notok); @@ -496,7 +496,7 @@ create_window (int confirm_mode) (gpointer) CONFIRM_NOTOK); GTK_WIDGET_SET_FLAGS (w, GTK_CAN_DEFAULT); } - + if (pinentry->ok) { msg = pinentry_utf8_validate (pinentry->ok); @@ -506,7 +506,7 @@ create_window (int confirm_mode) else if (pinentry->default_ok) { GtkWidget *image; - + msg = pinentry_utf8_validate (pinentry->default_ok); w = gtk_button_new_with_mnemonic (msg); g_free (msg); @@ -540,7 +540,7 @@ create_window (int confirm_mode) gtk_window_set_keep_above (GTK_WINDOW (win), TRUE); gtk_widget_show_all (win); gtk_window_present (GTK_WINDOW (win)); /* Make sure it has the focus. */ - + return win; } @@ -595,7 +595,7 @@ main (int argc, char *argv[]) g_mem_set_vtable (&secure_mem); pinentry_init (PGMNAME); - + #ifdef FALLBACK_CURSES if (pinentry_have_display (argc, argv)) gtk_init (&argc, &argv); @@ -611,9 +611,9 @@ main (int argc, char *argv[]) printf(PGMNAME " " VERSION "\n"); exit(EXIT_SUCCESS); } - + if (pinentry_loop ()) return 1; - + return 0; } ----------------------------------------------------------------------- Summary of changes: ChangeLog | 7 +++++ gtk+-2/gtksecentry.c | 66 +++++++++++++++++++++++++++++----------------- gtk+-2/pinentry-gtk-2.c | 26 +++++++++--------- 3 files changed, 61 insertions(+), 38 deletions(-) hooks/post-receive -- The standard pinentry collection http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 12:14:31 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 12:14:31 +0200 Subject: [git] GCRYPT - branch, master, updated. post-nuke-of-trailing-ws-65-ga31c067 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via a31c067c10a9232049592fb6322505995653119c (commit) via 0bfd252cc4920b351bdbd6596ebd9dd925189bdc (commit) via eb97544d99de6ab377ecbb9bbb6427f1e7c35c35 (commit) from b90be2836e1806f2441c97f70952ca042a67f520 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a31c067c10a9232049592fb6322505995653119c Author: Werner Koch Date: Wed Jun 29 10:57:04 2011 +0200 Prepare for the 1.5.0 release. diff --git a/AUTHORS b/AUTHORS index 3ef6558..0685a4e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -118,7 +118,7 @@ original NTT provided GPL source. The CAVS testing program tests/cavs_driver.pl is not to be considered a part of libgcrypt proper. We distribute it merely for convenience. -It has a permissive license and is copyright by atsec information +It has a permissive license and is copyrighted by atsec information security corporation. See the file for details. diff --git a/ChangeLog b/ChangeLog index 6df65b2..2c56e2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-06-29 Werner Koch + + Release 1.5.0. + + * configure.ac: Keep LT version at C18/A7/R0 because it has + already been bumped up at 2010-07-09. + + * config.guess, config.sub: Update to 2011-06-03. + 2011-04-06 Werner Koch * configure.ac (emacs_local_vars_begin): Move more to the top to @@ -1452,7 +1461,7 @@ Fri Feb 13 19:43:41 1998 Werner Koch (wk at isil.d.shuttle.de) Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, - 2007, 2008, 2009 Free Software Foundation, Inc. + 2007, 2008, 2009, 2011 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without diff --git a/NEWS b/NEWS index b2aca57..32fb6de 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.5.x (unreleased) +Noteworthy changes in version 1.5.0 (2011-06-29) ------------------------------------------------ * New function gcry_kdf_derive implementing OpenPGP S2K algorithms @@ -33,23 +33,28 @@ Noteworthy changes in version 1.5.x (unreleased) whether you really need this feature or how it can be replaced by an internal plugin mechanism. - * New variants of the TIGER algorithm. [also in 1.4.6] + * CTR mode may now be used with data chunks of arbitrary length. - * New cipher algorithm mode for AES-WRAP. [also in 1.4.6] + * Changes also done in 1.4.6 (2010-07-13): + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * CTR mode may now be used with data chunks of arbitrary length. + * New variants of the TIGER algorithm. + + * New cipher algorithm mode for AES-WRAP. - * Fixed minor memory leak in DSA key generation. [also in 1.4.5] + * Changes also done in 1.4.5 (2009-12-11): + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * No more switching to FIPS mode if /proc/version is not - readable. [also in 1.4.5] + * Fixed minor memory leak in DSA key generation. - * Fixed sigill during Padlock detection on old CPUs. [also in 1.4.5] + * No more switching to FIPS mode if /proc/version is not readable. - * Fixed a hang on some W2000 machines. [also in 1.4.5] + * Fixed sigill during Padlock detection on old CPUs. + + * Fixed a hang on some W2000 machines. * Boosted SHA-512 performance by 30% on ia32 boxes and gcc 4.3; - SHA-256 went up by 25%. [also in 1.4.5] + SHA-256 went up by 25%. * Interface changes relative to the 1.4.6 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -58,11 +63,12 @@ Noteworthy changes in version 1.5.x (unreleased) gcry_pk_get_param NEW. GCRYCTL_DISABLE_HWF NEW. gcry_kdf_derive NEW. - gcry_pk_encrypt EXTENDED: Support OAEP - gcry_pk_decrypt EXTENDED: Support OAEP + gcry_pk_encrypt EXTENDED: Support OAEP. + gcry_pk_decrypt EXTENDED: Support OAEP. + gcry_pk_sign EXTENDED: Support PSS. + gcry_pk_verify EXTENDED: Support PSS. gcry_sexp_build EXTENDED: Add format specifiers M and u. - * Interface changes relative to the 1.4.2 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GCRY_CIPHER_MODE_AESWRAP NEW. @@ -658,7 +664,7 @@ Noteworthy changes in version 1.1.3 (2001-05-31) Copyright 2001, 2002, 2003, 2004, 2007, 2008, - 2009 Free Software Foundation, Inc. + 2009, 2011 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without diff --git a/README b/README index 0b4e882..a3abfa1 100644 --- a/README +++ b/README @@ -1,12 +1,9 @@ Libgcrypt - The GNU Crypto Library ------------------------------------ - Version 1.5.x + Version 1.5 - WARNING: THIS VERSION OF LIBGCRYPT IS UNDER DEVELOPMENT. - THE STABLE VERSION IS THE 1.4. - - Copyright 2000, 2002, 2003, 2004, 2007, 2008, - 2009, 2011 Free Software Foundation, Inc. + Copyright 2000, 2002, 2003, 2004, 2007, 2008, 2009, + 2011 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without diff --git a/THANKS b/THANKS index 10d5384..41f4c77 100644 --- a/THANKS +++ b/THANKS @@ -107,7 +107,7 @@ QingLong qinglong at bolizm.ihep.su Rafael ?vila de Esp?ndola rafael.espindola at gmail.com Rafa?l Carr? funman at videolan.org Ralf Fassel ralf at akutech.de -Ralf Hildebrandt Ralf.Hildebrandt at innominate.com +Ralf Hildebrandt Ralf.Hildebrandt at innominate.com Ralf Schneider ralf at tapfere-schneiderleins.de Ralph Gillen gillen at theochem.uni-duesseldorf.de Rami Lehti Rami.Lehti at finland.sun.com @@ -154,8 +154,8 @@ Wim Vandeputte wim at kd85.com nbecker at hns.com - Copyright 1998, 1999, 2000, 2001, 2002, 2003, - 2009 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001, 2002, 2003, + 2009, 2011 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without diff --git a/configure.ac b/configure.ac index 155d679..75e5a52 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Configure.ac script for Libgcrypt # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, -# 2007, 2008, 2009 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2011 Free Software Foundation, Inc. # # This file is part of Libgcrypt. # @@ -27,7 +27,7 @@ min_automake_version="1.10" # Set my_issvn to "yes" for non-released code. Remember to run an # "svn up" and "autogen.sh" right before creating a distribution. m4_define([my_version], [1.5.0]) -m4_define([my_issvn], [yes]) +m4_define([my_issvn], [no]) m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) @@ -41,9 +41,6 @@ AC_INIT([libgcrypt], # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) # (Interfaces added: CURRENT++, AGE++, REVISION=0) # (No interfaces changed: REVISION++) - -# NOTE: As an exception during development of this branch the LT -# versions are already set for 1.5.0! LIBGCRYPT_LT_CURRENT=18 LIBGCRYPT_LT_AGE=7 LIBGCRYPT_LT_REVISION=0 diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index 419dc68..e172ca8 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -455,8 +455,18 @@ both such libraries are then linked into the same application. To make it a bit simpler for you, this will probably work, but only if both libraries have the same requirement for the thread package. This is currently only supported for the non-threaded case, GNU Pth and -pthread. Support for more thread packages is easy to add, so contact -us if you require it. +pthread. + +If you use pthread and your applications forks and does not directly +call exec (even calling stdio functions), all kind of problems may +occur. Future versions of Libgcrypt will try to cleanup using +pthread_atfork but even that may lead to problems. This is a common +problem with almost all applications using pthread and fork. + +Note that future versions of Libgcrypt will drop this flexible thread +support and instead only support the platforms standard thread +implementation. + @item The function @code{gcry_check_version} must be called before any other commit 0bfd252cc4920b351bdbd6596ebd9dd925189bdc Author: Werner Koch Date: Wed Jun 29 10:56:22 2011 +0200 Update config.{sub,guess} diff --git a/config.guess b/config.guess index 7fef1a3..b02565c 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2007-11-19' +timestamp='2011-06-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ timestamp='2007-11-19' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +56,9 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -180,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -223,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,7 +299,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -324,14 +328,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -375,23 +398,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -461,8 +484,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -475,7 +498,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -532,7 +555,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[45]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -575,52 +598,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -640,7 +663,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -711,22 +734,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -750,14 +773,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -785,24 +808,30 @@ EOF echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + *:Interix*:*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -832,8 +861,35 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -845,7 +901,18 @@ EOF echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -856,74 +923,33 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + padre:Linux:*:*) + echo sparc-unknown-linux-gnu exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level @@ -933,14 +959,17 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -948,6 +977,9 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; @@ -955,71 +987,8 @@ EOF echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1027,11 +996,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1048,7 +1017,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1063,7 +1032,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1091,10 +1060,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1129,8 +1101,18 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1143,7 +1125,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1163,10 +1145,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1192,11 +1174,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1206,6 +1188,9 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1233,6 +1218,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1248,6 +1243,9 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1293,13 +1291,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1314,6 +1312,9 @@ EOF i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1336,11 +1337,11 @@ main () #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif @@ -1474,9 +1475,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/config.sub b/config.sub index 5190461..f9fcdc8 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2007-11-19' +timestamp='2011-06-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ timestamp='2007-11-19' # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +75,9 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,8 +124,10 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -148,10 +154,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -166,10 +175,10 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -249,13 +258,16 @@ case $basic_machine in | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ @@ -268,28 +280,42 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -300,6 +326,18 @@ case $basic_machine in basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -320,7 +358,7 @@ case $basic_machine in | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ @@ -329,14 +367,17 @@ case $basic_machine in | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ @@ -351,27 +392,32 @@ case $basic_machine in | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ - | v850-* | v850e-* | vax-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) @@ -393,7 +439,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -439,6 +485,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -447,10 +497,35 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -479,7 +554,7 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -518,6 +593,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -672,6 +751,14 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -683,6 +770,9 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -787,6 +877,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -817,6 +913,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -861,9 +965,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -957,6 +1062,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1013,17 +1121,9 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown @@ -1092,6 +1192,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1100,6 +1203,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1138,7 +1245,7 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) @@ -1185,9 +1292,12 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1208,10 +1318,11 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1220,9 +1331,10 @@ case $os in | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ + | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1230,7 +1342,7 @@ case $os in | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1269,7 +1381,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1318,7 +1430,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1360,6 +1472,11 @@ case $os in -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; -none) ;; *) @@ -1382,10 +1499,10 @@ else # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1397,8 +1514,17 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1425,7 +1551,7 @@ case $basic_machine in m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1452,7 +1578,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) @@ -1557,7 +1683,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) commit eb97544d99de6ab377ecbb9bbb6427f1e7c35c35 Author: Werner Koch Date: Wed Jun 29 10:40:57 2011 +0200 Implement the --debug option for the keygrip test. diff --git a/tests/keygrip.c b/tests/keygrip.c index adc72e7..a496ca2 100644 --- a/tests/keygrip.c +++ b/tests/keygrip.c @@ -239,6 +239,9 @@ main (int argc, char **argv) gcry_set_progress_handler (progress_handler, NULL); gcry_control (GCRYCTL_DISABLE_SECMEM, 0); + gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); + if (debug) + gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0); check (); ----------------------------------------------------------------------- Summary of changes: AUTHORS | 2 +- ChangeLog | 11 ++- NEWS | 34 +++-- README | 9 +- THANKS | 6 +- config.guess | 467 ++++++++++++++++++++++++++++--------------------------- config.sub | 258 +++++++++++++++++++++++-------- configure.ac | 7 +- doc/gcrypt.texi | 14 ++- tests/keygrip.c | 3 + 10 files changed, 480 insertions(+), 331 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 12:16:28 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 12:16:28 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-1-gf435ff2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via f435ff2371ffddc4a6100bbab0876006b3db2e88 (commit) from a31c067c10a9232049592fb6322505995653119c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f435ff2371ffddc4a6100bbab0876006b3db2e88 Author: Werner Koch Date: Wed Jun 29 11:40:39 2011 +0200 Post release updates diff --git a/NEWS b/NEWS index 32fb6de..ef60f62 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +Noteworthy changes in version 1.5.1 (unreleased) +------------------------------------------------ + Noteworthy changes in version 1.5.0 (2011-06-29) ------------------------------------------------ diff --git a/configure.ac b/configure.ac index 75e5a52..7b413f9 100644 --- a/configure.ac +++ b/configure.ac @@ -26,8 +26,8 @@ min_automake_version="1.10" # Remember to change the version number immediately *after* a release. # Set my_issvn to "yes" for non-released code. Remember to run an # "svn up" and "autogen.sh" right before creating a distribution. -m4_define([my_version], [1.5.0]) -m4_define([my_issvn], [no]) +m4_define([my_version], [1.5.1]) +m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ configure.ac | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 13:15:16 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 13:15:16 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1-5-BRANCH, created. libgcrypt-1.5.0-1-gf435ff2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1-5-BRANCH has been created at f435ff2371ffddc4a6100bbab0876006b3db2e88 (commit) - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 13:19:16 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 13:19:16 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1-5-BRANCH, updated. libgcrypt-1.5.0-2-g09d7180 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1-5-BRANCH has been updated via 09d718069ad4438d665f9a176a702a84b9abb290 (commit) from f435ff2371ffddc4a6100bbab0876006b3db2e88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 09d718069ad4438d665f9a176a702a84b9abb290 Author: Werner Koch Date: Wed Jun 29 12:42:52 2011 +0200 Add a comment to not update the SO number. diff --git a/configure.ac b/configure.ac index 7b413f9..546dab7 100644 --- a/configure.ac +++ b/configure.ac @@ -41,6 +41,8 @@ AC_INIT([libgcrypt], # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) # (Interfaces added: CURRENT++, AGE++, REVISION=0) # (No interfaces changed: REVISION++) +# NOTE: This is a stable branch, thus you may only bump up REVISION +# unless you coordinate with the development branch. LIBGCRYPT_LT_CURRENT=18 LIBGCRYPT_LT_AGE=7 LIBGCRYPT_LT_REVISION=0 ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 13:23:20 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 13:23:20 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-2-gea2b4d6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via ea2b4d6653b7e3f483582ee5bf1dc7de2cb0a3f9 (commit) from f435ff2371ffddc4a6100bbab0876006b3db2e88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ea2b4d6653b7e3f483582ee5bf1dc7de2cb0a3f9 Author: Werner Koch Date: Wed Jun 29 12:47:26 2011 +0200 Prepare a new development branch diff --git a/NEWS b/NEWS index ef60f62..0a01c32 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ -Noteworthy changes in version 1.5.1 (unreleased) +Noteworthy changes in version 1.6.0 (unreleased) ------------------------------------------------ + * Interface changes relative to the 1.5.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Noteworthy changes in version 1.5.0 (2011-06-29) ------------------------------------------------ diff --git a/README b/README index a3abfa1..bbbd0db 100644 --- a/README +++ b/README @@ -1,6 +1,8 @@ Libgcrypt - The GNU Crypto Library ------------------------------------ - Version 1.5 + Version 1.6 + + !!! THIS IS A DEVELOPMENT VERSION VERSION !!! Copyright 2000, 2002, 2003, 2004, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. diff --git a/configure.ac b/configure.ac index 7b413f9..1d0dc0f 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ min_automake_version="1.10" # Remember to change the version number immediately *after* a release. # Set my_issvn to "yes" for non-released code. Remember to run an # "svn up" and "autogen.sh" right before creating a distribution. -m4_define([my_version], [1.5.1]) +m4_define([my_version], [1.6.0]) m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ @@ -41,6 +41,8 @@ AC_INIT([libgcrypt], # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) # (Interfaces added: CURRENT++, AGE++, REVISION=0) # (No interfaces changed: REVISION++) +# Note: To avoid LT version number clashes with the 1.5 branch please +# make sure to update current and age beore releasing anything. LIBGCRYPT_LT_CURRENT=18 LIBGCRYPT_LT_AGE=7 LIBGCRYPT_LT_REVISION=0 ----------------------------------------------------------------------- Summary of changes: NEWS | 6 +++++- README | 4 +++- configure.ac | 4 +++- 3 files changed, 11 insertions(+), 3 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 14:00:46 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 14:00:46 +0200 Subject: [git] GnuPG - branch, master, updated. post-nuke-of-trailing-ws-72-g92e66c7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 92e66c70b64283cba2442ee0ca1268abecf7e107 (commit) via 137e3a0fbcdc579b56860651a9b5554f9449ed1e (commit) from c9e473618fd32c9f337aae031b8d3f93e04b304d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 92e66c70b64283cba2442ee0ca1268abecf7e107 Author: Werner Koch Date: Wed Jun 29 13:23:41 2011 +0200 Document OPTION s2k-count diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi index e965c52..84486cf 100644 --- a/doc/gpg-agent.texi +++ b/doc/gpg-agent.texi @@ -1354,6 +1354,14 @@ This option sets the cache TTL for new entries created by GENKEY and PASSWD commands when using the @option{--preset} option. It it is not used a default value is used. + at item s2k-count +Instead of using the standard S2K counted (which is computed on the +fly), the given S2K count is used for new keys or when changing the +passphrase of a key. Values below 65536 are considered to be 0. This +option is valid for the entire session or until reset to 0. This +option is useful if the key is later used on boxes which are either +much slower or faster than the actual box. + @end table commit 137e3a0fbcdc579b56860651a9b5554f9449ed1e Author: Ben Kibbey Date: Tue Jun 28 20:35:13 2011 -0400 Added gpg-agent OPTION "s2k-count". When unset or 0, the calibrated count will be used. diff --git a/agent/ChangeLog b/agent/ChangeLog index 156fbdb..3234aae 100644 --- a/agent/ChangeLog +++ b/agent/ChangeLog @@ -1,3 +1,11 @@ +2011-06-28 Ben Kibbey + + * command.c (option_handler): Add option s2k-count. + * agent.h (server_control_s): Add member s2k_count. + * genkey.c (store_key): Add parameter s2k_count. + * protect.c (agent_protect): Add parameter s2k_count. + * protect.c (do_encryption): Add parameter s2k_count. + 2011-06-01 Marcus Brinkmann * cvt-openpgp.c (convert_to_openpgp): Change type of N to unsigned diff --git a/agent/agent.h b/agent/agent.h index 9aaf264..dfc82ec 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -181,6 +181,8 @@ struct server_control_s PKSIGN command to the scdaemon. */ int in_passwd; /* Hack to inhibit enforced passphrase change during an explicit passwd command. */ + + unsigned long s2k_count; /* Other than the calibrated count. */ }; @@ -332,7 +334,8 @@ gpg_error_t agent_protect_and_store (ctrl_t ctrl, gcry_sexp_t s_skey, unsigned long get_standard_s2k_count (void); unsigned char get_standard_s2k_count_rfc4880 (void); int agent_protect (const unsigned char *plainkey, const char *passphrase, - unsigned char **result, size_t *resultlen); + unsigned char **result, size_t *resultlen, + unsigned long s2k_count); int agent_unprotect (const unsigned char *protectedkey, const char *passphrase, gnupg_isotime_t protected_at, unsigned char **result, size_t *resultlen); diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 8603a53..e3a0410 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -2341,7 +2341,7 @@ ssh_key_to_protected_buffer (gcry_sexp_t key, const char *passphrase, gcry_sexp_sprint (key, GCRYSEXP_FMT_CANON, buffer_new, buffer_new_n); /* FIXME: guarantee? */ - err = agent_protect (buffer_new, passphrase, buffer, buffer_n); + err = agent_protect (buffer_new, passphrase, buffer, buffer_n, 0); out: diff --git a/agent/command.c b/agent/command.c index 62bf145..d1f6fb9 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1866,7 +1866,8 @@ cmd_import_key (assuan_context_t ctx, char *line) if (passphrase) { - err = agent_protect (key, passphrase, &finalkey, &finalkeylen); + err = agent_protect (key, passphrase, &finalkey, &finalkeylen, + ctrl->s2k_count); if (!err) err = agent_write_private_key (grip, finalkey, finalkeylen, 0); } @@ -2474,6 +2475,14 @@ option_handler (assuan_context_t ctx, const char *key, const char *value) { ctrl->cache_ttl_opt_preset = *value? atoi (value) : 0; } + else if (!strcmp (key, "s2k-count")) + { + ctrl->s2k_count = *value? strtoul(value, NULL, 10) : 0; + if (ctrl->s2k_count && ctrl->s2k_count < 65536) { + ctrl->s2k_count = 0; + err = gpg_error (GPG_ERR_INV_VALUE); + } + } else err = gpg_error (GPG_ERR_UNKNOWN_OPTION); diff --git a/agent/genkey.c b/agent/genkey.c index 79b99e6..e01a7bc 100644 --- a/agent/genkey.c +++ b/agent/genkey.c @@ -31,7 +31,8 @@ #include "sysutils.h" static int -store_key (gcry_sexp_t private, const char *passphrase, int force) +store_key (gcry_sexp_t private, const char *passphrase, int force, + unsigned long s2k_count) { int rc; unsigned char *buf; @@ -56,7 +57,7 @@ store_key (gcry_sexp_t private, const char *passphrase, int force) { unsigned char *p; - rc = agent_protect (buf, passphrase, &p, &len); + rc = agent_protect (buf, passphrase, &p, &len, s2k_count); if (rc) { xfree (buf); @@ -420,7 +421,7 @@ agent_genkey (ctrl_t ctrl, const char *cache_nonce, /* store the secret key */ if (DBG_CRYPTO) log_debug ("storing private key\n"); - rc = store_key (s_private, passphrase, 0); + rc = store_key (s_private, passphrase, 0, ctrl->s2k_count); if (!rc) { if (!cache_nonce) @@ -492,7 +493,8 @@ agent_protect_and_store (ctrl_t ctrl, gcry_sexp_t s_skey, if (passphrase_addr && *passphrase_addr) { /* Take an empty string as request not to protect the key. */ - err = store_key (s_skey, **passphrase_addr? *passphrase_addr:NULL, 1); + err = store_key (s_skey, **passphrase_addr? *passphrase_addr:NULL, 1, + ctrl->s2k_count); } else { @@ -507,7 +509,7 @@ agent_protect_and_store (ctrl_t ctrl, gcry_sexp_t s_skey, _("Please enter the new passphrase"), &pass); if (!err) - err = store_key (s_skey, pass, 1); + err = store_key (s_skey, pass, 1, ctrl->s2k_count); if (!err && passphrase_addr) *passphrase_addr = pass; else diff --git a/agent/protect-tool.c b/agent/protect-tool.c index 512019b..a253143 100644 --- a/agent/protect-tool.c +++ b/agent/protect-tool.c @@ -333,7 +333,7 @@ read_and_protect (const char *fname) return; pw = get_passphrase (1); - rc = agent_protect (key, pw, &result, &resultlen); + rc = agent_protect (key, pw, &result, &resultlen, 0); release_passphrase (pw); xfree (key); if (rc) diff --git a/agent/protect.c b/agent/protect.c index 7df82de..64af4ed 100644 --- a/agent/protect.c +++ b/agent/protect.c @@ -309,7 +309,8 @@ calculate_mic (const unsigned char *plainkey, unsigned char *sha1hash) static int do_encryption (const unsigned char *protbegin, size_t protlen, const char *passphrase, const unsigned char *sha1hash, - unsigned char **result, size_t *resultlen) + unsigned char **result, size_t *resultlen, + unsigned long s2k_count) { gcry_cipher_hd_t hd; const char *modestr = "openpgp-s2k3-sha1-" PROT_CIPHER_STRING "-cbc"; @@ -368,7 +369,8 @@ do_encryption (const unsigned char *protbegin, size_t protlen, { rc = hash_passphrase (passphrase, GCRY_MD_SHA1, 3, iv+2*blklen, - get_standard_s2k_count (), key, keylen); + s2k_count ? s2k_count : get_standard_s2k_count(), + key, keylen); if (!rc) rc = gcry_cipher_setkey (hd, key, keylen); xfree (key); @@ -411,7 +413,8 @@ do_encryption (const unsigned char *protbegin, size_t protlen, { char countbuf[35]; - snprintf (countbuf, sizeof countbuf, "%lu", get_standard_s2k_count ()); + snprintf (countbuf, sizeof countbuf, "%lu", + s2k_count ? s2k_count : get_standard_s2k_count ()); p = xtryasprintf ("(9:protected%d:%s((4:sha18:%n_8bytes_%u:%s)%d:%n%*s)%d:%n%*s)", (int)strlen (modestr), modestr, @@ -443,7 +446,8 @@ do_encryption (const unsigned char *protbegin, size_t protlen, a valid S-Exp here. */ int agent_protect (const unsigned char *plainkey, const char *passphrase, - unsigned char **result, size_t *resultlen) + unsigned char **result, size_t *resultlen, + unsigned long s2k_count) { int rc; const unsigned char *s; @@ -544,7 +548,7 @@ agent_protect (const unsigned char *plainkey, const char *passphrase, rc = do_encryption (prot_begin, prot_end - prot_begin + 1, passphrase, hashvalue, - &protected, &protectedlen); + &protected, &protectedlen, s2k_count); if (rc) return rc; diff --git a/agent/t-protect.c b/agent/t-protect.c index a14e5e1..4b6e0b4 100644 --- a/agent/t-protect.c +++ b/agent/t-protect.c @@ -174,7 +174,7 @@ test_agent_protect (void) { ret = agent_protect ((const unsigned char*)specs[i].key, specs[i].passphrase, - &specs[i].result, &specs[i].resultlen); + &specs[i].result, &specs[i].resultlen, 0); if (gpg_err_code (ret) != specs[i].ret_expected) { printf ("agent_protect() returned `%i/%s'; expected `%i/%s'\n", ----------------------------------------------------------------------- Summary of changes: agent/ChangeLog | 8 ++++++++ agent/agent.h | 5 ++++- agent/command-ssh.c | 2 +- agent/command.c | 11 ++++++++++- agent/genkey.c | 12 +++++++----- agent/protect-tool.c | 2 +- agent/protect.c | 14 +++++++++----- agent/t-protect.c | 2 +- doc/gpg-agent.texi | 8 ++++++++ 9 files changed, 49 insertions(+), 15 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 16:08:13 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 16:08:13 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-3-g7cae9fd Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 7cae9fdfc9e322941545a3a2128a5ead1010a6cf (commit) from ea2b4d6653b7e3f483582ee5bf1dc7de2cb0a3f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7cae9fdfc9e322941545a3a2128a5ead1010a6cf Author: Werner Koch Date: Wed Jun 29 15:26:22 2011 +0200 Fixed a bug in the gcry_cipher_get_algo_keylen and gcry_cipher_get_algo_blklen Contrary to the documentation those functions aborted if an invalid algorithm was passed. The same happened for the corresponding subcommands of gcry_cipher_algo_info. diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 16632f0..f061d01 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,8 @@ +2011-06-29 Werner Koch + + * cipher.c (cipher_get_keylen): Return zero for an invalid algorithm. + (cipher_get_blocksize): Ditto. + 2011-06-13 Werner Koch * dsa.c (selftest_sign_1024): Use the raw and not the pkcs1 flag. diff --git a/cipher/cipher.c b/cipher/cipher.c index b0a532a..b99ab41 100644 --- a/cipher/cipher.c +++ b/cipher/cipher.c @@ -1,6 +1,6 @@ /* cipher.c - cipher dispatcher * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 - * 2005, 2007, 2008, 2009 Free Software Foundation, Inc. + * 2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -610,10 +610,8 @@ check_cipher_algo (int algorithm) } -/* Return the standard length of the key for the cipher algorithm with - the identifier ALGORITHM. This function expects a valid algorithm - and will abort if the algorithm is not available or the length of - the key is not known. */ +/* Return the standard length in bits of the key for the cipher + algorithm with the identifier ALGORITHM. */ static unsigned int cipher_get_keylen (int algorithm) { @@ -631,17 +629,13 @@ cipher_get_keylen (int algorithm) log_bug ("cipher %d w/o key length\n", algorithm); _gcry_module_release (cipher); } - else - log_bug ("cipher %d not found\n", algorithm); ath_mutex_unlock (&ciphers_registered_lock); return len; } /* Return the block length of the cipher algorithm with the identifier - ALGORITHM. This function expects a valid algorithm and will abort - if the algorithm is not available or the length of the key is not - known. */ + ALGORITHM. This function return 0 for an invalid algorithm. */ static unsigned int cipher_get_blocksize (int algorithm) { @@ -659,8 +653,6 @@ cipher_get_blocksize (int algorithm) log_bug ("cipher %d w/o blocksize\n", algorithm); _gcry_module_release (cipher); } - else - log_bug ("cipher %d not found\n", algorithm); ath_mutex_unlock (&ciphers_registered_lock); return len; @@ -2084,8 +2076,7 @@ gcry_cipher_algo_info (int algo, int what, void *buffer, size_t *nbytes) if ((ui > 0) && (ui <= 512)) *nbytes = (size_t) ui / 8; else - /* The only reason is an invalid algo or a strange - blocksize. */ + /* The only reason for an error is an invalid algo. */ err = GPG_ERR_CIPHER_ALGO; } break; diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index e172ca8..1f5e6e1 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -1891,11 +1891,15 @@ Here is a list of supported codes for @var{what}: Return the length of the key. If the algorithm supports multiple key lengths, the maximum supported value is returned. The length is returned as number of octets (bytes) and not as number of bits in - at var{nbytes}; @var{buffer} must be zero. + at var{nbytes}; @var{buffer} must be zero. Note that it is usually +better to use the convenience function + at code{gcry_cipher_get_algo_keylen}. @item GCRYCTL_GET_BLKLEN: Return the block length of the algorithm. The length is returned as a -number of octets in @var{nbytes}; @var{buffer} must be zero. +number of octets in @var{nbytes}; @var{buffer} must be zero. Note +that it is usually better to use the convenience function + at code{gcry_cipher_get_algo_blklen}. @item GCRYCTL_TEST_ALGO: Returns @code{0} when the specified algorithm is available for use. @@ -1907,6 +1911,31 @@ Returns @code{0} when the specified algorithm is available for use. @end deftypefun @c end gcry_cipher_algo_info + at deftypefun size_t gcry_cipher_get_algo_keylen (@var{algo}) + +This function returns length of the key for algorithm @var{algo}. If +the algorithm supports multiple key lengths, the maximum supported key +length is returned. On error @code{0} is returned. The key length is +returned as number of octets. + +This is a convenience functions which should be preferred over + at code{gcry_cipher_algo_info} because it allows for proper type +checking. + at end deftypefun + at c end gcry_cipher_get_algo_keylen + + at deftypefun size_t gcry_cipher_get_algo_blklen (int @var{algo}) + +This functions returns the blocklength of the algorithm @var{algo} +counted in octets. On error @code{0} is returned. + +This is a convenience functions which should be preferred over + at code{gcry_cipher_algo_info} because it allows for proper type +checking. + at end deftypefun + at c end gcry_cipher_get_algo_blklen + + @deftypefun {const char *} gcry_cipher_algo_name (int @var{algo}) @code{gcry_cipher_algo_name} returns a string with the name of the diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index f67c19a..63f71c0 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -941,7 +941,7 @@ gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t hd, gpg_error_t gcry_cipher_setctr (gcry_cipher_hd_t hd, const void *ctr, size_t ctrlen); -/* Retrieved the key length in bytes used with algorithm A. */ +/* Retrieve the key length in bytes used with algorithm A. */ size_t gcry_cipher_get_algo_keylen (int algo); /* Retrieve the block length in bytes used with algorithm A. */ ----------------------------------------------------------------------- Summary of changes: cipher/ChangeLog | 5 +++++ cipher/cipher.c | 19 +++++-------------- doc/gcrypt.texi | 33 +++++++++++++++++++++++++++++++-- src/gcrypt.h.in | 2 +- 4 files changed, 42 insertions(+), 17 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 29 16:14:40 2011 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 29 Jun 2011 16:14:40 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1-5-BRANCH, updated. libgcrypt-1.5.0-3-g674f10d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1-5-BRANCH has been updated via 674f10dba527f8c50af028c97cf046e16bc4e6fb (commit) from 09d718069ad4438d665f9a176a702a84b9abb290 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 674f10dba527f8c50af028c97cf046e16bc4e6fb Author: Werner Koch Date: Wed Jun 29 15:26:22 2011 +0200 Fixed a bug in the gcry_cipher_get_algo_keylen and gcry_cipher_get_algo_blklen Contrary to the documentation those functions aborted if an invalid algorithm was passed. The same happened for the corresponding subcommands of gcry_cipher_algo_info. diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 16632f0..f061d01 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,8 @@ +2011-06-29 Werner Koch + + * cipher.c (cipher_get_keylen): Return zero for an invalid algorithm. + (cipher_get_blocksize): Ditto. + 2011-06-13 Werner Koch * dsa.c (selftest_sign_1024): Use the raw and not the pkcs1 flag. diff --git a/cipher/cipher.c b/cipher/cipher.c index b0a532a..b99ab41 100644 --- a/cipher/cipher.c +++ b/cipher/cipher.c @@ -1,6 +1,6 @@ /* cipher.c - cipher dispatcher * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 - * 2005, 2007, 2008, 2009 Free Software Foundation, Inc. + * 2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -610,10 +610,8 @@ check_cipher_algo (int algorithm) } -/* Return the standard length of the key for the cipher algorithm with - the identifier ALGORITHM. This function expects a valid algorithm - and will abort if the algorithm is not available or the length of - the key is not known. */ +/* Return the standard length in bits of the key for the cipher + algorithm with the identifier ALGORITHM. */ static unsigned int cipher_get_keylen (int algorithm) { @@ -631,17 +629,13 @@ cipher_get_keylen (int algorithm) log_bug ("cipher %d w/o key length\n", algorithm); _gcry_module_release (cipher); } - else - log_bug ("cipher %d not found\n", algorithm); ath_mutex_unlock (&ciphers_registered_lock); return len; } /* Return the block length of the cipher algorithm with the identifier - ALGORITHM. This function expects a valid algorithm and will abort - if the algorithm is not available or the length of the key is not - known. */ + ALGORITHM. This function return 0 for an invalid algorithm. */ static unsigned int cipher_get_blocksize (int algorithm) { @@ -659,8 +653,6 @@ cipher_get_blocksize (int algorithm) log_bug ("cipher %d w/o blocksize\n", algorithm); _gcry_module_release (cipher); } - else - log_bug ("cipher %d not found\n", algorithm); ath_mutex_unlock (&ciphers_registered_lock); return len; @@ -2084,8 +2076,7 @@ gcry_cipher_algo_info (int algo, int what, void *buffer, size_t *nbytes) if ((ui > 0) && (ui <= 512)) *nbytes = (size_t) ui / 8; else - /* The only reason is an invalid algo or a strange - blocksize. */ + /* The only reason for an error is an invalid algo. */ err = GPG_ERR_CIPHER_ALGO; } break; diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index e172ca8..1f5e6e1 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -1891,11 +1891,15 @@ Here is a list of supported codes for @var{what}: Return the length of the key. If the algorithm supports multiple key lengths, the maximum supported value is returned. The length is returned as number of octets (bytes) and not as number of bits in - at var{nbytes}; @var{buffer} must be zero. + at var{nbytes}; @var{buffer} must be zero. Note that it is usually +better to use the convenience function + at code{gcry_cipher_get_algo_keylen}. @item GCRYCTL_GET_BLKLEN: Return the block length of the algorithm. The length is returned as a -number of octets in @var{nbytes}; @var{buffer} must be zero. +number of octets in @var{nbytes}; @var{buffer} must be zero. Note +that it is usually better to use the convenience function + at code{gcry_cipher_get_algo_blklen}. @item GCRYCTL_TEST_ALGO: Returns @code{0} when the specified algorithm is available for use. @@ -1907,6 +1911,31 @@ Returns @code{0} when the specified algorithm is available for use. @end deftypefun @c end gcry_cipher_algo_info + at deftypefun size_t gcry_cipher_get_algo_keylen (@var{algo}) + +This function returns length of the key for algorithm @var{algo}. If +the algorithm supports multiple key lengths, the maximum supported key +length is returned. On error @code{0} is returned. The key length is +returned as number of octets. + +This is a convenience functions which should be preferred over + at code{gcry_cipher_algo_info} because it allows for proper type +checking. + at end deftypefun + at c end gcry_cipher_get_algo_keylen + + at deftypefun size_t gcry_cipher_get_algo_blklen (int @var{algo}) + +This functions returns the blocklength of the algorithm @var{algo} +counted in octets. On error @code{0} is returned. + +This is a convenience functions which should be preferred over + at code{gcry_cipher_algo_info} because it allows for proper type +checking. + at end deftypefun + at c end gcry_cipher_get_algo_blklen + + @deftypefun {const char *} gcry_cipher_algo_name (int @var{algo}) @code{gcry_cipher_algo_name} returns a string with the name of the diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index f67c19a..63f71c0 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -941,7 +941,7 @@ gcry_error_t gcry_cipher_setiv (gcry_cipher_hd_t hd, gpg_error_t gcry_cipher_setctr (gcry_cipher_hd_t hd, const void *ctr, size_t ctrlen); -/* Retrieved the key length in bytes used with algorithm A. */ +/* Retrieve the key length in bytes used with algorithm A. */ size_t gcry_cipher_get_algo_keylen (int algo); /* Retrieve the block length in bytes used with algorithm A. */ ----------------------------------------------------------------------- Summary of changes: cipher/ChangeLog | 5 +++++ cipher/cipher.c | 19 +++++-------------- doc/gcrypt.texi | 33 +++++++++++++++++++++++++++++++-- src/gcrypt.h.in | 2 +- 4 files changed, 42 insertions(+), 17 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org