[SOLVED]Stock 2.3 rooted Mail.apk SSL connection untrusted certificate problem - Desire Q&A, Help & Troubleshooting

Hello!
Was unable to make SSL connection to POP or SMTP server with untrusted certificate in Stock 2.3 rooted HTC Mail.apk, always appear warning and no connection are made.
Somebody know how possible to fix this issue?
In FROYO Mail.apk allow to make connection that way. Simple amend Mail.apk (deodexed) from froyo build not help - FC.
So can't send e-mail without SSL
Don't want to use K9 or email.apk/google(it store mails not on sdcard).
Any clue will help please?
Thank in advance

Same problem here! Would really like to be able to use HTC-Mail app

Yeah me too, but not able to send eMails, cause my mail server ask SSL connection to send mails. So stacked here with it, thanks god rest work charm.
Tried to use eMail.apk from android , but it store emails on ROM, so if you got a lot mails with attach it will fill you free space for applications.
Sorry posted incorrect place.

Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums and Read THIS
Moving to Q&A

Found problem possible solution.
Get cacerts.bks from device located /system/etc/security.
Get Portecle to PC.
Open your cacerts.bks
Download necessary certificate, for me worked .cer base64 encoding.
Add certificate (password field was empty for me).
Push back to device cacerts.bks /system/etc/security. (don't forget chmod 644 for it)
For me helped to open POPs on 995 port, and don't have any more question about untrusted certificate.
Best wishes

Related

How to setup E-Mail Encryption (S/MIME)

Although PGP may be nice, the unfortunate fact is that it doesn't just "hook in" nicely to WM6 right now.
The track favored by the industrial giants is S/MIME, which is what Outlook and Netscape use. OpenSSL also includes the basic plumbing to do S/MIME stuff.
Let’s try to compile a simple step-by-step description with this thread, so as soon as it is complete we can create a wiki entry.
Step1: Setup Outlook utilize s/mine
Step1.1: Making a new X509 certificate
First, get and install the latest version of OpenSSL (if your OS doesn't already come with it). For M$ Windows you will find a installer here.
Next, you'll need to make a key pair so go to the bin folder and type:
% openssl genrsa -des3 -out keyfile 1024
This will make a key pair file. The private key will be encrypted with Triple DES. This means that anytime you do anything with the private key (like sign a message), you'll have to provide a passphrase (which you set at generation time). If you don't want to do this, then leave -des3 out, but just know that anyone who gets a copy of your key file can sign messages from you and read your encrypted mail.
To allow that everyone who received a signed email from you can verify the signature, you should create now a Certificate Signing Request, to get it signed by some root certificate, but this is optional, you can also create your own Certification Authority. But as long as the recipient has not imported your CA root certificate, one will be cluttered by warnings and error messages every time a signed and or encrypted email is displayed.
So I propose to get it signed by any common public CA. I choose
Thawte as an example as they offer the service for free. But you can choose any other you like.
So go sign up with Thawte's Freemail program and request a new certificate. At this point, go to the bottom of the form where it says "Developers of New Security Applications ONLY". Check the box that says "Paste in CSR Certificate Enrollment". Then click the button right below.
On the next screen there's probably nothing to do but hit "next>" when it asks about your name.
On the next screen there's probably nothing you should do but choose all of your e-mail addresses and hit "next>". Thawte advises that not all mail clients can handle having multiple e-mail addresses attached to a certificate, which means that if you send e-mail to someone using one of these clients, they may get a warning that the certificate doesn't match the message's From: line.
Same thing on the next screen.
On the next screen, accept the default extensions.
On the next screen, you'll see instructions telling you to make your certificate request, with a 16 character garbage string as the Common Name. At this point, you should go back to the shell window and do:
% openssl req -new -key keyfile
Answer all the questions that openssl asks, but be sure and paste in the 16 character garbage string Thawte gave you for the Common Name. Copy and paste the certificate request into the box on the Thawte form and hit "Next>".
Make sure everything looks ok on the last screen and hit "Finish".
A short time later, you should get an e-mail telling you your new certificate is done.
Go to the page (link) in the e-mail save it to a file in the openssl/bin folder.
The saved SPC file is a simply DER encoded PKCS#7 file containing the certificates.
Next, type:
openssl pkcs7 -print_certs -inform DER -out certs.pem -in file (where file is the name of the file with the PKCS7 stuff)
You should get out a bunch of certificates. You'll need to look at the text above each one to find the one that is your certificate. The rest are part of Thawte's Certifying Authority. It turns out that if you want your messages to verify correctly, you must also include Thawte's intermediate CA key.
There should be 3 certificates. The file certs.pem will then contain all the certificates in PEM form, you can manually cut and paste them. The one whose identity is your e-mail address is your certificate. The one whose subject and issue are identical is the Thawte CA root. You won't need that one, since we'll include it in the trusted root file later if it is not already there. The 3rd one will have the CA root as the issuer and something else as the subject (which will be the same as the issuer of your certificate). You need to save that certificate as an additional certificate for signing. We'll refer to the file containing this cert as othercert.
When you're done with all of that the pieces you need to keep are the key file you generated at the beginning (remembering the passphrase, if you set one), the intermediate cert between the Thawte CA root and your cert, and the certificate chunk for your e-mail address you got out of the last step. You're now ready to use S/MIME!
Step1.2: Importing in OUTLOOK
Outlook uses the pkcs12 format. OpenSSL can import and export certificates and private keys so that you can use the same cert and key pair on all your mail clients. To move a keypair and cert from OpenSSL to Outlook, you need to export it:
% openssl pkcs12 -export -inkey keyfile -certfile othercertfile -in certfile -out mycert.p12
This will ask you for a passphrase. This phrase locks the .p12 file. Outlook will ask this passphrase later.
Now open Outlook and go to Extras and open something called like Thrust center (I just have a German version so I can just guess).
Go to Email Security and click on Import, select your p12 file, enter your passphrase and click on OK.
In the next window you have the option the change the security level, medium means it will ask just for your permission, high it will additional ask for a passphrase, which will be defined if selected (not the same as used for protecting the keys).
On the same page section secure email (or something like that) you can change the settings concerning ciphering and signing algorithm.
You should choose for signing not MD5 as it is considered as broken, better is SHA1 even if this one is something like semi-broken.
Further you should prefer strong algorithm for instance 3DES instead of DES.
Select S/mime as format and give the settings a name before saving.
Now you are ready to use s/mime for signing and encrypting!
Step2: WM 6
Next step would be to import it in pocket outlook by just copy it to the Hermes and click on it.
I ll be honest, I didn't read your entire post
Just wanted to point out that in order to send an encrypted email to someone, you need to have his public key. Those keys are usually stored in a corporate directory, which need to be accessed in order to send the mail.
Thanks for your comment!
fun_key said:
I ll be honest, I didn't read your entire post
Just wanted to point out that in order to send an encrypted email to someone, you need to have his public key. Those keys are usually stored in a corporate directory, which need to be accessed in order to send the mail.
Click to expand...
Click to collapse
This is quit clear but for simply signing my own mail, just my privat key is required. As long as this is not working, encryption will also not work.
So the main problem is that Outlook is matching the certificate to email account, so most likely something with the certificate contained information
seems to be wrong...
Just for the records - as it seems I just soliloquise:
So I managed to get it working with Outlook!
I also successfully imported the same p12 certificate on my hermes.
For Pop3/SMTP accounts in WM6:
Receiving encrypted mails is working, the automatic s/mime decryption works fine.
But sending: under message options of a new email, encryption and signing is disabled !?!
Same for my synced outlook folder.
Could that be an issue with WMXL v0.21 ??
Maybe I should take BLACK 2.0 for a spin - it seems to be newer...
Or is s/mime encryption/signing only supported for exchange accounts?
... an other thing (outlook releated)
- please check the level of thrust for your own as well for imported certs
if the trustlevel is not set correctly outlook will refuse it (error: something
like certificate is invalid) - normaly that means a CA is missing the sequence
of signing CAs from the ROOT CA to the personal certificate
- If you receive a signed email: if you click left on the senders name and
select add to contects the cert is added to the new contact as well, as
soon as you save it, and the contact already exists select update.
Maybe this is the reason why using s/mime on WM6 is not supported as the contact database is not storing any certs ?!?
So its only working together with Exchange?
http://www.jacco2.dds.nl/networking/windowsmobile-smime.html
Hi,
I use WM 6.1 on my Hermes (CRCs stable version) and want to use e-mail encryption.
But it is not possible. Import of the private key was OK, now I tried to send a message to a user with a public key in GAL, but failure is "Error Crtifcates missing".
So I import the private key to my contact, but same failure.
Why does the device not find the public keys?
Karl
karlh said:
Hi,
I use WM 6.1 on my Hermes (CRCs stable version) and want to use e-mail encryption.
But it is not possible. Import of the private key was OK, now I tried to send a message to a user with a public key in GAL, but failure is "Error Crtifcates missing".
So I import the private key to my contact, but same failure.
Why does the device not find the public keys?
Karl
Click to expand...
Click to collapse
You need to import the certificate/public key of the recipient, also check the Key Usage extensions within the certificate, if they dont have the correct ones for e-mail encryption then your stuffed.
MrGAN said:
Just for the records - as it seems I just soliloquise:
So I managed to get it working with Outlook!
I also successfully imported the same p12 certificate on my hermes.
For Pop3/SMTP accounts in WM6:
Receiving encrypted mails is working, the automatic s/mime decryption works fine.
But sending: under message options of a new email, encryption and signing is disabled !?!
Same for my synced outlook folder.
Could that be an issue with WMXL v0.21 ??
Maybe I should take BLACK 2.0 for a spin - it seems to be newer...
Or is s/mime encryption/signing only supported for exchange accounts?
Click to expand...
Click to collapse
Answer find :
Sadly, Microsoft decided to not support S/MIME with SMTP, the Internet industry standard for e-mail. If your company or ISP uses another mail server than Exchange you will not be able to use the features "Encrypt message" and "Sign message" in Windows Mobile's "Messaging" application. The option "Security" is ghosted. This is clearly an example of vendor lock-in. It is an attempt by Microsoft to lock Windows Mobile users into Exchange and their other product offerings. I cannot think of a technical reason why Microsoft could not support SMTP for secure e-mail. Storing certificates on mobile devices takes valuable memory, but most certificates are only 1-2 KB. The least they could have done is use open standards such as LDAP for looking up certificates of recipients. (There is a "Check Names" option in WM6 where you can lookup names in an online server but I don't know if that means LDAP and if certificates are actually checked).
Click to expand...
Click to collapse
Grrr !!

Disable Server Certificate

I've done some searching and one thread on this forum indicates it is not possible to Disable / Ignore Server Certificate checks.
While I have read that some roms have been cooked to do this?
Is there a hack or anything that I can apply to stop "server certificate is not valid" messages?
Thanks.
Lazarous said:
I've done some searching and one thread on this forum indicates it is not possible to Disable / Ignore Server Certificate checks.
While I have read that some roms have been cooked to do this?
Is there a hack or anything that I can apply to stop "server certificate is not valid" messages?
Thanks.
Click to expand...
Click to collapse
A little more information would be really great... Seriously, we know absolutely nothing about your device, ROM version, Exchange server version, etc...
Ah, I do apoligise, I thought it was generic and am fairly new to this!
I am running WM6 on a Vario MDA II.
The message happens when I try to connect to my internet provider to download POP mail.
Lazarous said:
The message happens when I try to connect to my internet provider to download POP mail.
Click to expand...
Click to collapse
So you've ticked the SSL required box on your pop settings for that account?
Does it need SSL? Try it unticked.
Yes. The SSL is ticked.
Without it, it does not work. With it, it works, I get the error -but- can continue.
So far I remember, it is possible to disable cert check (for WM5 at least). Someone posted the required reg tweak in the hermes forum a long time ago.
Good luck for finding it
The easiest way is still to add the CA to the trusted root
try this (worked on WM5),
http://winzenz.blogspot.com/2006/03/hacking-your-windows-mobile-50.html

Help with exchange server issue

well i'm having problems with my Att 8525. I need to find a way for me to be able to connect to the exchange server at my office on an https connection. We just upgraded our security cert and now this issue keeps coming up. Does any one know how to fix it. Here is the error code: 0X8501001
lino8419 said:
well i'm having problems with my Att 8525. I need to find a way for me to be able to connect to the exchange server at my office on an https connection. We just upgraded our security cert and now this issue keeps coming up. Does any one know how to fix it. Here is the error code: 0X8501001
Click to expand...
Click to collapse
What I had to do was delete the server from the 8525 and then re-enter them. The first time it syncs OTA it should have some on-screen commands with buttons for you to hit "verify security settings" and create password for the device. You might have to download a signed security thingamijigger to it though, a certificate or whatever for it.
Hope This Helps,
Jim
I'll give it a shot right now! thanks!
Well that didn't work? umm i tried re-flashing the rom and nothing. Does anyone know how to allow HTTPS on the phone or a way for me not to use port 80 but port 443? thanks!!

Exchange Problems! 0x800072F17

I really didn't want to post this, honest. I have searched xda. I have searched the web. I have found other threads. I have followed the suggestions. But, it seems that my exgirlfriend may have been right, I'm an idiot.
I can't get my Hermes to connect to my office exchange server. The settings on my end are correct, the issue is on my office's end.
When I sync I get an error and support code 0x80072F17. I know that it's a certificate error.
IT is not going to help me on this one, so I'm on my own. I have tried to manually import the certificate. Didn't work. I tried making a regedit I found on another thread. Didn't work. I tried combinations of various settings. I only time I don't get an error code is when my device begins to endlessly prompt me for my password.
I'm sorry to post, but it's my last option. Does anyone have any work arounds for this error? Is there a way to have my device ignore the certificates? Is there anyone out there that can help??
There must be some way. My colleagues, both of them with HTC Trinity's, original WM5 roms came across this error when the certificate on our Outlook Web Access was about to expire. Me, however, with my HTC TyTN WM6 never got this issue. I'm not sure why. I know I've installed a couple of cert cabs, the one they call sdkcerts.cab and one more. Search for that cab and see if it helps. I always figured it made the device accept non signed software but maybe it helps for these kinds of issues as well.
You just must set correct date and time for you phone and try again.
I'll try and give you a hand...
First off, you need to know a few things to set this up.
(1) The FQDN of you company used to access the OWA (Outlook Web Access), for example, mail.mycompany.com/exchange
(2) The NetBIOS name of your local domain at your office (Right click the My Computer icon on your office pc and select Computer Name and note the Domain. If your IT dept did it the recomended way it'll have a .local extension, for instance, lawoffice.local. You'll use just the domain name without the extension, ie: lawoffice. (without the period, LOL)
(3) I absolutely never use my PC to configure my ActiveSync on my devices, just to initailly copy the certificate to the Storage Card.
Two ways to do the certificate. First is the method I always used until I discovered the second method, which is in my sig.
(BTW, substitute YOUR FQDN for mine, duhh! )
(1) Install the certificate on your PC by going to the FQDN of your OWA in Internet Explorer 7 on your PC, not your PDA (XP is much easier, Vista is quite difficult to do this)
For example, open IE7 and put mail.mycompany.com/exchange in the address bar. You should initially get a "There is a problem with this website's security certificate" error, click on "Continue to this Website" Now, next to the address bar at the top you'll see Certificate Error", click it, View, Install, Next, Next, Finish, Yes. Then you'll see "The import was sucessful" <damn, that took a while!)
Close IE 7 completely and reopen it, put "mail.mydomain.com/exchange" in the address bar and you'll go straight to the OWA page, meaning that your import WAS sucessful, yipee!
(2) Click on Start, Run and type "mmc" and OK. This opens the Microsoft Management Console and you'll see Console1 at the top. File, Add/Remove Snap-In, Add, Certificates, Finish, Close, OK. Now expand Certificates, Trusted Root Certification Authorities, Certificates. Find YOUR certificate in the list. Right click, All Task, Export, Next, DER encoded binary, Next, File name. I use c:\mail.mydomain.com so that I can find it easily. Now finish and you'll get the Export was sucessful message.
(3) Connect to your PDA via ActiveSync as a guest, kill your partnership if it exists, you don't need it), copy the cert to your Storage Card and execute it from there.
Now disconnect youR PDA AND open ActiveSync. Server address is the FQDN of you company without the /exchange, for example, mail.mycompany.com. Leave the check mark on the SSL. Next put your user name, password and the NetBIOS name of your domain. The configure you options for the number of days to sync, etc.
That's it!
Now... once you do that and it works, follow this thread, Auto-provisioning POP3 or Exchange mail via UC Mini how-to.
so you can create a cab to do this automatically!
I had this problem before.
For me, it was due to the fact that I installed CESTAR and it messed up my certs. Unintalling CESTAR won't fix it. You got to reload the rom.
From there, I used Leies' Chinese character support which is free and doesn't mess up the certs.
SOLVED
I have been at this issue for over 2 days now, dealing with the error 0x800072f17. About 5 min ago i fixed it. After narrowing the problem down to a certificate error i then proceeded to look at the certificates. There were two in the certificate store (personal) and both were self signed.
One was XXXX (server name) and the other was XXXX(company name) CA.
The server name one had expired. Seeing as how it is self signed, i had our it admin renew it. He forgot to re-assign it to the outlook web access, so i did it myself in the Internet Information Services console on the server.
This had solved only 1/2 of the problem.
The certificate was assigned to the exchange server, not the OWA web site. After discovering that i could not change the issued to name, or create a new certificate (not an admin) i decided to change the activesync settings to sync the INTERNAL OWA address, which is servername.internaldomain.externaldomain.com (this had not previously worked due to the expired certificate)
Now i have a fully functioning push email system.
Nearly all done without admin permissions.
Whilst im new to this site, feel free to pm me about it.
Solving this is the most satisfying thing i have done this year lol.
But does this allow you to get/check email from outside your location? Or do you have to establish a VPN first?

Froyo and exchange

I've searched everywhere but cannot find a solution that works.
I've just got a HTC Desire but cannot get ActiveSync to work. No one other has a Desire with froyo so I cannot get any help here. (they do got iPhones or window phones, which all can sync)
I use the exact same settings as they do, however whatever I do I get "authentication failed", and I know that I user correct domain/user/pass.
I tried owa through the browser and that worked fine. I checked the certificate and that was valid. Any ideas?
We run exchange 2003
go check the exchange original certificate's host name.
This was the problem with my setup.
On 2.1 it didn't care, on 2.2 the domain(host name) must be identical to the actual certificate of the exchange.
yoxler said:
I've searched everywhere but cannot find a solution that works.
I've just got a HTC Desire but cannot get ActiveSync to work. No one other has a Desire with froyo so I cannot get any help here. (they do got iPhones or window phones, which all can sync)
I use the exact same settings as they do, however whatever I do I get "authentication failed", and I know that I user correct domain/user/pass.
I tried owa through the browser and that worked fine. I checked the certificate and that was valid. Any ideas?
We run exchange 2003
Click to expand...
Click to collapse
I'm going to assume you are running Froyo - as most exchange servers require remote wipe and unless your device meets the minimum security requirements it will not work.
Have you installed the certificate? (This may not be necessary as ActiveSync pulls the policies from the server)
Settings > Security > Install from SD Card
Froyo supports ".cer" certificates so you should not have a problem here.
Here is the main thing, in security you need to make sure you do the following:
Change screen lock - make sure you set a PIN password (MUST BE PIN!) If you have pattern password enabled you will not connect.
Lock phone after - this should be set to "Immediately"
After over a week of trying to get it working on my Desire changing to PIN password is what I had to do. Let me know if this works for you.
Failing this download the demo version of TouchDown from the android market and try to connect using the "Automatic" method - if it fails it should give you more details on what the actual problem is or you can always email NitroDesk who make the app for help.
Thanks will try!
tried and it did not help. I'll check with the retards managing our echange. My colleague tried with his user/pass and it worked straight away. there's something wrong with my user i guess.
There is a bug with certain configurations of Exchange 2003 where IIS will throw an error when you log in, if your password is set to expire within 14 days.
Try to log in with outlook web access and see you get "HTTP 401 Unauthorised".
If you do, and press F5 and see if it lets you in. If this happens then you just need to change your password and it should start working on your Desire.
Thanks for your answer st0kes, but it did not help. I can access OWA without any problem. I have tried to set a new password but that did not help either.

Categories

Resources