
- #ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE HOW TO#
- #ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE ANDROID#
- #ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE SOFTWARE#
- #ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE CODE#
Ensure the device and version support the eku command. This section outlines the basic configuration to make a CISCO1921/K9 with version 15.5(3)M4a work as a CA Server. IOS CA Server is used for this configuration example. For the ASA headend, certificate Server Auth EKU is required, while the client certificate needs Client Auth EKU.Ī variety of CA servers can be used such as: The CA allows to embed the required Extended Key Usage (EKU) in the certificate.
#ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE ANDROID#
These are the steps to configure the Windows 7 and Android native VPN clients in order to connect to an ASA headend: Configure Certificate Authority If your network is live, ensure that you understand the potential impact of any command. All of the devices used in this document started with a cleared (default) configuration. The information in this document was created from the devices in a specific lab environment. Galaxy J5 - Android 6.0.1 as mobile client.
#ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE SOFTWARE#
The information in this document is based on these software versions: Prerequisites RequirementsĬisco recommends that you have knowledge of these topics:
#ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE HOW TO#
I believe if I would not allow self signed certs this wouldn't be a big deal as the root cert for the client certificate would exist in the default TrustStore (or at least I hope it would).This document describes how to configure Cisco Adaptive Security Appliance (ASA) Version 9.7.1 and later in order to allow Windows 7 and Android native (Virtual Private Network) VPN clients to establish a (Remote Access) RA VPN connection with the use of Internet Key Exchange Protocol (IKEv2) and Certificates as the authentication method.Ĭontributed by David Rivera and Cesar Lopez Zamarripa, Cisco TAC Engineers. Then use that trust store to setup your SSL Context (also need to use a custom keystore since the client certificate needs to be attached to the request as well). Long story short, setup a custom TrustStore that contains the self signed cert, then export all the certificates from the default trust store and import them into the custom trust store. I was setting up my own custom trust store, however the root certs were not part of it, so calls out to any https would fail.


However the default TrustStore is read-only after an app starts so it's hard to modify it. The issue lies in that the self signed cert can't be used until it exists in the android TrustStore. I think this is because my cert is in my local private store on my dev machine. I tried to put fiddler between the emulator and the endpoint and it comes back with a 200. Throw new KeyManagementException("Key Exception", e) Throw new NoSuchAlgorithmException("Algorithm exception",e) Throw new KeyStoreException("Keystore Exception",e)

InputStream in = new BufferedInputStream(urlConnection.getInputStream()) //<-Blows up here tSSLSocketFactory(context.getSocketFactory()) tRequestProperty("x-ms-version",AZURE_REST_VERSION) (HttpsURLConnection)url.openConnection() SSLContext context = SSLContext.getInstance("TLS") Ĭontext.init(kmf.getKeyManagers(),null,new SecureRandom()) Kmf.init(keyStore, "Password".toCharArray()) KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()) KeyStore = KeyStore.getInstance(keyStoreType) String keyStoreType = KeyStore.getDefaultType() InputStream caInput = new BufferedInputStream(new FileInputStream("/sdcard/Certificate.pfx"))

Here is my Android code: StrictMode.ThreadPolicy policy = new ().permitAll().build() ĬertificateFactory cf = CertificateFactory.getInstance("X.509") This works fine in C# however when I move to Android I'm getting a "file not found" error on the getInputStream() call. I am then doing this (request is an HttpWebRequest): (cert) X509Certificate2 certificate = certCollection Throw new Exception("Error: No certificate found containing thumbprint " + certThumbprint) X509Certificate2Collection certCollection = (X509FindType.FindByThumbprint, certThumbprint, false) X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser) Ĭonsole.WriteLine("Error: The store is unreadable.") Ĭonsole.WriteLine("Error: You don't have the required permission.") Ĭonsole.WriteLine("Error: Invalid values in the store.") The web endpoint requires a cert to be attached to the request for mutual authentication to make the web service call.
#ANDROID MICROSOFT EXCHANGE CLIENT CERTIFICATE CODE#
This code is from a C# app I wrote but am porting it to Android. I am trying to do the following for Android. I have been searching for this for a few weeks and can't seem to find an answer anywhere.
