Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2010-2011 eBusiness Information, Excilys Group Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed To in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package com.googlecode.androidannotations.annotations;
Use this annotation to get an HttpClient instance with the specified KeyStore and TrustStore configured to perform an HTTPS request

All the parameters are optional

trustStore: int, Resource id of your trust store file ex R.raw.cacerts.bks Typically your servers trusted certificates (public key, Root Chain Authority etc)

trustStorePwd: String, Your trust store password (default is changeit)

keyStore: int, Resource id of your keystore Usually your private key (client certificate)

keyStorePwd: String, Your KeyStore password (default is changeit)

allowAllHostnames: boolean, if true, authorizes any TLS/SSL hostname (default true) If false, Hostname in certificate (DN) must match the URL.

Note: Prior to ICS, Android accepts [Key|Trust]store only in BKS format (Bouncycastle Key Store)

Nabil Hachicha
public @interface HttpsClient {
	public static final String DEFAULT_PASSWD = "changeit";
	int trustStore() default .;
	int keyStore() default .;
	boolean allowAllHostnames() default true;
New to GrepCode? Check out our FAQ X