1
- /*
1
+ /*
2
2
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -31,7 +31,6 @@ namespace Amazon.Runtime.Internal.Auth
31
31
/// </summary>
32
32
public class AWS4Signer : AbstractAWSSigner
33
33
{
34
-
35
34
public const string Scheme = "AWS4" ;
36
35
public const string Algorithm = "HMAC-SHA256" ;
37
36
public const string Sigv4aAlgorithm = "ECDSA-P256-SHA256" ;
@@ -299,7 +298,7 @@ private static void CleanHeaders(IDictionary<string, string> headers)
299
298
}
300
299
}
301
300
302
- private static void ValidateRequest ( IRequest request )
301
+ internal static void ValidateRequest ( IRequest request )
303
302
{
304
303
Uri url = request . Endpoint ;
305
304
@@ -630,7 +629,7 @@ public static byte[] ComputeHash(byte[] data)
630
629
#endregion
631
630
632
631
#region Private Signing Helpers
633
- static string SetPayloadSignatureHeader ( IRequest request , string payloadHash )
632
+ internal static string SetPayloadSignatureHeader ( IRequest request , string payloadHash )
634
633
{
635
634
if ( request . Headers . ContainsKey ( HeaderKeys . XAmzContentSha256Header ) )
636
635
request . Headers [ HeaderKeys . XAmzContentSha256Header ] = payloadHash ;
@@ -704,7 +703,7 @@ public static string DetermineService(IClientConfig clientConfig, IRequest reque
704
703
/// will look for the hash as a header on the request.
705
704
/// </param>
706
705
/// <returns>Canonicalised request as a string</returns>
707
- protected static string CanonicalizeRequest ( Uri endpoint ,
706
+ protected internal static string CanonicalizeRequest ( Uri endpoint ,
708
707
string resourcePath ,
709
708
string httpMethod ,
710
709
IDictionary < string , string > sortedHeaders ,
@@ -728,7 +727,7 @@ protected static string CanonicalizeRequest(Uri endpoint,
728
727
/// will look for the hash as a header on the request.
729
728
/// </param>
730
729
/// <returns>Canonicalised request as a string</returns>
731
- protected static string CanonicalizeRequest ( Uri endpoint ,
730
+ protected internal static string CanonicalizeRequest ( Uri endpoint ,
732
731
string resourcePath ,
733
732
string httpMethod ,
734
733
IDictionary < string , string > sortedHeaders ,
@@ -761,7 +760,7 @@ protected static string CanonicalizeRequest(Uri endpoint,
761
760
/// </param>
762
761
/// <param name="doubleEncode">Encode "/" when canonicalize resource path</param>
763
762
/// <returns>Canonicalised request as a string</returns>
764
- protected static string CanonicalizeRequest ( Uri endpoint ,
763
+ protected internal static string CanonicalizeRequest ( Uri endpoint ,
765
764
string resourcePath ,
766
765
string httpMethod ,
767
766
IDictionary < string , string > sortedHeaders ,
@@ -866,7 +865,7 @@ protected internal static string CanonicalizeHeaders(IEnumerable<KeyValuePair<st
866
865
/// </summary>
867
866
/// <param name="sortedHeaders">The headers included in the signature</param>
868
867
/// <returns>Formatted string of header names</returns>
869
- protected static string CanonicalizeHeaderNames ( IEnumerable < KeyValuePair < string , string > > sortedHeaders )
868
+ protected internal static string CanonicalizeHeaderNames ( IEnumerable < KeyValuePair < string , string > > sortedHeaders )
870
869
{
871
870
var builder = new ValueStringBuilder ( 512 ) ;
872
871
@@ -886,7 +885,7 @@ protected static string CanonicalizeHeaderNames(IEnumerable<KeyValuePair<string,
886
885
/// </summary>
887
886
/// <param name="request">The in-flight request being signed</param>
888
887
/// <returns>The fused set of parameters</returns>
889
- protected static List < KeyValuePair < string , string > > GetParametersToCanonicalize ( IRequest request )
888
+ protected internal static List < KeyValuePair < string , string > > GetParametersToCanonicalize ( IRequest request )
890
889
{
891
890
var parametersToCanonicalize = new List < KeyValuePair < string , string > > ( ) ;
892
891
@@ -968,7 +967,7 @@ protected static string CanonicalizeQueryParameters(string queryString, bool uri
968
967
return CanonicalizeQueryParameters ( queryParams , uriEncodeParameters : uriEncodeParameters ) ;
969
968
}
970
969
971
- protected static string CanonicalizeQueryParameters ( IEnumerable < KeyValuePair < string , string > > parameters )
970
+ protected internal static string CanonicalizeQueryParameters ( IEnumerable < KeyValuePair < string , string > > parameters )
972
971
{
973
972
return CanonicalizeQueryParameters ( parameters , true ) ;
974
973
}
0 commit comments