Once more, a soul lost in signing hell...
I just started developing for Symbian (and in C++ in general).
I created a 'HelloWorld' and I want it to run on my Nokia E51. The code compiles and runs fine in the emulator. I created a self-signed certificate that I used to sign the application. When I try to install it on the phone it fails with this error: "Unable to install a protected application from an untrusted supplier".
I've read the FAQ, the Q&A, lots of posts on this forum and elsewhere but I just can't figure out what I'm doing wrong.
I'll try to be as complete as possible in providing info.
I. The code and build files:
HelloWoldClass.cpp:
Code:
#include <e32base.h>
#include <e32cons.h>
LOCAL_D CConsoleBase * console;
GLDEF_C TInt E32Main()
{
_LIT(KTextTitle, "HelloWorld");
console = Console::NewL(KTextTitle, TSize(KConsFullScreen, KConsFullScreen));
_LIT(KTextContent, "Hello World!!");
console->Write(KTextContent);
_LIT(KTextPause, "[press any key");
console->Write(KTextPause);
console->Getch();
delete console;
return 0;
}
HelloWorld.mpp:
Code:
TARGETTYPE EXE
TARGET HelloWorld.exe
SOURCEPATH ..\src
SOURCE HelloWorldClass.cpp
LIBRARY euser.lib
SYSTEMINCLUDE \epoc32\include
UID 0xA0000001
HelloWorld.pkg:
Code:
#{"HelloWorld EXE"},(0xA0000001),1,0,0
[0x102032BE], 0, 0, 0, {"S60ProductID"}
[0x20002498], 0, 0, 0, {"Nokia E51"}
%{"Simbios-EN"}
:"Simbios"
"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\HelloWorld.exe"
-"!:\sys\bin\HelloWorld.exe"
II. Console output:
Creating the certificate:
Code:
C:\Symbian\Carbide\workspace\Testing\group>makekeys -cert -dname "CN=Nick de Graeve OR=Simbios" file.key file.cer
Warning: the private key should be encrypted with the -password option
Do you want to use a password (y/n)? y
Generating private key...
Move the mouse within the window or press keys to generate random data
......................................................................
..............................random data collected.
A DSA private key has been generated with a keylength of 1024 bits
Enter private key passphrase:
Verifying password - Enter private key passphrase:
Created certificate file.cer
Signing the code:
Code:
C:\Symbian\Carbide\workspace\Testing\sis>signsis -s HelloWorld.sis HelloWorld.sisx c:\Symbian\Carbide\workspace\Testing\group\file.cer c:\Symbian\Carbide\workspace\Testing\group\file.key xxxxxx
III. The phone:
I enabled the use of self-signed applications:
Code:
Tools -> Settings -> Applications -> App.Manager -> Software Application -> All
I use the Nokia Application Installer to copy HelloWorld.sisx to the phone.
Sequence of events:
- "Install HelloWorld EXE?", pressed "Yes";
- "Security warning", pressed "Continu";
- "Details", pressed "Continu";
- "Installing" and after a few seconds I get
- "Unable to install a protected application from an untrusted supplier".