> - return null;
> - }
> - };
> - } else if (signatureOrMacAlgorithm.startsWith("SHA")) {
> - this.signatureOrMacFunction = new
> SignatureGenerator(signatureOrMacAlgorithm, credentials.get().privateKey);
> - } else {
> - this.signatureOrMacFunction = new
> MessageAuthenticationCodeGenerator(signatureOrMacAlgorithm,
> - credentials.get().privateKey);
> + @Override public Function<byte[], byte[]> get() {
> + try {
> + if (macOrSignature.startsWith("SHA")) {
> + return new SignatureGenerator(macOrSignature, credentials.get());
> + }
> + return new MessageAuthenticationCodeGenerator(macOrSignature,
> credentials.get());
> + } catch (NoSuchAlgorithmException e) {
> + throw new AssertionError("Invalid contents in JWSAlgorithms! " +
> e.getMessage());
That means somebody placed a non portable value in the file. That's a
mistake of the developer.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/90/files#r20225856