Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openpgp-tool extensions & fixes #1363

Closed
wants to merge 8 commits into from
Closed

Conversation

marschap
Copy link
Contributor

Hi,

the attached commits fix a few annoyances in openpgp-tool and a new option --card-info to display information on the card.

It has been tested with

  • Zeitcontrol OpenPGP card v2.0
  • Zeitcontrol OpenPGP card v3.3
  • Yubikey NEO
Checklist
  • Documentation is added or updated

static char *prettify_serialnumber(void *ptr);
static char *prettify_name(void *ptr);
static char *prettify_language(void *ptr);
static char *prettify_gender(void *ptr);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why you're removing explicit typing and use void *ptr instead. I don't see a real advantage and I fear this could lead to more problems.

char *(*prettify_value)(char *);
enum code_types type;
size_t offset;
size_t length; /* 0 <=> potentially infinite */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who is doing the length check?

@@ -216,28 +312,87 @@ static char *prettify_gender(char *str)
}


static void display_data(const struct ef_name_map *mapping, char *value)
static char *bin_to_hex(char *str, const u8 *data, size_t count, int indent)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use sc_hex_dump()

@marschap
Copy link
Contributor Author

Need to close this one for now, as it would create conflicts with #1372.
Will re-open another one that addresses the topics raised after #1372 has been merged.

@marschap marschap closed this May 31, 2018
@marschap marschap deleted the openpgp-tool branch June 5, 2018 08:33
@marschap marschap mentioned this pull request Oct 13, 2018
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants