@@ -13,6 +13,7 @@ public class ConeshellV3 : ConeshellV2
13
13
14
14
15
15
private readonly byte [ ] _versionKey ;
16
+ private readonly byte [ ] ? _vfsCert ;
16
17
17
18
public static ConeshellV3 FromTally ( Guid deviceUdid , byte [ ] tally )
18
19
{
@@ -22,7 +23,17 @@ public static ConeshellV3 FromTally(Guid deviceUdid, byte[] tally)
22
23
return new ConeshellV3 (
23
24
Convert . FromHexString ( deviceUdid . ToString ( ) . Replace ( "-" , "" ) ) ,
24
25
tally [ 0x1f8 ..] ,
25
- new X25519PublicKeyParameters ( tally [ 0x1d8 ..0x1f8 ] . Reverse ( ) . ToArray ( ) ) ) ;
26
+ new X25519PublicKeyParameters ( tally [ 0x1d8 ..0x1f8 ] . Reverse ( ) . ToArray ( ) ) ,
27
+ tally [ ..0x1d8 ] ) ;
28
+ }
29
+
30
+ public ConeshellV3 ( byte [ ] deviceUdid , byte [ ] versionKey , X25519PublicKeyParameters serverPublicKey , byte [ ] vfsCert )
31
+ : this ( deviceUdid , versionKey , serverPublicKey )
32
+ {
33
+ if ( vfsCert . Length != VfsCertLength )
34
+ throw new ArgumentException ( $ "The VFS certificate must be { VfsCertLength } bytes in length.", nameof ( vfsCert ) ) ;
35
+
36
+ _vfsCert = vfsCert ;
26
37
}
27
38
28
39
public ConeshellV3 ( byte [ ] deviceUdid , byte [ ] versionKey , X25519PublicKeyParameters serverPublicKey )
@@ -40,6 +51,11 @@ public ConeshellV3(byte[] deviceUdid, byte[] versionKey)
40
51
_versionKey = versionKey ;
41
52
}
42
53
54
+ public ConeshellV3 ( )
55
+ {
56
+ _versionKey = new byte [ 20 ] ;
57
+ }
58
+
43
59
#region Coneshell Message Functions
44
60
45
61
protected override uint HeaderMagic => 0x0300DEC0 ;
0 commit comments