38#if defined(MAC_OS_X_VERSION_10_7)
39#include <CommonCrypto/CommonHMAC.h>
40#define SHA_DIGEST_LENGTH 20
42#include <openssl/sha.h>
43#include <openssl/hmac.h>
44#include <openssl/evp.h>
45#include <openssl/bio.h>
46#include <openssl/buffer.h>
57 : fAuthType(kNoAuth), fHost(
"NoHost")
107 (
const char*)HTTPVerbToTString(
httpVerb),
108 (
const char*)fTimeStamp);
109 if (fAuthType == kGoogle) {
116 toSign +=
"x-goog-api-version:1\n";
119 if (fAuthType == kAmazon) {
120 if (!fSessionToken.IsNull()) {
121 toSign +=
"x-amz-security-token:" + fSessionToken +
"\n";
125 toSign +=
"/" + fBucket + fObjectKey;
128#if defined(MAC_OS_X_VERSION_10_7)
143 case kGET:
return TString(
"GET");
144 case kPOST:
return TString(
"POST");
145 case kPUT:
return TString(
"PUT");
146 case kDELETE:
return TString(
"DELETE");
147 case kHEAD:
return TString(
"HEAD");
148 case kCOPY:
return TString(
"COPY");
185 (
const char*)HTTPVerbToTString(
httpVerb),
186 (
const char*)fBucket,
187 (
const char*)fObjectKey);
195 return "Host: " + fHost;
203 return "Date: " + fTimeStamp;
211 if (fAuthType != kAmazon)
214 if (fSessionToken.IsNull())
218 (
const char*) fSessionToken.Data());
227 case kNoAuth:
return "";
228 case kGoogle:
return "GOOG1";
230 default:
return "AWS";
239 if (fAuthType == kNoAuth)
243 (
const char*)MakeAuthPrefix(),
244 (
const char*)fAccessKey,
245 (
const char*)ComputeSignature(
httpVerb),
246 (fAuthType == kGoogle) ?
"\r\nx-goog-api-version: 1" :
"");
258 (
const char*)MakeRequestLine(
httpVerb),
259 (
const char*)MakeHostHeader(),
260 (
const char*)MakeDateHeader());
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
TString MakeAuthPrefix() const
Returns the authentication prefix.
TString GetRequest(TS3HTTPRequest::EHTTPVerb httpVerb, Bool_t appendCRLF=kTRUE)
Returns the HTTP request ready to be sent to the server.
TString HTTPVerbToTString(EHTTPVerb httpVerb) const
TString MakeAuthHeader(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns the authentication header for this HTTP request.
TS3HTTPRequest & SetTimeStamp()
Sets this request's time stamp according to: http://code.google.com/apis/storage/docs/reference-heade...
TString MakeDateHeader() const
Returns the date header for this HTTP request.
TString ComputeSignature(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns this request's signature.
TString MakeTokenHeader() const
Returns the session security token header for this HTTP request.
TString MakeRequestLine(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns the first line of a HTTP request for this object.
TString MakeHostHeader() const
Returns the 'Host' header to include in the HTTP request.
static TString Encode(const char *data)
Transform data into a null terminated base64 string.
Mother of all ROOT objects.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.