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>
58 : fAuthType(kNoAuth), fHost(
"NoHost")
117 toSign +=
"x-goog-api-version:1\n";
128 unsigned char digest[SHA_DIGEST_LENGTH] = {0};
129#if defined(MAC_OS_X_VERSION_10_7)
132 unsigned int *sd = NULL;
160 time_t now = time(NULL);
162 struct tm dateFormat;
163 strftime(
result,
sizeof(
result),
"%a, %d %b %Y %H:%M:%S GMT",
164 gmtime_r(&now, &dateFormat));
191 return "Host: " +
fHost;
226 default:
return "AWS";
258 if (!tokenHeader.
IsNull())
259 request += tokenHeader +
"\r\n";
262 request += authHeader +
"\r\n";
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
static TString Encode(const char *data)
Transform data into a null terminated base64 string.
Mother of all ROOT objects.
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 MakeAuthPrefix() const
Returns the authentication prefix.
TString MakeTokenHeader() const
Returns the session security token 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 ComputeSignature(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns this request's signature.
TString MakeRequestLine(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns the first line of a HTTP request for this object.
TString MakeAuthHeader(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns the authentication header for this HTTP request.
TString MakeHostHeader() const
Returns the 'Host' header to include in the HTTP request.
TString MakeDateHeader() const
Returns the date header for this HTTP request.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.