I had the same problem lately. And this is a perfect chance to write down and share my own notes. :)
I am assuming you are using Xcode and Organizer (not application uploader)
Step 1: Check Keychain Access.app.
You have to have two certificates (That you download from mac dev center). Each of these has to be linked with a private key.
In the picture, I have only one certificate "nacho4..." linked with a private key "nac...". So I should go to the mac dev center and download my certificates in order to continue. Download them and drag them into the "login".
Step 2: Make sure you can build your app with the right configuration.
In my case, I setup three configurations.
Debug: can debug + no signing (for development)
Release: cannot debug + no signing (mainly for internal betas, etc)
Distribution: cannot debug + signing (for app store distribution)
Go to project "build info">"build signing">
Make sure that you are signing you code with the correct sign identity. Something like: "3rd Party Mac Developer Application. My Company Inc."
*If you can't see this then it means something wrong is with your certificates in Keychain Access.app. Check your certificate is linked with a private key
Step 3 Make sure you are building the right configuration.
(Yeah, kind of obvious but it happened to me the last time. This is the reason you could be getting "Invalid signature") In the "Edit Scheme" panel , make sure you have the right configuration in the "Archive" section. In my case is "Distribution" (The default is "Release ")
Note that if you don't do this correctly you will get be able to submit your binary to Apple but minutes later you will get an "Invalid Signature". Because the certificates are fine but the app is not signed.
Step 4: Build you app and submit it
Xcode>Product>Archive
The organizer will appear. Now just submit it.
I have found that validating the archive is useless because sometimes even the validation fails I am able to submit my app without errors. I read this from other threads too so not only me. So if you are sure this is the version you want to submit to Apple. just press the submit button.
You are asked your username and password.
Then, you get another menu to select the application (With has only one option, at least in my case) and then select the signing identity I think.
This is important! Make sure "3rd Party Mac Developer Installer" is selected and everything should work.
If you can't see "3rd Party Mac Developer Installer" option in the last menu then it means something is missing in your keychain. (The Installer certificate from the mac dev center)
Note that if you don't do this correctly you will be able to submit your binary but minutes later you will get an "Invalid signature" mail from iTunes Connect because the app probably could be well signed but the certificates Apple will se are incorrect.
I hope it helps.