aboutsummaryrefslogtreecommitdiffstats
path: root/sm/certdump.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-03-16gpgsm: New option --no-pretty-dnWerner Koch1-1/+8
* sm/gpgsm.c (oNoPrettyDN): New. (opts): Add --no-pretty-dn. (main): Implement. * sm/gpgsm.h (opt): Add no_pretty_dn. * sm/certdump.c (gpgsm_es_print_name): Act upon.
2021-09-09sm: Add LotW support to the key listingWerner Koch1-1/+2
* sm/certdump.c (parse_dn_part): Translate OID to "Callsign" * sm/keylist.c (oidtranstbl): Some more OIDs. -- This is Ham thingy to make it easier to read LotW certificates. Signed-off-by: Werner Koch <[email protected]>
2021-01-19Require Libgcrypt 1.9Werner Koch1-11/+0
* configure.ac: Require at least Libgcrypt 1.9.0. Remove all GCRYPT_VERSION_NUMBER dependent code. -- Only Libgcrypt 1.9 implements EAX which is a mandatory algorithm in RFC4880bis. Signed-off-by: Werner Koch <[email protected]>
2020-08-28sm: Fix a bug in the rfc2253 parserWerner Koch1-1/+1
* sm/certdump.c (parse_dn_part): Fix parser flaw. -- This could in theory result in reading bytes after a after Nul in a string and thus possible segv on unallocated memory or reading other parts of the memory. However, it is harmless because the rfc2253 strings have been constructed by libksba. GnuPG-bug-id: 5037 Signed-off-by: Werner Koch <[email protected]>
2020-07-08gpgsm: Replace all assert calls by log_assert.Werner Koch1-3/+2
-- Signed-off-by: Werner Koch <[email protected]>
2020-06-26sm: Print the serial number of a cert also in decimal.Werner Koch1-1/+80
* sm/certdump.c: Include membuf.h. (gpgsm_print_serial_decimal): New. * sm/keylist.c (list_cert_raw): Print s/n also in decimal (list_cert_std): Ditto. -- Many CA's print the serial number in decimal on their cards. Signed-off-by: Werner Koch <[email protected]>
2020-05-13sm: Support import and verification of EdDSA certificates.Werner Koch1-0/+22
* sm/certdump.c (gpgsm_get_serial): New. * sm/certcheck.c (gpgsm_check_cert_sig): Support EdDSA signatures. -- Note that this does not work with the self-signed RFC-8410 sample certificate; see the code for comments. The Ed488 case has not been tested due to a lack of support in Libgcrypt. Signed-off-by: Werner Koch <[email protected]>
2020-04-01sm: Fix a warning in an es_fopencooie function.Werner Koch1-0/+4
* sm/certdump.c (format_name_writer): Take care of a flush request. -- We won't see a flush here so that fix does not solve a real bug but we want to be correct. Note that this function seems to predate the es_fopenmem function and thus in master (2.3) we should replace it entirely. GnuPG-bug-id: 4495 Signed-off-by: Werner Koch <[email protected]> (cherry picked from 2.2 commit 8d0d61aca3d2713df8a33444af3658b859d72be8)
2017-11-27Use the gpgrt log functions if possible.Werner Koch1-1/+1
* common/logging.c: Do not build any code if we can use the gpgrt_log functions. (log_logv_with_prefix): Rename to log_logv_prefix and change order of args so that this function matches its printf like counterpart gpgrt_logv_prefix. Change all callers. (log_debug_with_string): Rename to log_debug_string. Change all callers. (log_printhex): Move first arg to end so that this function matches its printf like counterpart gpgrt_log_printhex. Change all callers. * common/logging.h: Divert to gpgrt/libgpg-error if we can use the gpgrt_log functions. (bug_at): Add inline versions if we can use the gpgrt_log functions. * configure.ac (GPGRT_ENABLE_LOG_MACROS): Add to AH_BOTTOM. (mycflags): Add -Wno-format-zero-length. -- This patch enables the use of the log function from libgpgrt (aka libgpg-error). Instead of checking a version number, we enable them depending on macros set by recent gpg-error versions. Eventually the whole divert stuff can be removed. The -Wno-format-zero-length is required because log_printhex can be called with an empty format string. Note that this is fully specified standard C behaviour. Signed-off-by: Werner Koch <[email protected]>
2017-03-07Remove -I option to common.NIIBE Yutaka1-1/+1
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2017-02-21Clean up word replication.Yuri Chornoivan1-1/+1
-- This fixes extra word repetitions (like "the the" or "is is") in the code and docs. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2017-02-20Adjust copyright years for sm/certdump.cWerner Koch1-1/+1
-- These are the years actual code changes happened. The changes were all done by g10 Code employees. Signed-off-by: Werner Koch <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2015-11-27Avoid incompatible pointer assignment warnings on Windows.Werner Koch1-2/+2
* common/logging.c (fun_writer): Use gpgrt_ssize_t instead of ssize_t. * dirmngr/server.c (data_line_cookie_write): Ditto. * sm/certdump.c (format_name_writer): Ditto. * sm/server.c (data_line_cookie_write): Ditto. * dirmngr/http.c (cookie_read, cookie_write): Ditto. -- See the release notes of libgpg-error 1.15 for background info on gpgrt_ssize_t. Signed-off-by: Werner Koch <[email protected]>
2015-01-28gpg: Fix buffering problem in --list-config.Werner Koch1-125/+12
* g10/gpg.c (list_config): Replace print_sanitized_string2 by es_write_sanitized. * common/stringhelp.c (print_sanitized_buffer2): Remove. (print_sanitized_buffer, print_sanitized_utf8_buffer): Remove. (print_sanitized_utf8_buffer, print_sanitized_utf8_string): Remove. (print_sanitized_string): Remove. * sm/certdump.c (print_dn_part, print_dn_parts): Remove arg FP. (pretty_print_sexp, gpgsm_print_name2, gpgsm_print_name): Remove. -- Mixing stdio and estream is never a good idea. This fix also allows us to remove a lot of garbage. Reported-by: Jason A. Donenfeld <[email protected]> GnuPG-bug-id: 1822 Signed-off-by: Werner Koch <[email protected]>
2014-08-26Switch to the libgpg-error provided estream.Werner Koch1-5/+3
* configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14. (GPGRT_ENABLE_ES_MACROS): Define. (estream_INIT): Remove. * m4/estream.m4: Remove. * common/estream-printf.c, common/estream-printf.h: Remove. * common/estream.c, common/estream.h: Remove. * common/init.c (_init_common_subsystems): Call gpgrt initialization.
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-1/+1
The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-24/+23
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2010-03-24More changes for CE. gpgsm does now build and run a keylisting.Werner Koch1-5/+5
2009-03-25Print NO_SECKEY status line in gpgsm.Werner Koch1-1/+1
This fixes bug#1020.
2009-03-16Remove duplicated code.Werner Koch1-15/+2
2008-12-05Add a custom prompt for the CSR generation.Werner Koch1-28/+3
Add a new percent escape fucntion.
2008-10-28Remove debug code.Werner Koch1-3/+0
2008-10-28fixed a bug in the prompt formatter.Werner Koch1-58/+70
2008-09-23Support the Certifciate DO of the v2 OpenPGP cards.Werner Koch1-1/+1
2008-09-04Workaround for a mingw runtime bug.Werner Koch1-1/+7
2008-03-20Fix a bug in the ambigious name detection.Werner Koch1-3/+6
Minor cleanups.
2008-03-13Fixed an email/DN bug.Werner Koch1-6/+13
Changed pinentry prompts.
2007-11-19Started to implement the audit log feature.Werner Koch1-0/+33
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
2007-10-19Factored utf8 switching code out to i18n.c.Werner Koch1-32/+3
2007-08-10Implemented the chain model for X.509 validation.Werner Koch1-3/+3
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-06-06First steps towards supporting W32.Werner Koch1-0/+5
This is mainly source code reorganization. Update gnulib. g10/ does currently not build.
2007-05-18agent/Marcus Brinkmann1-3/+8
2007-05-19 Marcus Brinkmann <[email protected]> * protect-tool.c (get_passphrase): Free ORIG_CODESET on error. g10/ 2007-05-19 Marcus Brinkmann <[email protected]> * passphrase.c (passphrase_get): Free ORIG_CODESET on error. sm/ 2007-05-18 Marcus Brinkmann <[email protected]> * qualified.c (gpgsm_qualified_consent, gpgsm_not_qualified_warning): Free ORIG_CODESET on error. * certdump.c (gpgsm_format_keydesc): Likewise. tools/ 2007-05-19 Marcus Brinkmann <[email protected]> * symcryptrun.c (confucius_get_pass): Free ORIG_CODESET on error.
2007-03-19Changes to let the key listing use estream to help systems withoutWerner Koch1-22/+134
funopen.
2006-11-28Preparing 2.0.1Werner Koch1-1/+1
2006-11-21No more warnings for AMD64 (at least when cross-compiling). Thus tehre is aWerner Koch1-1/+8
good chance that gpg2 will now work. Other cleanups. Updated gettext.
2006-11-14sm/Werner Koch1-0/+54
* server.c (skip_options): Skip leading spaces. (has_option): Honor "--". (cmd_export): Add option --data to do an inline export. Skip all options. * certdump.c (gpgsm_fpr_and_name_for_status): New. * verify.c (gpgsm_verify): Use it to print correct status messages. doc/ * gpgsm.texi (GPGSM EXPORT): Document changes.
2006-06-27Various smaller changesWerner Koch1-0/+30
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2005-11-13Added qualified signature features.Werner Koch1-3/+50
2005-07-27Removed directories which are only used by the 1.9 branchWerner Koch1-457/+0
2005-07-20* keylist.c (email_kludge): Reworked.Werner Koch1-2/+2
* certdump.c (gpgsm_print_serial, gpgsm_dump_serial): Cast printf arg to unsigned. * call-dirmngr.c (gpgsm_dirmngr_run_command): Ditto
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-13/+15
char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
2005-04-18* configure.ac: Require libksba 0.9.11.Werner Koch1-0/+1
sm/ * call-dirmngr.c (inq_certificate): Add new inquire SENDCERT_SKI. * certlist.c (gpgsm_find_cert): Add new arg KEYID and implement this filter. Changed all callers. * certchain.c (find_up_search_by_keyid): New helper. (find_up): Also try using the AKI.keyIdentifier. (find_up_external): Ditto.
2004-09-30* gpgv.c (i18n_init): Always use LC_ALL.Werner Koch1-12/+34
* kbxutil.c (i18n_init): Always use LC_ALL. * gpgsm.c (i18n_init): Always use LC_ALL. * certdump.c (gpgsm_format_name): Factored code out to .. (gpgsm_format_name2): .. new. (gpgsm_print_name): Factored code out to .. (gpgsm_print_name2): .. new. (print_dn_part): New arg TRANSLATE. Changed all callers. (print_dn_parts): Ditto. (gpgsm_format_keydesc): Do not translate the SUBJECT; we require it to stay UTF-8 but we still want to filter out bad control characters. * gpgconf.c (i18n_init): Always use LC_ALL.
2004-09-30spelling fixWerner Koch1-1/+4
2004-04-22(main): New commands --dump-keys, --dump-external-keys,Werner Koch1-0/+1
--dump-secret-keys.
2004-04-06* configure.ac: Require libgcrypt 1.1.94.Werner Koch1-3/+3
Introduce PACKAGE_GT and set it to gnupg2. * gpg-agent.c (main): Use new libgcrypt thread library register scheme. * Makevars (DOMAIN): Init from PACKAGE_GT
2004-03-06Preparing for a releaseWerner Koch1-2/+35