java - Issue with sun.security.util while upgrading to from jdk 1.4 to jdk1.6 -


i porting webapplication written in jdk1.4 1.6. while compiling getting warnings related sun.security package deprecation. though can compile warnings, prefer compile without warnings.also become errors in future when using jdk 1.7 version.

warnings

warning: sun.security.util.derencoder sun proprietary api , may removed in future release 

i ready change source code removing sun packages , use third party free package. fixing other issues have rewritten other parts of code(which uses classes sun.misc.base64decoder) using org.apache.commons.codec .but couldn't find replacements sun.security.util.

my server apache tomcat, using other server libraries *ibm* won't feasible.

edit

i using classes including(not limited to) sun.security.util.derencoder, sun.security.util.derinputstream ,sun.security.util.dervalue,sun.security.util.objectidentifier ,sun.security.x509.x500name etc

in fact, sun.security.util.derencoder interface , trivially create own version. difficult task locating , dealing classes implement interface.

for worth, derencoder interface defines single method:

  public void  derencode(outputstream out)         throws ioexception; 

the method supposed output der encoding this supplied stream.

der encoding scheme ans.1 data. afaik, interface internal sun implementation of x.509 certificates , on. suspect fixing not matter of finding replacement class. rather, think need understand reason why code (apparently) using interface, , figure out "correct" way needs do. ("correct" ... in using public apis.)

update

based on other classes using, think need x500 java implementation:

  • one possibility "oracle security developer tools security engine" (aka "oracle fusion middleware security engine"). appears part of oracle 10g , 11g product suite, may available separately. link: http://docs.oracle.com/cd/e23549_01/apirefs.1111/e10674/toc.htm

    as far can tell, can't stuff free. can embedded in various paid-for oracle products.

  • another possibility bouncycastle x509 implementation.


note java 6 eol'ed, should porting java 7.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -