×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    11

    Question HttpsConnection: Certificate failed verification

    Hello folks,

    I've read a few posts on the forum about doing SSL/HTTPS on your own server, and all the certificate generation/proper format troubles that come with that...

    ... but in my case I'm trying to connect to a reputable service (Google) via https, and don't understand why I'm getting:
    javax.microedition.pki.CertificateException: Certificate failed verification

    I thought HTTPS connections were supposed to be straightforward . Could someone point me in the right direction? (Need code, details?... let me know)

    Basics:
    - Series 40 3rd Edition SDK
    - trying to send a POST to a https://www.google.com/accounts/ClientLogin
    - I believe there is some data being sent back and forth (seen in the debuggin console), but finally reading the response fails (error above)

    Thanks,
    Mike
    Last edited by msowka; 2006-06-25 at 20:19. Reason: more details

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: HttpsConnection: Certificate failed verification

    Hi Mike,

    I've read in my nokia's book ("developing scalable ..") sometime ago that on Nokia's S40 https connections are possible to servers that had certificates issues by Verisign or Thawt, otherwise you are going to receive CertificateException at runtime
    S60 can accept any certificate (that is unknown ones),

    can someone confirm?

    similiar exception:
    http://discussion.forum.nokia.com/fo...icateException

    regards,
    Peter Blazejewicz

  3. #3
    Registered User
    Join Date
    Aug 2003
    Posts
    11

    Exclamation Re: HttpsConnection: Certificate failed verification

    Dzięki Pawle,

    ... but the google certificates are from Thawte.

    UPDATE:
    Paul, yes I found the same section in the Nokia's 'Developing Scalable Series 40 Applications' book:
    "Series 40 devices can only make HTTPS connections to servers that have valid root certificates issued from Verisign or Thawte. If the server has a self-issued or unknown certificate, a CertificateException is thrown. Series 60 devices can make HTTPS connections to servers with unknown certificates."

    ... again, the google certificate is from Thawte!
    NOKIA FOLKS, HEADS UP! : is this a bug in the SDK? (Haven't tried on an actual phone yet).


    In fact I am able to accept the certificate when I browse to it using the emulators browser, but cannot even do `conn.getSecurityInfo()` on the HttpsConnection.

    It must be something I'm doing... this cannot be that difficult.

    Anyone? Thanks,
    Mike
    Last edited by msowka; 2006-06-25 at 23:46.

  4. #4
    Registered User
    Join Date
    Dec 2004
    Posts
    10

    Re: HttpsConnection: Certificate failed verification

    It seems to me that each and every phone has it's own set of root certificates available to the phones browser, and another, usally a subset of the browsers sertificate, set of ertificates available to the ssl (https) implementation in J2ME.

    However when a certificate is not recognized in the browser one usally get the option to continue anyway. In J2ME this is not the case.

    I have not found any way around this, exept accepting the fact that some phones have no root certificates available, while others only have a few. There does not seem to be any way of either implementing ssl in a reasonably secure fassion nor controll the certificates that are accepted by the existing implementation.

    However several Nokia phones allow you to install addidional root certificates. See:
    http://discussion.forum.nokia.com/fo...ad.php?t=70466

    --
    Maxagaze

  5. #5
    Registered User
    Join Date
    Jul 2006
    Posts
    3

    Re: HttpsConnection: Certificate failed verification

    I have been trying to get my Nokia 6233 to use Gmail, and have been encountering an issue with certificates (see the post below).
    http://groups.google.com/group/Gmail...9c0f8ceaaad1f/

    Do you know what certificate I need to install onto my 6233 to use Gmail's POP service? And how do I install this cert?

    Many thanks
    Andrew

  6. #6
    Registered User
    Join Date
    Aug 2006
    Posts
    2

    Thumbs up Re: HttpsConnection: Certificate failed verification

    The problem with the certificate is to change the pop server to pop.googlemail.com in stead of pop.gmail.com. Keep the SMTP settings as they are. Thats all!

  7. #7
    Registered User
    Join Date
    May 2008
    Posts
    3

    Re: HttpsConnection: Certificate failed verification

    Another cause to the certificate exception is the phone's date and time.

    I had it 6 months behind on my Nokia 6500, and my application got the certificate exception when calling https.

    Resetting the date and time resolved it.
    Doron.

  8. #8
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Sri Lanka, Colombo
    Posts
    204

    Thumbs down Re: HttpsConnection: Certificate failed verification

    guys,

    i have a verisign certificate with me. but it still throws the exception. i'm so confused????
    i'm using nokia nfc 6131 phone.

    but when i acces the url through my mobile browser

    it will say that the Invalid server certification but when i press continue it will connect to the server.

    but using my midlet it throws Certificate verification failed

    argent guys

  9. #9
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,104
    HasithaRandika, your webserver uses a VeriSign certificate? First try from a desktop computer and check if everything is installed correctly on your server (does not throw any warning, shows at least three certificates in the chain). Then make sure you installed its intermediate certificate as explained by VeriSign.

  10. #10
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Sri Lanka, Colombo
    Posts
    204

    Angry Re: HttpsConnection: Certificate failed verification

    from the web server side and as well as from the midlet's point of view every thing is ok expect the comminucation

  11. #11
    Registered User
    Join Date
    Aug 2009
    Posts
    1

    Re: HttpsConnection: Certificate failed verification

    Hi

    I'm not sure is this is a proper place for this question but i will try.

    I have nokia 6230i, software version 3.88, and I'm trying to run Gmail application on it, but i have problem with certificate, it is missing.
    As I read on several forums i need to install certificate.
    So I tried download certificate directly to cell phone, I've got "downloading failed" or unable to install,
    from this source https://www.verisign.com/cgi-bin/sup...etrootcert.cer

    I thought that if I will upload .cer file directly to phone memory I will be able to install it manually using phone, but cer file is unrecognised.
    so i need this certificate but i have no idea how to put it to phone.

    anyone can help?

  12. #12
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: HttpsConnection: Certificate failed verification

    Quote Originally Posted by obdarowany View Post
    Hi

    I'm not sure is this is a proper place for this question but i will try.

    I have nokia 6230i, software version 3.88, and I'm trying to run Gmail application on it, but i have problem with certificate, it is missing.
    As I read on several forums i need to install certificate.
    So I tried download certificate directly to cell phone, I've got "downloading failed" or unable to install,
    from this source https://www.verisign.com/cgi-bin/sup...etrootcert.cer

    I thought that if I will upload .cer file directly to phone memory I will be able to install it manually using phone, but cer file is unrecognised.
    so i need this certificate but i have no idea how to put it to phone.

    anyone can help?
    AFAIK, you cannot add a certificate like this to your device - they come with the firmware only. So I would recommend you to upgrade the firmware of your device to the latest one available on the internet and your issue will be resolved else take help from gmail support site.
    Thanks,
    Ekta

  13. #13
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,104

    Re: HttpsConnection: Certificate failed verification

    Quote Originally Posted by obdarowany View Post
    I tried download certificate directly to cell phone, I've got "downloading failed" or unable to install.
    You are able to install authority certificates, however, your Nokia model is very old. It is from 2005 and supports a certificate file format which is not very common: WPKI.
    Quote Originally Posted by ektasrv View Post
    Your issue will be resolved.
    obdarowany, do you have problems installing GMail (the application itself) or using it (connecting to Google)? I guess, you face the latter. Ekta, consequently, we do not talk about code-signing certificates. Certificates are installable. Nevertheless, obdarowany, I recommend the same as Ekta: Try to get the latest firmware. Perhaps, it installs the certificate in a version GMail is looking for. I cannot check, because I do not have your model at hand right now.

Similar Threads

  1. Nokia Tech Specialists, can you help me in installing User Certificate in Nokia 6230i
    By umeshbansal79 in forum Mobile Java Networking & Messaging & Security
    Replies: 17
    Last Post: 2008-01-09, 18:20
  2. Failed MIDlet install with VeriSign certificate
    By chgru in forum Mobile Java Networking & Messaging & Security
    Replies: 14
    Last Post: 2006-06-06, 16:57
  3. Signing midlets with Verisign certificate for Nokia 6600
    By rmellado in forum Mobile Java General
    Replies: 0
    Last Post: 2004-07-02, 10:36
  4. How do I generate my own content certificate for a 7650
    By jbb1003 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2002-12-05, 12:13
  5. Please help implementing WTLS
    By Nokia_Archived in forum WAP Servers
    Replies: 1
    Last Post: 2002-05-20, 13:27

Posting Permissions

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