Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7981503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:23:38+00:00 2026-06-04T10:23:38+00:00

I have an iPhone application I’ve been using for some time that uses ASIHTTPRequest

  • 0

I have an iPhone application I’ve been using for some time that uses ASIHTTPRequest to upload videos to a bucket on Amazon S3. It has been functioning well without any problems. Recently, we decided to make use of the new “server-side encryption” that Amazon has implemented. This allows you to tell Amazon’s server to encrypt files that have been posted to a bucket automatically by including an additional HTTP request header.

I have added a single line of code to my application to implement this, but now my Amazon uploads are failing. The specific error message that is appearing is:

“The request signature we calculated does not match the signature you provided. Check your key and signing method.”

The name of the bucket I am using conforms to Amazon’s naming standards, so I am confident that is not the issue. I am also confident that the secret and public keys I am using are correct.

It would appear that adding this header is somehow breaking the signature calculation, I am assuming because it is being included in the calculation on one side of the transmission but not the other.

Am I doing this incorrectly? Or is this a bug in ASIHTTPRequest?

Here is my code for reference:

[ASIS3Request setSharedSecretAccessKey:@"mysecretkey"];
[ASIS3Request setSharedAccessKey:@"myaccesskey"];

NSString *bucketPath = [NSString stringWithFormat:@"mypath/filename"];

ASIS3ObjectRequest *request = [ASIS3ObjectRequest PUTRequestForFile:filepath withBucket:@"my-bucket" key:bucketPath];

// If the following line is commented, the upload completes successfully
[request addRequestHeader:@"x-amz-server-side-encryption" value:@"AES256"];
////

request.requestScheme = ASIS3RequestSchemeHTTPS;
[request setShouldContinueWhenAppEntersBackground:YES];
[request startSynchronous];

if ([request error])
{
  // The error messag is being displayed here
  NSLog(@"xmit error: [%@]",[[request error] localizedDescription]);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:23:40+00:00Added an answer on June 4, 2026 at 10:23 am

    You’re doing everything right, the issue is that constructing the Authorization header (i.e. “the request signature”) involves signing a string which includes all of the x-amz- headers; you’ve added one such header (x-amz-server-side-encryption), but you’ve not caused it to be factored into the signature.

    I just created a branch of ASIHTTPRequest with support for SSE. If you use that branch, you should just be able to say [request setUseServerSideEncryption:YES];. Alternately, if you’re more interested in the technique, here are the details of making it work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPhone application that uses a timer and at every time interval
I have an iPhone application that is mostly using standard controls. There is one
I have an iPhone application that uses a UITabBarController for its primary interface. The
I have an IPhone application that I want to attempt login and do some
I have an iPhone application that uses a sqlite3 database for saving data and
I have an iPhone application that's using Navigation Controller to display the top bar
I have an iPhone application that uses a set of plists to load the
I have an iPhone application that adds new contacts via the Address Book Framework.
I have an iPhone application that reads RSS feeds from a YouTube channel. However,
I have an iPhone application that send datas via wifi on my mac. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.