Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What replaces Java's sun.security packages?

This question has been asked on the Oracle Forum as, "How to replace sun.security packages??" (https://forums.oracle.com/thread/2560664), but has not yet received a response.

We have an application that currently makes use of:

import sun.security.provider.X509Factory;
import sun.security.x509.AlgorithmId; 
import sun.security.x509.X509CertInfo; 
import sun.security.x509.X509CertImpl; 
import sun.security.x509.CertificateAlgorithmId; 
import sun.security.x509.CertificateValidity; 
import sun.security.x509.CertificateSerialNumber; 
import sun.security.x509.CertificateSubjectName; 
import sun.security.x509.CertificateIssuerName; 
import sun.security.x509.CertificateX509Key; 
import sun.security.x509.CertificateVersion; 

All of these produce a compile time messages containing: "... internal proprietary API and may be removed in a future release"

There are java and javax security packages, but they seem not to contain equivalents for sun.security.x509 & etc..

What should be used to replace the sun.security packages?? And, are there guidelines for the migration?

like image 252
user1579485 Avatar asked Jul 17 '13 17:07

user1579485


1 Answers

The answer of course is the java.security.cert package. If that doesn't meet your requirements I would review them, or have a look at Bouncy Castle.

like image 157
user207421 Avatar answered Sep 20 '22 10:09

user207421