# HG changeset patch # User Guido Berhoerster # Date 1564750063 -7200 # Node ID 96a507a110c856ba16bf1452fb0a67b5df04afac # Parent 0feba0fea9d048f9089ea10d3c38abc5265078b2 Add support for format 0x030E diff -r 0feba0fea9d0 -r 96a507a110c8 include/pws.h --- a/include/pws.h Wed Jul 31 11:21:50 2019 +0200 +++ b/include/pws.h Fri Aug 02 14:47:43 2019 +0200 @@ -36,7 +36,7 @@ #define LIBPWS_VERSION_MINOR 0 #define LIBPWS_VERSION_MICRO 0 -#define PWS3_VERSION 0x030D +#define PWS3_VERSION 0x030E #define PWS3_MAX_FIELD_SIZE (16 * 1024) #define PWS3_MAX_PASSWORD_LEN 1023 @@ -87,6 +87,7 @@ PWS3_HEADER_FIELD_NAMED_PASSWORD_POLICIES, /* 0x10 */ PWS3_HEADER_FIELD_EMPTY_GROUPS, /* 0x11 */ PWS3_HEADER_FIELD_YUBICO, /* 0x12 */ + PWS3_HEADER_FIELD_PASSWORD_TIMESTAMP, /* 0x13 */ PWS3_HEADER_FIELD_END = 0xff }; @@ -116,6 +117,14 @@ PWS3_RECORD_FIELD_SHIFT_DOUBLE_CLICK_ACTION, /* 0x17 */ PWS3_RECORD_FIELD_PASSWORD_POLICY_NAME, /* 0x18 */ PWS3_RECORD_FIELD_KEYBOARD_SHORTCUT, /* 0x19 */ + PWS3_RECORD_FIELD_RESERVED_2, /* 0x1a */ + PWS3_RECORD_FIELD_TWO_FACTOR_KEY, /* 0x1b */ + PWS3_RECORD_FIELD_CREDIT_CARD_NUMBER, /* 0x1c */ + PWS3_RECORD_FIELD_CREDIT_CARD_EXPIRATION, /* 0x1d */ + PWS3_RECORD_FIELD_CREDIT_CARD_VERIFICATION_VALUE, /* 0x1e */ + PWS3_RECORD_FIELD_CREDIT_CARD_PIN, /* 0x1f */ + PWS3_RECORD_FIELD_QR_CODE, /* 0x20 */ + PWS3_RECORD_FIELD_TESTING_1, /* 0xdf */ PWS3_RECORD_FIELD_END = 0xff }; diff -r 0feba0fea9d0 -r 96a507a110c8 pws-field.c --- a/pws-field.c Wed Jul 31 11:21:50 2019 +0200 +++ b/pws-field.c Fri Aug 02 14:47:43 2019 +0200 @@ -48,7 +48,8 @@ [PWS3_HEADER_FIELD_RECENTLY_USED_ENTRIES] = PWS_DATA_TYPE_TEXT, [PWS3_HEADER_FIELD_NAMED_PASSWORD_POLICIES] = PWS_DATA_TYPE_TEXT, [PWS3_HEADER_FIELD_EMPTY_GROUPS] = PWS_DATA_TYPE_TEXT, - [PWS3_HEADER_FIELD_YUBICO] = PWS_DATA_TYPE_TEXT + [PWS3_HEADER_FIELD_YUBICO] = PWS_DATA_TYPE_TEXT, + [PWS3_HEADER_FIELD_PASSWORD_TIMESTAMP] = PWS_DATA_TYPE_TIME }; static const enum pws_data_type record_data_types[256] = { @@ -76,7 +77,15 @@ [PWS3_RECORD_FIELD_ALLOWED_PASSWORD_SYMBOLS] = PWS_DATA_TYPE_TEXT, [PWS3_RECORD_FIELD_SHIFT_DOUBLE_CLICK_ACTION] = PWS_DATA_TYPE_BYTES, [PWS3_RECORD_FIELD_PASSWORD_POLICY_NAME] = PWS_DATA_TYPE_TEXT, - [PWS3_RECORD_FIELD_KEYBOARD_SHORTCUT] = PWS_DATA_TYPE_BYTES + [PWS3_RECORD_FIELD_KEYBOARD_SHORTCUT] = PWS_DATA_TYPE_BYTES, + [PWS3_RECORD_FIELD_RESERVED_2] = PWS_DATA_TYPE_UUID, + [PWS3_RECORD_FIELD_TWO_FACTOR_KEY] = PWS_DATA_TYPE_BYTES, + [PWS3_RECORD_FIELD_CREDIT_CARD_NUMBER] = PWS_DATA_TYPE_TEXT, + [PWS3_RECORD_FIELD_CREDIT_CARD_EXPIRATION] = PWS_DATA_TYPE_TEXT, + [PWS3_RECORD_FIELD_CREDIT_CARD_VERIFICATION_VALUE] = PWS_DATA_TYPE_TEXT, + [PWS3_RECORD_FIELD_CREDIT_CARD_PIN] = PWS_DATA_TYPE_TEXT, + [PWS3_RECORD_FIELD_QR_CODE] = PWS_DATA_TYPE_TEXT, + [PWS3_RECORD_FIELD_TESTING_1] = PWS_DATA_TYPE_BYTES }; struct pws3_field * diff -r 0feba0fea9d0 -r 96a507a110c8 pws3_file_create.3.xml --- a/pws3_file_create.3.xml Wed Jul 31 11:21:50 2019 +0200 +++ b/pws3_file_create.3.xml Fri Aug 02 14:47:43 2019 +0200 @@ -758,6 +758,12 @@ PWS_​DATA_​TYPE_​TEXT reserved + + PWS3_​HEADER_​FIELD_​PASSWORD_​TIMESTAMP + 0x13 + PWS_​DATA_​TYPE_​TIME + time the master password was last changed + @@ -970,6 +976,54 @@ PWS_​DATA_​TYPE_​BYTES keyboard shortcut + + PWS3_​RECORD_​FIELD_​RESERVED_​2 + 0x1a + PWS_​DATA_​TYPE_​UUID + reserved + + + PWS3_​RECORD_​FIELD_​TWO_​FACTOR_​KEY + 0x1b + PWS_​DATA_​TYPE_​BYTES + two factor key + + + PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​NUMBER + 0x1c + PWS_​DATA_​TYPE_​TEXT + credit card number + + + PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​EXPIRATION + 0x1d + PWS_​DATA_​TYPE_​TEXT + credit card expiration + + + PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​VERIFICATION_​VALUE + 0x1e + PWS_​DATA_​TYPE_​TEXT + credit card verification value + + + PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​PIN + 0x1f + PWS_​DATA_​TYPE_​TEXT + credit card PIN + + + PWS3_​RECORD_​FIELD_​QR_​CODE + 0x20 + PWS_​DATA_​TYPE_​TEXT + QR code + + + PWS3_​RECORD_​FIELD_​TESTING_​1 + 0xdf + PWS_​DATA_​TYPE_​BYTES + testing +