Mercurial > projects > libpws
changeset 11:96a507a110c8
Add support for format 0x030E
author | Guido Berhoerster <guido+libpws@berhoerster.name> |
---|---|
date | Fri, 02 Aug 2019 14:47:43 +0200 |
parents | 0feba0fea9d0 |
children | 1926dfc9feb0 |
files | include/pws.h pws-field.c pws3_file_create.3.xml |
diffstat | 3 files changed, 75 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 };
--- 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 *
--- 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 @@ <entry><constant>PWS_​DATA_​TYPE_​TEXT</constant></entry> <entry>reserved</entry> </row> + <row> + <entry><constant>PWS3_​HEADER_​FIELD_​PASSWORD_​TIMESTAMP</constant></entry> + <entry><literal>0x13</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​TIME</constant></entry> + <entry>time the master password was last changed</entry> + </row> </tbody> </tgroup> </table> @@ -970,6 +976,54 @@ <entry><constant>PWS_​DATA_​TYPE_​BYTES</constant></entry> <entry>keyboard shortcut</entry> </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​RESERVED_​2</constant></entry> + <entry><literal>0x1a</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​UUID</constant></entry> + <entry>reserved</entry> + </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​TWO_​FACTOR_​KEY</constant></entry> + <entry><literal>0x1b</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​BYTES</constant></entry> + <entry>two factor key</entry> + </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​NUMBER</constant></entry> + <entry><literal>0x1c</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​TEXT</constant></entry> + <entry>credit card number</entry> + </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​EXPIRATION</constant></entry> + <entry><literal>0x1d</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​TEXT</constant></entry> + <entry>credit card expiration</entry> + </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​VERIFICATION_​VALUE</constant></entry> + <entry><literal>0x1e</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​TEXT</constant></entry> + <entry>credit card verification value</entry> + </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​CREDIT_​CARD_​PIN</constant></entry> + <entry><literal>0x1f</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​TEXT</constant></entry> + <entry>credit card PIN</entry> + </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​QR_​CODE</constant></entry> + <entry><literal>0x20</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​TEXT</constant></entry> + <entry>QR code</entry> + </row> + <row> + <entry><constant>PWS3_​RECORD_​FIELD_​TESTING_​1</constant></entry> + <entry><literal>0xdf</literal></entry> + <entry><constant>PWS_​DATA_​TYPE_​BYTES</constant></entry> + <entry>testing</entry> + </row> </tbody> </tgroup> </table>