]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: distinguish parse_v4_credentials
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 19 Oct 2018 20:40:19 +0000 (16:40 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 19 Oct 2018 20:40:19 +0000 (16:40 -0400)
The caller and callees of this method are v4-specific, and their
names contain a v4 infix.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_auth_s3.cc
src/rgw/rgw_auth_s3.h
src/rgw/rgw_rest_s3.cc

index 2662db2de1d063a58d9c1985aab19b0b3499a43d..09e3442a5aaffded6023458e7dbb544a2b8ca6c4 100644 (file)
@@ -422,14 +422,14 @@ static inline int parse_v4_auth_header(const req_info& info,               /* in
   return 0;
 }
 
-int parse_credentials(const req_info& info,                     /* in */
-                      boost::string_view& access_key_id,        /* out */
-                      boost::string_view& credential_scope,     /* out */
-                      boost::string_view& signedheaders,        /* out */
-                      boost::string_view& signature,            /* out */
-                      boost::string_view& date,                 /* out */
-                      boost::string_view& session_token,        /* out */
-                      const bool using_qs)                      /* in */
+int parse_v4_credentials(const req_info& info,                     /* in */
+                        boost::string_view& access_key_id,        /* out */
+                        boost::string_view& credential_scope,     /* out */
+                        boost::string_view& signedheaders,        /* out */
+                        boost::string_view& signature,            /* out */
+                        boost::string_view& date,                 /* out */
+                        boost::string_view& session_token,        /* out */
+                        const bool using_qs)                      /* in */
 {
   boost::string_view credential;
   int ret;
index f8ea7480be694853276ae9e1882a88ebfec71239..bd920d1184e30438e1029c407a4491f808f692d7 100644 (file)
@@ -435,14 +435,14 @@ static constexpr char AWS4_UNSIGNED_PAYLOAD_HASH[] = "UNSIGNED-PAYLOAD";
 static constexpr char AWS4_STREAMING_PAYLOAD_HASH[] = \
   "STREAMING-AWS4-HMAC-SHA256-PAYLOAD";
 
-int parse_credentials(const req_info& info,                     /* in */
-                      boost::string_view& access_key_id,        /* out */
-                      boost::string_view& credential_scope,     /* out */
-                      boost::string_view& signedheaders,        /* out */
-                      boost::string_view& signature,            /* out */
-                      boost::string_view& date,                 /* out */
-                      boost::string_view& session_token,        /* out */
-                      const bool using_qs);                     /* in */
+int parse_v4_credentials(const req_info& info,                     /* in */
+                        boost::string_view& access_key_id,        /* out */
+                        boost::string_view& credential_scope,     /* out */
+                        boost::string_view& signedheaders,        /* out */
+                        boost::string_view& signature,            /* out */
+                        boost::string_view& date,                 /* out */
+                        boost::string_view& session_token,        /* out */
+                        const bool using_qs);                     /* in */
 
 static inline bool char_needs_aws4_escaping(const char c, bool encode_slash)
 {
index 1aa5be329c915c8f3b080a2ca807eb4d4451373d..f2fc8f02bec67458dc594605ea2f967569fd4e95 100644 (file)
@@ -3849,14 +3849,14 @@ AWSGeneralAbstractor::get_auth_data_v4(const req_state* const s,
   boost::string_view client_signature;
   boost::string_view session_token;
 
-  int ret = rgw::auth::s3::parse_credentials(s->info,
-                                             access_key_id,
-                                             credential_scope,
-                                             signed_hdrs,
-                                             client_signature,
-                                             date,
-                                             session_token,
-                                             using_qs);
+  int ret = rgw::auth::s3::parse_v4_credentials(s->info,
+                                               access_key_id,
+                                               credential_scope,
+                                               signed_hdrs,
+                                               client_signature,
+                                               date,
+                                               session_token,
+                                               using_qs);
   if (ret < 0) {
     throw ret;
   }