mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-29 17:58:57 +01:00
Implemented legacy public key signature
This commit is contained in:
parent
193b0c2735
commit
d0debf1d94
@ -0,0 +1,8 @@
|
|||||||
|
package de.florianmichael.viafabricplus.injection.access;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
public interface IKeyPairResponse {
|
||||||
|
|
||||||
|
ByteBuffer viafabricplus_getLegacyPublicKeySignature();
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package de.florianmichael.viafabricplus.injection.mixin.fixes.authlib;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.mojang.authlib.yggdrasil.response.KeyPairResponse;
|
||||||
|
import de.florianmichael.viafabricplus.injection.access.IKeyPairResponse;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
|
||||||
|
@Mixin(KeyPairResponse.class)
|
||||||
|
public class MixinKeyPairResponse implements IKeyPairResponse {
|
||||||
|
|
||||||
|
@SerializedName("publicKeySignature")
|
||||||
|
private ByteBuffer viafabricplus_legacyKeySignature;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ByteBuffer viafabricplus_getLegacyPublicKeySignature() {
|
||||||
|
return this.viafabricplus_legacyKeySignature;
|
||||||
|
}
|
||||||
|
}
|
@ -18,6 +18,7 @@
|
|||||||
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft;
|
package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft;
|
||||||
|
|
||||||
import com.mojang.authlib.yggdrasil.response.KeyPairResponse;
|
import com.mojang.authlib.yggdrasil.response.KeyPairResponse;
|
||||||
|
import de.florianmichael.viafabricplus.injection.access.IKeyPairResponse;
|
||||||
import de.florianmichael.viafabricplus.injection.access.IPublicKeyData;
|
import de.florianmichael.viafabricplus.injection.access.IPublicKeyData;
|
||||||
import net.minecraft.client.util.ProfileKeysImpl;
|
import net.minecraft.client.util.ProfileKeysImpl;
|
||||||
import net.minecraft.network.encryption.PlayerPublicKey;
|
import net.minecraft.network.encryption.PlayerPublicKey;
|
||||||
@ -31,7 +32,6 @@ public class MixinProfileKeysImpl {
|
|||||||
|
|
||||||
@Inject(method = "decodeKeyPairResponse", at = @At("RETURN"))
|
@Inject(method = "decodeKeyPairResponse", at = @At("RETURN"))
|
||||||
private static void trackLegacyKey(KeyPairResponse keyPairResponse, CallbackInfoReturnable<PlayerPublicKey.PublicKeyData> cir) {
|
private static void trackLegacyKey(KeyPairResponse keyPairResponse, CallbackInfoReturnable<PlayerPublicKey.PublicKeyData> cir) {
|
||||||
// ((IPublicKeyData) (Object) cir.getReturnValue()).viafabricplus_setV1Key(keyPairResponse.getLegacyPublicKeySignature());
|
((IPublicKeyData) (Object) cir.getReturnValue()).viafabricplus_setV1Key(((IKeyPairResponse) keyPairResponse).viafabricplus_getLegacyPublicKeySignature());
|
||||||
// TODO | Track Key
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,8 @@
|
|||||||
"fixes.viaversion.protocol1_9to1_8.MixinViaIdleThread",
|
"fixes.viaversion.protocol1_9to1_8.MixinViaIdleThread",
|
||||||
"jsonwebtoken.MixinClasses",
|
"jsonwebtoken.MixinClasses",
|
||||||
"jsonwebtoken.MixinDefaultCompressionCodecResolver",
|
"jsonwebtoken.MixinDefaultCompressionCodecResolver",
|
||||||
"jsonwebtoken.MixinDefaultJwtParserBuilder"
|
"jsonwebtoken.MixinDefaultJwtParserBuilder",
|
||||||
|
"fixes.authlib.MixinKeyPairResponse"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
Loading…
Reference in New Issue
Block a user