Crypto: EdDSA precedence fix

This commit is contained in:
zzz
2016-02-10 16:36:40 +00:00
parent 981b708230
commit 6ab5b84979

View File

@ -426,7 +426,7 @@ public final class EdDSAEngine extends Signature {
@Override
protected void engineSetParameter(AlgorithmParameterSpec spec) throws InvalidAlgorithmParameterException {
if (spec.equals(ONE_SHOT_MODE)) {
if (oneShotBytes != null || baos != null && baos.size() > 0)
if (oneShotBytes != null || (baos != null && baos.size() > 0))
throw new InvalidAlgorithmParameterException("update() already called");
oneShotMode = true;
} else {