@@ -78,7 +78,7 @@ class AttestationProtocol {
78
78
// byte[] compressedChain { [short encodedCertificateLength, byte[] encodedCertificate] }
79
79
// byte[] fingerprint (length: FINGERPRINT_LENGTH)
80
80
// int osEnforcedFlags
81
- // short autoRebootMinutes (-1 for unknown)
81
+ // int autoRebootSeconds (-1 for unknown)
82
82
// byte portSecurityMode (-1 for unknown)
83
83
// byte userCount (-1 for unknown)
84
84
// byte oemUnlockAllowed (-1 for unknown)
@@ -87,7 +87,7 @@ class AttestationProtocol {
87
87
//
88
88
// Protocol version changes:
89
89
//
90
- // 6: autoRebootMinutes added
90
+ // 6: autoRebootSeconds added
91
91
// 6: portSecurityMode added
92
92
// 6: userCount added
93
93
// 6: oemUnlockAllowed added
@@ -1123,7 +1123,7 @@ static Certificate[] decodeChain(final byte[] dictionary, final byte[] compresse
1123
1123
final ByteBuffer chainDeserializer = ByteBuffer .wrap (chain , 0 , chainLength );
1124
1124
final List <Certificate > certs = new ArrayList <>();
1125
1125
while (chainDeserializer .hasRemaining ()) {
1126
- final short encodedLength = chainDeserializer .getShort ();
1126
+ final short encodedLength = chainDeserializer .getInt ();
1127
1127
final byte [] encoded = new byte [encodedLength ];
1128
1128
chainDeserializer .get (encoded );
1129
1129
certs .add (generateCertificate (new ByteArrayInputStream (encoded )));
@@ -1200,7 +1200,7 @@ static void verifySerialized(final byte[] attestationResult,
1200
1200
}
1201
1201
1202
1202
if (version >= 6 ) {
1203
- final short autoRebootMinutes = deserializer .getShort ();
1203
+ final int autoRebootSeconds = deserializer .getShort ();
1204
1204
final byte portSecurityMode = deserializer .get ();
1205
1205
final byte userCount = deserializer .get ();
1206
1206
final byte oemUnlockAllowed = deserializer .get ();
0 commit comments