1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Fix SASL SCRAM-SHA-1(-PLUS) priority

Fixes SMACK-749.

Thanks to Grigory Fedorov for reporting this and to Kim Alvefur for
helping to diagnose the issue.
This commit is contained in:
Florian Schmaus 2017-03-18 13:19:51 +01:00
parent b6f7d019c7
commit 43715460c6
2 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright 2014-2016 Florian Schmaus * Copyright 2014-2017 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -23,6 +23,8 @@ import org.jivesoftware.smack.util.MAC;
public class SCRAMSHA1Mechanism extends ScramMechanism { public class SCRAMSHA1Mechanism extends ScramMechanism {
static final int PRIORITY = 110;
static { static {
SHA_1_SCRAM_HMAC = new ScramHmac() { SHA_1_SCRAM_HMAC = new ScramHmac() {
@Override @Override
@ -47,7 +49,7 @@ public class SCRAMSHA1Mechanism extends ScramMechanism {
@Override @Override
public int getPriority() { public int getPriority() {
return 110; return PRIORITY;
} }
@Override @Override

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright 2016 Florian Schmaus * Copyright 2016-2017 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -32,7 +32,7 @@ public class ScramSha1PlusMechanism extends ScramPlusMechanism {
@Override @Override
public int getPriority() { public int getPriority() {
return 110; return SCRAMSHA1Mechanism.PRIORITY - 10;
} }
@Override @Override