Sending a certificate form the client to the server... how to ?

how can I send a certificate from the client to the server trough a Java code ??

Short answer: You specify a keyStore.
Either via command line using the -Djavax.net.ssl.keyStore=keystorefile property,
or in Java code:
char[] passphrase = "password".toCharArray();
SSLContext ctx = SSLContext.getInstance("TLS", "SunJSSE");
// KeyStore for the SSL client certificate
KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(new FileInputStream("client-cert.p12"), passphrase);
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509", "SunJSSE");
keyManagerFactory.init(keyStore, passphrase);
// keyStore for trusted server certs or CAs
KeyStore trustedKeyStore = KeyStore.getInstance("JKS");
trustedKeyStore.load(new FileInputStream("verisign-test-cert"), passphrase);
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance("SunX509", "SunJSSE");
trustManagerFactory.init(trustedKeyStore);
ctx.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
SSLSocketFactory sslSocketFactory = ctx.getSocketFactory();
HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
// open the http connection to the party
myConn = (HttpsURLConnection)myURL.openConnection();

Similar Messages

  • Provide steps to send Root CA certificate to the Lync client, getting error" There was a problem verifying certificate from the server"

    Hi,
      I Build an Lync 2013 set up with FEpool, Director pool and Exchange server is integrated. I have windows 8 client machine, with Lync client installed. When I try to login to the lync client, I am getting error like"There was a problem verifying
    certificate from the server".
    When I installed ROOT CA cert  manually on client machine I am able to login to the lync client. similarly if I add my client machine in my domain, I am able to login to the Lync client.
    Now is there any other way to send the certificate automatically to the client machine (Which are NOT part of the DOMAIN) from the server, instead of manual installation process.
    Please help me troubleshoot this problem

    Agree with S Guna, there is no easy way to push a certificate automatically to a client that you don't control other than building an installer package and asking them to run it.  In this situation, if there are a lot of non-domain joined machines
    a third party certificate is the way you need to go.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications

  • Lync 2013 mobile client. Can't verify the certificate from the server. Please contact your support team

    We upgraded Lync Server 2010 to Lync 2013.
    Users are able to login on desktop clients but unable to connect on mobile client. We get following error message:
    Can't verify the certificate from the server.
    Please contact your support team

    Please check the Root CA is installed on your mobile device.
    Can you sign in externally?
    Please check you have updated the DNS records for Lync mobile autodiscover service.
    Lisa Zheng
    TechNet Community Support

  • I send a cookie to the server, but it doesn't come back.

    Hey all:
    I'm attemping send a cookie via an application to the servlet, and then pull that cookie back out from the servlet's response. I want to do this whole process repeatedly while retaining the same cookie.
    Pulling the cookie out on the first request to the servlet works fine because I do not send a cookie to the servlet, and the servlet instantiates a new session. Next, the cookie is sent back to the servlet successfully because it is printed out on the server-side exactly as it appeared on the client side. However, after the servlet responds to that second request and on subsequent requests, I can not pull the cookie out again. On the method call, connection.getHeaderField("Set-Cookie"), the result is null. I've even inspected the connection object, and it seems empty of any cookies whatsoever. Why doesn't the cookie come back on requests after the initial request? Is there anything I can do to make it come back?
    Thanks a ton in advance. Have great day!!!

    you must check that cookie's path set by Tomcat is the one expected by your browser. Otherwise the former won't send it back to the server. I had the same problem because Tomcat sets the cookie path to "/webAppName" and the browser expected it to be "/".

  • Lync 2010 Certificate Issue - "There was a problem verifying your certificate from the server"

    Greetings.
    My Issue:
    Lync 2010 client does not connect to server;error displayed "Cannot sign into Lync. There was a problem verifying the certificate from the server."
    Description:
    The client is running on my Windows 7 box, and my CA server is a Windows Server 2003 box. I have installed the hotfix on the Server 2003 box to update the Web Enrollment portion of CA to allow for newer clients (Vista and 7) to receive certificates from
    this server. 
    Lync server is running on Server 2008 R2 STD, installation was a success.
    The Windows 7 box is a part of the domain.
    I have manually exported the Root CA from my Enterprise CA server from
    Trusted Root Certification Authorities -> Certificates and imported into the same location on my Windows 7 box. 
    If I look at the certification path on the Root CA, on my Windows 7 box,  it says "The certificate is OK." The same goes for the servers involved. 
    Still nothing.
    I have read the other forum posts on here about people having success once they manually import the Root CA from the Enterprise CA server, but this is not my case here. 
    All certificates are successfully assigned on the Lync server box; however, I did have to manually import the Root CA into Lync server's
    Trusted Root Certification Authorities -> Certificates before I could successfully assign them. Had to do this on another deployment I completed, so I didn't think anything of it.
    To recap: it seems that even with my Root CA imported into my Windows 7 box I can still not connect to my Lync server with the client, and I get the error message "There was a problem verifying the certificate from the server."

    Solved
    Solution :  Export certificate from Lync Server Start > Administrative Tools > IIS > Server Certificate > Export >   abc.pfx   save it,  Copy and place the certificate where Ms Lync 2010 client is installed or getting certificate
    error.  Follow these steps on client machine to install certificate 
    Run > mmc > add or remove snap in > certificates > computer account > local computer >finish > ok > expand Certificate > Trusted Root Certification Authorities > Certificate > All task > Import > copy abc.pfx certificate
    and delete unnecessary certificate from there.
    Restart Client machine and open microsoft Lync client 2010 and open option menu > Personal > Advanced > choose Auto Configuration > save ok

  • There was a problem verifying the certificate from the server

    i can not sign in to my lync server in client user and the error message is "There was a problem verifying the certificate from the server".
    i can sign in in my lync server by any account but i can not sign in in other pc clients.

    Hi,there,
    Just some additional info...
    Please go through the following old threads with the same error message
    http://social.technet.microsoft.com/Forums/en-US/ocscertificates/thread/19d74620-9ea8-4f19-bc01-25387e4ee380/
    http://social.technet.microsoft.com/Forums/en-US/ocscertificates/thread/7a973094-6cd1-4f3f-9af0-6d330a9b8428 
    http://social.technet.microsoft.com/Forums/en-US/ocscertificates/thread/4034e791-6c3c-4c35-b936-bca734204fd4/ 
    Hope these helpful!
    B/R
    Sharon
    Sharon Shen
    TechNet Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

  • Problem in sending HTTP request to the server.

    Hi,
    i dveloped an ant script for sar deployment.
    i deployed a sar to my local soa server with ant script. it got deployed succesfully..
    but when i try to deploy to a remote server, getting the below error..
    "Problem in sending HTTP request to the server. Please make sure the server is up and/or check standard HTTP response code for 404"
    but the server is up and runnig and i am able to ping it from my machine and also access the console...
    below is my script
    build.properties
    wn.bea.home=C:/Oracle/Middleware
    all.needed.jars.path=D:/SourceCode/neededJAR
    oracle.soa.home=C:/Oracle/Middleware/Oracle_SOA1
    java.passed.home=C:/Oracle/Middleware/jdk160_24
    #Deployment environment
    deployment.plan.environment=DEV
    #Deploy Action
    deployAction =redeploy
    #credentials
    user=weblogic
    password=welcome1
    #For Composite deployment
    serverURL=http://10.177.154.6:7001
    forceDefault=true
    server=10.177.154.6
    port=7001
    sarLocation=D:/SourceCode/JAR
    build.xml
    <?xml version="1.0" encoding="iso-8859-1"?>
    <project name="soaDeployAll" default="deployAll">
         <echo>basedir ${basedir}</echo>
         <property environment="env"/>
    <echo>current folder ${basedir}</echo>
         <property file="${basedir}/build.properties"/>
         <taskdef resource="net/sf/antcontrib/antlib.xml">
         <classpath>
              <pathelement location="${all.needed.jars.path}/ant-contrib.jar"/>           
         </classpath>
         </taskdef>
         <target name="init">
              <tstamp>
                   <format property="timestamp" pattern="yyyy-MM-dd_HH-mm-ss"/>
              </tstamp>
              <property name="build.log.dir" location="${basedir}/buildlogs"/>
              <mkdir dir="${build.log.dir}"/> <property name="build.log.filename" value="build_${timestamp}.log"/>
              <record name="${build.log.dir}/${build.log.filename}" loglevel="verbose" append="false"/>
              <echo message="Build logged to ${build.log.filename}"/>
         </target>
         <target name="deployAll" depends="init">
         <echo>Deploy for environment ${deployment.plan.environment}</echo>
         <antcall target="deployAllComposites"/>
    </target>
    <!-- Following Actions are performed for Composite files in Managed Server - Deploy,Redeploy -->
         <target name="deployAllComposites" depends="init">
         <foreach target="deployComposites" param="Files">
              <fileset dir="${sarLocation}" casesensitive="no" includes="*.jar"/>
         </foreach>
         </target>
         <target name="deployComposites" depends="init">
         <basename file="${Files}" property="basename"/>
    <echo>Deploy Project ${basename} for environment ${deployment.plan.environment}</echo>
              <if>
                   <equals arg1="${deployAction}" arg2="deploy" />
                   <then>
                        <echo message="Deploying composites in Managed server........." />
                        <ant antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml" inheritAll="true" target="deploy">
                             <property name="serverURL" value="${serverURL}"/>
                             <property name="user" value="${user}"/>
                             <property name="password" value="${password}"/>
                             <property name="overwrite" value="false"/>
                             <property name="forceDefault" value="${forceDefault}"/>
                             <property name="sarLocation" value="${sarLocation}/${basename}"/>
                        </ant>
                   </then>
                   <else>
                        <echo message="ReDeploying composites in Managed server........." />
                        <ant antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml" inheritAll="true" target="deploy">
                             <property name="serverURL" value="${serverURL}"/>
                             <property name="user" value="${user}"/>
                             <property name="password" value="${password}"/>
                             <property name="overwrite" value="true"/>
                             <property name="forceDefault" value="${forceDefault}"/>
                             <property name="sarLocation" value="${sarLocation}/${basename}"/>                         
                        </ant>
                   </else>
              </if>
    </target>
    </project>
    please help....

    Hi,
    Give the serverURL as http://<host>:<managed.server.port>/soa-infra/deployer and try.
    e.g . http://10.177.154.6:8001/soa-infra/deployer
    Regards,
    Neeraj Sehgal

  • My 4th generation iPod Touch won't let me get on to the App Store. When I log on to iTunes, an alert pops up that says the certificate for the server is invalid, and that it may be a server pretending to be iTunes. What should I do?

    My iPod won't let me on to the App Store, and whenever I go on to ITunes, an alert pops up that the certificate for the server is invalid, and that I may be connecting to a server that is only pretending to be iTunes.apple.com and my personal info may be at risk. I downloaded an emulator yesterday from coolroms.com but deleted the app this afternoon. I cleared my safari search data, my cookies and data, and web inspector, which still didn't work. I then proceeded to reset my iPod and then download the newest version of IOS 6.1.5 but yet still am having problems. Also to the App Store and iTunes, several other apps aren't working. Any help here?

    Also, when I go on to safari, another alert pops up that safari cannot verify the identity of the website, anything that I type in to as common as google.com. It gives me 3 options to either cancel, look at details, and continue. I've looked at the details of the website of Google and it is legitimate the site. Any help?

  • CA issue - Workstation signin "There was a problem verifying the certificate from the server"

    Hi,
    We have issues with all workstations on our domain. I just recently setup Lync 2013 server on a windows 2012 OS. When I went to test sign-in, I received a message "There was
    a problem verifying the certificate from the server". To fix this issue, I had to download the cert and import it into Trust Root Certification Authorities on the local workstation. This will be impossible if I have to do this for multiple machines.
    Is there a way around  this? Why is it asking to do this?
    Thanks guys, much appreciated.
    MM

    You can follow the instructions here to use Group Policy to install your root certificate to all your workstations.
    Or you could re-deploy your CA as an Enterprise CA.
    Hi Georg,
    Thank you for your reply.
    I did deploy my CA as an Enterprise CA..... Not sure why its still asking me to install on workstations?
    How can I confirm its an Enterprise CA?
    Thanks,
    MM

  • Send Data back to the Server

    Hi.
    how to send data back to the server using J2ME or how to communicate with server using J2ME

    i am using http its work well on emulator but when i install the application on sony ericsssin p910i or k700i or nokia 7710 then its not working and simply hang.
    here is sample code which is run well on emulator but not on mobile.
    what is the problem in that or how can this code run in mobile is there any mobile specific setting or internet setting.
    Pls reply asap.
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    * An example MIDlet to invoke a CGI script.
    public class ThirdExample extends MIDlet {
    private Display display;
    // String url = "http://www.javacourses.com/cgi-bin/getgrade.cgi?idnum=182016";
    String url = "http://sampler.infopro.stpn.soft.net/midletdata.asp?name=name";
    public ThirdExample() {
    display = Display.getDisplay(this);
    * Initialization. Invoked when we activate the MIDlet.
    public void startApp() {
         try {
    getGrade(url);
         } catch (IOException e) {
         System.out.println("IOException " + e);
         e.printStackTrace();
    * Pause, discontinue ....
    public void pauseApp() {
    * Destroy must cleanup everything.
    public void destroyApp(boolean unconditional) {
    * Retrieve a grade....
    void getGrade(String url) throws IOException {
    HttpConnection c = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer b = new StringBuffer();
    TextBox t = null;
    int x = 5, y =7;
    try {
    c = (HttpConnection)Connector.open(url);
    c.setRequestMethod(HttpConnection.GET);
    c.setRequestProperty("IF-Modified-Since", "10 Nov 2000 17:29:12 GMT");
    c.setRequestProperty("User-Agent","Profile/MIDP-1.0 Confirguration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-CA");
    os = c.openOutputStream();
    String str = "?idnum=182016";
    byte postmsg[] = str.getBytes();
    for(int i=0;i<postmsg.length;i++) {
    os.writeByte(postmsg);
    os.flush();
    is = c.openDataInputStream();
    int ch;
    while ((ch = is.read()) != -1) {
    b.append((char) ch);
    System.out.println((char)ch);
    t = new TextBox("Final Grades", b.toString(), 1024, 0);
    } finally {
    if(is!= null) {
    is.close();
    if(os != null) {
    os.close();
    if(c != null) {
    c.close();
    display.setCurrent(t);

  • The SSL certificate of the server is expired

    Today, I accessed Beehive Online via Oracle Beehive Extentions for Explorer.
    I cannot use Beehive Online with error message "The SSL certificate of the server is expired".
    How should I do?

    We're looking into it, meanwhile you can use a Webdav connection.
    Thanks,
    Jereen

  • An error occurred searching the certificates for the server. ...

    Hi,
    I am using DSEE 6.2 in Fedora 7
    Each time I access the "Security" tab of my server in DSCC. I get the following error:
    "*An error occurred searching the certificates for the server. An authentication error occurred connecting to xxxxx. Check that the User ID and password are correct*"
    I need to click the "Click here to update authentication" link in the same tab and enter the User ID and password for the user that create the server. The error will gone for this session but reappear as I start a new session in DSCC

    This looks like a known bug. Please log a support case so this can be investigated further
    http://sunsolve.sun.com/search/document.do?assetkey=1-1-6537622-1

  • AOL email cannot send PASSWORD securely to the server???

    Hi, When I set up any aol account in mail, and click create, it always comes up with cannot send password securely to the server. This problem happened right after updating to snow leopard. Any one else have the same problem? Any solutions? Thanks.

    For years and years most email servers accepted connections that were insecure, meaning that passwords were transmitted in plain text, and the email messages came back as plain text as well.
    Now many servers encourage the use of SSL connections, which encrypts the data in both directions. Mail is trying to warn you that the SSL connection cannot be established, and therefore your data could be intercepted in transmission.
    AOL's website (http://about.aol.com/faq/openmailaccess) states that they do not support SSL connections, therefore your only method of accessing your email is to use an unsecure connection.
    Alternatively you could go to AOL.com (not use Mail.app) and read your email here as this will establish a secure HTTPS connection.
    The best solution though is to stop using AOL and get either a MobileMe or a gmail account.
    Regards,
    -Ryan

  • Installed certificate And testing online shows no certificate in the server.

    I just got a new server certificate for some web services of my server 2003, but after installing it I keep getting that there's no certificate in the server with tools like https://www.sslshopper.com/ssl-checker.html and https://www.digicert.com/help/
    My server is: remote.visaustralia.com
    and what I did was the following:
    I imported the certificate in the "certificates" complement of the Management Console. Then in the IIS I selected my default website>Directory Security>Server Communications and added my server certificate.
    And
    (Pictures are at 50% size, if you need to see details just right click it and open in new window) I would appreciate any help on this matter. 

    Hi,
    This is not a DNS/DHCP/IPAM question, but I will try to help.
    In addition to importing the certificate you must also bind it to port 443.
    https://www.digicert.com/ssl-certificate-installation-microsoft-iis-7.htm
    Thanks
    -Greg

  • Show "iCloud encountered an error while trying to connect the server", How to solve? Thanks

    Show "iCloud encountered an error while trying to connect the server", How to solve? Thanks

    Smae issue here.
    Started today June 20, any ideas?

Maybe you are looking for

  • Check what oracle installed components are actually being used in database

    I have been allotted a new database which I have to optimize. So I am thinking about removing some installed components which I think are not being used in any way in database (i.e procedures calls etc). I can see a whole lot of components like "SDO"

  • Bssid changing on airport

    I was wondering if anyone could explain to me why/how my Airport Extreme would change it's BSSID. Here's a scan that I took from my Mac: Patmos:builds rsalo$ airport -s                             SSID BSSID             RSSI CHANNEL HT CC SECURITY (a

  • Cannot disable Developer Menu in Safari. No option in Preferences/Advanced

    The option has vanished. This option really interferes with 1Passwd's fill shortcut (⌘-\) instead loading Page Load Test. (really annoying) Here is screencap: What happened to the option????

  • Installing Windows 7 via Bootcamp with OS X Lion

    Hi all, I have just bought a new 21.5 inch iMac preinstalled with SL and have the Install DVD for 10.6.7. I have recently upgraded to Lion OS X (eligible for free download due to recent purchase of the iMac), but now want to install Windows 7 via Boo

  • Long procedure execution time

    Hello, I hav a procedure which consists of select and insert statements(includes Union, Minus, DataType conversions etc.). Three tables of around 27 fields each, are involved in procedure. Table has around 87-90 lakhs of records. This procedure is ta