• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Unable to get security certificates from HTTPS Server

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Below is the requirement for which i need to get hold of security certificate.

The Requirement:
Prior to processing standard Net Connect HTTPS transactions, the Net Connect client must check the certificate on the HTTPS server.

The client must check the following four conditions in order to validate if certificate is valid:
1) The URL in the certificate must match the URL retrieved from ECALS
2) The certificate must be from a valid certificate authority
3) The certificate must not be expired

When i open http connection to HTTPS URL and debug, HttpURLConnection object, i could notice security certificates in the object.
I need help in how to get these certificates from HttpConnection InputStream.

I've tried doing:

is = httpcon.getInputStream();
CertificateFactory cf = CertificateFactory.getInstance("X509");
X509Certificate c = (X509Certificate) cf.generateCertificate(is);

but it throws exception "Invalid DER Encoded format".

Not sure how to get hold of certificates at HTTPS server.

Look fwd to timely help

regards
tarandeep
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like this is a very old thread ..but I am now in this ..any resolution was found for the below...
The Requirement:
Prior to processing standard Net Connect HTTPS transactions, the Net Connect client must check the certificate on the HTTPS server.

The client must check the following four conditions in order to validate if certificate is valid:
1) The URL in the certificate must match the URL retrieved from ECALS
2) The certificate must be from a valid certificate authority
3) The certificate must not be expired


thanks
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't really see your question. What have you tried and why did it fail?
reply
    Bookmark Topic Watch Topic
  • New Topic