×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Authorization Failed

    Hello every1,

    The problem i am facing is that when i try install my mobile application on NOKIA N73, it gives me an "Authorization Failed" error while installation progress. The mobile application was working fine on my phone till the time when there was no security implemented. After implementation of security its giving me this installation error.

    For security i simply added the DES code

    Can anyone help me out with this issue

    Thanx in advance
    Last edited by crispychampion; 2007-12-19 at 19:17.

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: Authorization Failed

    Hi crispychampion! Welcome to Nokia Developer Discussion Boards!!

    The authorisation Failed message might be due to several reasons.

    1) May be due to that the MIDlet is using API's that are not supported by the phone.

    2) Also might be due to some problem while Signing. It is not necessary that the app needs to be signed. But Signing will makes the app trusted and remove the permission messages.

    What do you mean by "security implemented", do you mean Signing with Certificates? If so, which Certificates are you using ?

    Hope this links are of some interest!.
    http://discussion.forum.nokia.com/fo...ization+failed

    Regarding Signing please check this link.
    http://discussion.forum.nokia.com/fo...hlight=signing

    MIDP 2.0: Signed MIDlet Developer's Guide v2.0
    http://www.forum.nokia.com/info/sw.n..._0_en.pdf.html

    Also there have been several discussions in this regard; please search the Forum.

    Regards
    Gopal

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Re: Authorization Failed

    Hi Gopal,
    Thanx a lot for the reply

    I am using the SATSA API for writing the code for security. This API is supported by N73.
    The application could not be installed after adding the following piece of code.

    import com.sun.midp.io.Base64;
    import java.security.*;
    import java.security.spec.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;

    public class encrypt {
    byte[] symKey = {
    (byte) 0xca, (byte) 0x00, (byte) 0x25, (byte) 0x06,
    (byte) 0x28, (byte) 0xae, (byte) 0xd2, (byte) 0xbd,
    (byte) 0x2b, (byte) 0x7e, (byte) 0x15, (byte) 0x16,
    (byte) 0x28, (byte) 0xae, (byte) 0xd2, (byte) 0xa6,
    (byte) 0x2c, (byte) 0x7e, (byte) 0x10, (byte) 0x96,
    (byte) 0x28, (byte) 0xff, (byte) 0xd2, (byte) 0xa6,
    };
    byte[] ciphertext;
    byte[] messageBytes;
    String ct;

    /** Creates a new instance of encrypt */
    public encrypt() {
    }

    public void encryption(String plainText)
    throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException,
    InvalidKeyException, IllegalStateException, ShortBufferException,
    IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException {


    messageBytes = plainText.getBytes();
    System.out.println("Plain text: " + plainText);


    // Create the symmetric encryption Key
    Key encryptionKey = new SecretKeySpec(symKey, 0, symKey.length, "DESede");


    /* Construct Cipher class with name of the transformation algorithm */
    Cipher cipher = Cipher.getInstance("DESede/ECB/PKCS5Padding");


    // Calculate ciphertext size.
    int blocksize = 16;
    int ciphertextLength = 0;
    int remainder = messageBytes.length % blocksize;


    if (remainder == 0) {
    ciphertextLength = messageBytes.length;
    } else {
    ciphertextLength = messageBytes.length - remainder + blocksize;
    }
    System.out.println("ciphertext length: " + ciphertextLength);


    cipher.init(Cipher.ENCRYPT_MODE, encryptionKey);
    ciphertext = new byte[ciphertextLength];
    cipher.doFinal(messageBytes, 0, messageBytes.length, ciphertext, 0);
    ct=new String(Base64.encode(ciphertext,0,ciphertext.length));

    System.out.println("Message Bytes:"+ciphertext);
    System.out.println("Encrypted text: " + ct);




    }

    public String get_ct() {
    return ct;
    }

    public int get_bytecount() {
    return messageBytes.length;
    }

    }

    I dont have any idea about signing because i am new to this all. I just know that i get the authorisation error after adding the above code. Everything runs fine when i simulate it.

    The jad file is as shown below:
    MIDlet-1: VisualMidlet, , VisualMidlet
    MIDlet-Jar-Size: 563949
    MIDlet-Jar-URL: GUI.jar
    MIDlet-Name: GUI
    MIDlet-Vendor: Vendor
    MIDlet-Version: 1.0
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.0

    Plz plz help me out with this.

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Re: Authorization Failed

    Hi Gopal,
    The error was resolved. Thanx a lot for the help. It was due to the base64 class of sun.midp.
    Regards,
    Saad

Similar Threads

  1. S60 2nd to 3rd/ PlatformSecurity / Capabilities
    By jarkoos in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 4
    Last Post: 2007-04-14, 14:08
  2. how to rectify Authorization Failed error
    By thamarai_kodi in forum General Messaging
    Replies: 1
    Last Post: 2007-03-08, 08:02
  3. Authorization Failed In Nokia 6600
    By rushabh_it in forum Mobile Java General
    Replies: 4
    Last Post: 2006-10-06, 07:58
  4. nokia 6630 and JABWT: authorisation failed (authorization failed)
    By activetools in forum Mobile Java Networking & Messaging & Security
    Replies: 7
    Last Post: 2006-06-30, 08:15
  5. Nokia 6682- Authorization Failed
    By shivendratiwari81 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2006-04-05, 12:32

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×