summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AwsRequestSignerV4.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AwsRequestSignerV4.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AwsRequestSignerV4.java
index ab3013762b..cf4420fe58 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AwsRequestSignerV4.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AwsRequestSignerV4.java
@@ -10,6 +10,8 @@
package org.eclipse.jgit.transport;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
@@ -145,7 +147,7 @@ public final class AwsRequestSignerV4 {
canonicalRequest.getBytes(StandardCharsets.UTF_8)));
// compute the signing key
- byte[] secretKey = (SCHEME + new String(awsSecretKey)).getBytes();
+ byte[] secretKey = (SCHEME + new String(awsSecretKey)).getBytes(UTF_8);
byte[] dateKey = signStringWithKey(scopeDate, secretKey);
byte[] regionKey = signStringWithKey(regionName, dateKey);
byte[] serviceKey = signStringWithKey(serviceName, regionKey);