Home GnuPG

Clean up/modernize Card and its subclasses a bit

Description

Clean up/modernize Card and its subclasses a bit

In particular, add constructors for converting a Card to the specific
Card subclasses. This ensures that all state already set on a Card is
copied to the specific subclass when we construct it. Previously, we
copied the serial number (but no other state) manually.

Card:

  • Document that Card represents one of possibly many applications on a smartcard
  • Make setAppName() protected since it's only supposed to be called by the subclasses during initialization
  • Remove unused (and obsolete) mSlot, slot(), setSlot()
  • Initialize member variables in class definition

NetKeyCard, OpenPGPCard, PIVCard:

  • Remove default constructors and unused constructors from serial number
  • Add constructors for converting a Card to the specific Card subclasses

Details

Provenance
ikloeckerAuthored on Oct 1 2020, 11:58 AM
Parents
rKLEOPATRA1af4827e26f1: Remove obsolete code
Branches
Unknown
Tags
Unknown