Update to OpenPGP specs v3.4.1

This commit is contained in:
Arnaud Fontaine 2020-04-09 09:47:41 +02:00
parent 4be0fa442b
commit c23c620a1e
3 changed files with 5 additions and 3 deletions

View File

@ -67,9 +67,10 @@ public final class Constants {
protected static final byte LANG_MAX_LENGTH = 8;
protected static final byte[] LANG_DEFAULT = { (byte)0x65, (byte)0x6e };
protected static final byte SEX_NOT_KNOWN = (byte)0x30;
protected static final byte SEX_MALE = (byte)0x31;
protected static final byte SEX_FEMALE = (byte)0x32;
protected static final byte SEX_NOT_ANNOUNCED = (byte)0x39;
protected static final byte SEX_NOT_APPLICABLE = (byte)0x39;
protected static final short TAG_AID = (short)0x004f;
protected static final short TAG_LOGIN = (short)0x005e;

View File

@ -179,7 +179,7 @@ public final class Persistent {
lang_length = (byte)Constants.LANG_DEFAULT.length;
Common.commitTransaction(isRegistering);
sex = Constants.SEX_NOT_ANNOUNCED;
sex = Constants.SEX_NOT_KNOWN;
Util.arrayFillNonAtomic(digital_signature_counter, (short)0,
(short)digital_signature_counter.length, (byte)0);

View File

@ -946,9 +946,10 @@ public final class SmartPGPApplet extends Applet {
}
switch(buf[0]) {
case Constants.SEX_NOT_KNOWN:
case Constants.SEX_MALE:
case Constants.SEX_FEMALE:
case Constants.SEX_NOT_ANNOUNCED:
case Constants.SEX_NOT_APPLICABLE:
data.sex = buf[0];
break;