@Test public void validateKey_wrongVersion_throws() throws Exception { EcdsaPublicKey wrongVersionKey = EcdsaPublicKey.newBuilder(validPublicKey()).setVersion(1).build(); try { verifyManager.validateKey(wrongVersionKey); fail(); } catch (GeneralSecurityException e) { } }
@Override public void validateKey(EcdsaPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); SigUtil.validateEcdsaParams(pubKey.getParams()); }
EcdsaVerifyKeyManager extends KeyTypeManager<EcdsaPublicKey> { @Override public void validateKey(EcdsaPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); SigUtil.validateEcdsaParams(pubKey.getParams()); } }
EcdsaVerifyKeyManager extends KeyTypeManager<EcdsaPublicKey> { @Override public void validateKey(EcdsaPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); SigUtil.validateEcdsaParams(pubKey.getParams()); } EcdsaVerifyKeyManager(); }
EcdsaVerifyKeyManager extends KeyTypeManager<EcdsaPublicKey> { @Override public void validateKey(EcdsaPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); SigUtil.validateEcdsaParams(pubKey.getParams()); } EcdsaVerifyKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override EcdsaPublicKey parseKey(ByteString byteString); @Override void validateKey(EcdsaPublicKey pubKey); }
EcdsaVerifyKeyManager extends KeyTypeManager<EcdsaPublicKey> { @Override public void validateKey(EcdsaPublicKey pubKey) throws GeneralSecurityException { Validators.validateVersion(pubKey.getVersion(), getVersion()); SigUtil.validateEcdsaParams(pubKey.getParams()); } EcdsaVerifyKeyManager(); @Override String getKeyType(); @Override int getVersion(); @Override KeyMaterialType keyMaterialType(); @Override EcdsaPublicKey parseKey(ByteString byteString); @Override void validateKey(EcdsaPublicKey pubKey);  }