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";
122 unsigned char digest[SHA_DIGEST_LENGTH] = {0};
123 #if defined(MAC_OS_X_VERSION_10_7)
126 unsigned int *sd =
NULL;
154 time_t now = time(
NULL);
157 struct tm dateFormat;
158 strftime(result,
sizeof(result),
"%a, %d %b %Y %H:%M:%S GMT",
159 gmtime_r(&now, &dateFormat));
161 strftime(result,
sizeof(result),
"%a, %d %b %Y %H:%M:%S GMT",
190 return "Host: " +
fHost;
210 default:
return "AWS";
243 request += authHeader +
"\r\n";
TString MakeRequestLine(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns the first line of a HTTP request for this object.
TS3HTTPRequest & SetTimeStamp()
Sets this request's time stamp according to: http://code.google.com/apis/storage/docs/reference-heade...
TString MakeAuthHeader(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns the authentication header for this HTTP request.
const char * Data() const
static TString Encode(const char *data)
Transform data into a null terminated base64 string.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
ClassImp(TS3HTTPRequest) TS3HTTPRequest
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 MakeHostHeader() const
Returns the 'Host' header to include in the HTTP request.
TString MakeDateHeader() const
Returns the date header for this HTTP request.
TString HTTPVerbToTString(EHTTPVerb httpVerb) const
Mother of all ROOT objects.
TString ComputeSignature(TS3HTTPRequest::EHTTPVerb httpVerb) const
Returns this request's signature.