Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6812251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:25:35+00:00 2026-05-26T20:25:35+00:00

I am using self signed certificate for HTTPS connection to and from Axis2 server.

  • 0

I am using self signed certificate for HTTPS connection to and from Axis2 server. All of these connections works fine and as desired.

There is a part in my web service which is responsible for sending emails. I am using GMail for the purpose of sending mail.

The problem is when I try to send a mail using an SSL connection I get certificate error, i.e. GMail certificate is not trusted. I had faced a similar problem with JBoss as well. For once I was able to get around this problem downloading GMail certificate and than importing it into the Keystore using Keytool utility. For a long time this had worked.

But only recently I have started to get the Old problem again. I tried to use the old technique that fixed the problem last time, but this time that did not work. (not sure why)

I reckon that GMail uses a signed certificate which out of the box should be trusted by any of the servers, let it be JBoss or Axis2. I fail to figure out what the problem actually is. Is it because of using of Self Signed certificate? Or are there any specific way of creating it so that the Signed certificates are trusted?

Thanks for the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:25:36+00:00Added an answer on May 26, 2026 at 8:25 pm

    To have a SSL encrypted Server/Client communication we need to Keystores and Truststore for Server & Client. Following are the steps to create them.

    #Creating Server keystore and exporting a certificate
    keytool -genkey -alias serverkeys -keyalg RSA -keystore server.keystore -storepass changeit -keypass changeit -dname "CN=test.com, OU=Test, O=Test, L=London, ST=London, C=UK"
    keytool -export -alias serverkeys -keystore server.keystore -storepass changeit -file server.cer
    
    #Creating Client keystore and exporting a certificate
    keytool -genkey -alias clientkeys -keyalg RSA -keystore client.keystore -storepass changeit -keypass changeit -dname "CN=test.com, OU=test, O=test, L=London, ST=London, C=UK"
    keytool -export -alias clientkeys -keystore client.keystore -storepass changeit-file client.cer
    
    #Making a copy of cacerts file. These copies will be used for client/server truststore
    cp /usr/java/jdk1.6.0_14/jre/lib/security/cacerts client.truststore
    cp /usr/java/jdk1.6.0_14/jre/lib/security/cacerts server.truststore
    
    #Copying server certificate to Client truststore
    keytool -import -trustcacerts -v -keystore client.truststore -storepass changeit -file server.cer
    
    #Copying Client certificate to Server truststore
    keytool -import -trustcacerts -v -keystore server.truststore -storepass changeit -file client.cer
    

    During the first few iteration I was not using cacert but directly create truststores from the certificate and that too worked well. Problems came up when we need to connect to some other services using SSL and connection could not be establised even when the service used a Signed Certificate.

    For example connecting to GMail SMTP server would faile if the truststore were not created up from cacerts. Reason being even though GMail uses a signed certificate, we wold be using a truststore that would not know if the GMail certificate can be trusted. For this reason we used cacerts to create out truststore. After which we were able to connector any service that uses a Signed Certificate.

    If in case we encounter a unsigned certificate we will then have to add them to the Components Truststore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using self-signed SSL certificate for my private HTTPS server. The problem is is
I am using a Self signed certificate for HTTPS. I have it ready. Could
How do I create a self-signed certificate for code signing using the Windows SDK?
I configure my web application to use SSL using my own self signed certificate.
I created a self-signed certificate (created using OpenSSL) and installed it into the Certificate
I've generated a self-signed certificate for my Java app using keytool. However, when I
I'm trying to test a secure http connection using self signed certificates... just for
I've built a self hosted wcf server, using wsHttpBinding . I'm running Win 2003
My Tomcat needs to connect to another web server (at https://foreign.example.com ) using SSL
I want to make AJAX calls to a secure server that uses a self-signed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.