Java.security.InvalidKeyException: Unsupported key type: SunPKCS11-MyPKCS11

I am having a very strange issue with my CAC card. I wrote a small Java program to login into ProjectForge.mil webservice
ICollabNetSoap m_sfSoap = (ICollabNetSoap)
ClientSoapStubFactory.getSoapStub(ICollabNetSoap.class, "https://project.forge.mil/");
String sessionId = m_sfSoap.login("", "");
After entering CAC PIN, it is throwing exception saying that "javax.net.ssl.SSLHandshakeException: Received fatal alert: unsupported_certificate".
More specific exception is:
Caused by: java.security.InvalidKeyException: Unsupported key type: SunPKCS11-MyPKCS11 RSA private key, 2048 bits (id 39632224, token object, sensitive, unextractable)
Note: I have asked three of my co-workers to run the same program using their CAC's and seems to be working fine.
Only the difference between their CACs and mine is CA(Certificate Authority Value. Their's is 24 and where as mine is 25). It looks like JVM was not able to understand the private key of my CAC.
On the other note, my CAC cworks fine with web service client application that was written in .Net.
I am using Jdk-1.6.0_26 and I have already downloaded and installed latest jce .jar files.
Any help is greatly appreciated
Here are the exception details:
=======================================
[java] Tue Aug 02 17:07:54 MST 2011 URL assignment worked
[java] Tue Aug 02 17:07:54 MST 2011 Trying login...
[java] Exception in thread "main" AxisFault
[java] faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
[java] faultSubcode:
[java] faultString: javax.net.ssl.SSLHandshakeException: Received fatal alert: unsupported_certificate
[java] faultActor:
[java] faultNode:
[java] faultDetail:
[java] {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLHandshakeException: Received fatal alert: unsupported_certificate
[java] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
[java] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1720)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:954)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
[java] at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
[java] at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
[java] at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
[java] at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
[java] at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
[java] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
[java] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
[java] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
[java] at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
[java] at org.apache.axis.client.Call.invoke(Call.java:2767)
[java] at org.apache.axis.client.Call.invoke(Call.java:2443)
[java] at org.apache.axis.client.Call.invoke(Call.java:2366)
[java] at org.apache.axis.client.Call.invoke(Call.java:1812)
[java] at com.collabnet.ce.soap50.webservices.cemain.CollabNetSoapStub.login(CollabNetSoapStub.java:115)
[java] at com.collab.examples.LoginTF.main(LoginTF.java:30)
[java] {http://xml.apache.org/axis/}hostname:GDYL8420N5B
[java] javax.net.ssl.SSLHandshakeException: Received fatal alert: unsupported_certificate
[java] at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
[java] at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
[java] at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
[java] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
[java] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
[java] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
[java] at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
[java] at org.apache.axis.client.Call.invoke(Call.java:2767)
[java] at org.apache.axis.client.Call.invoke(Call.java:2443)
[java] at org.apache.axis.client.Call.invoke(Call.java:2366)
[java] at org.apache.axis.client.Call.invoke(Call.java:1812)
[java] at com.collabnet.ce.soap50.webservices.cemain.CollabNetSoapStub.login(CollabNetSoapStub.java:115)
[java] at com.collab.examples.LoginTF.main(LoginTF.java:30)
[java] Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: unsupported_certificate
[java] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
[java] at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1720)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:954)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
[java] at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
[java] at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
[java] at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
[java] at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
[java] at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
[java] ... 11 more
[java] Java Result: 1
==================================================================
I have captured more specific exception which says
Caused by: java.security.InvalidKeyException: Unsupported key type: SunPKCS11-MyPKCS11 RSA private key, 2048 bits (id 39632224, token object, sensitive, unextractable)

Thanks, I have installed OpenSSL.
Here is the PEM copy of my certificate
==================================================
-----BEGIN CERTIFICATE-----
MIIElTCCA32gAwIBAgIDG5RgMA0GCSqGSIb3DQEBBQUAMFcxCzAJBgNVBAYTAlVT
MRgwFgYDVQQKEw9VLlMuIEdvdmVybm1lbnQxDDAKBgNVBAsTA0RvRDEMMAoGA1UE
CxMDUEtJMRIwEAYDVQQDEwlET0QgQ0EtMjUwHhcNMTEwMzI1MDAwMDAwWhcNMTIw
NTI4MjM1OTU5WjCBjDELMAkGA1UEBhMCVVMxGDAWBgNVBAoTD1UuUy4gR292ZXJu
bWVudDEMMAoGA1UECxMDRG9EMQwwCgYDVQQLEwNQS0kxEzARBgNVBAsTCkNPTlRS
QUNUT1IxMjAwBgNVBAMTKVlBUlJBUFVSRUREWS5TT01BU0VLSEFSQS5SRUREWS4x
Mzg2Nzc5MDM4MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArPjzB0Lk
FAMegXbka3944sAm2jq7qKGnpIYhL82/gAj7zJzAPJsoE66L9spiEoDfh0osy2pO
wqH/0NfQdGjgIGjDG2OrKhTxYXBqKZk2p7V84H4RK5duB8JU7B7R7uY+U9RkyiNd
YuSycGXKULGa5eow/OCCI3iN8A+4NjpvswKhw3WvWhDow4xl1x6E6I89RhscU78z
D6VtamidLK8mCWDihplmSFtCCCK5RsUjv/KuZcASAHe3Tb7di2Fb68liS5Yhf5v7
SrezRYHbHpAZMOImy74t1UzcGkHFkE5kO4SPbAcVyhMwzE3aZNubXl5biQCEmxqh
80HvckcQj+b5TwIDAQABo4IBMjCCAS4wHwYDVR0jBBgwFoAULgtl+dZl3kujJXWk
oS6FIUBzuQowNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL2NybC5kaXNhLm1pbC9j
cmwvRE9EQ0FfMjUuY3JsMA4GA1UdDwEB/wQEAwIGwDAjBgNVHSAEHDAaMAsGCWCG
SAFlAgELCTALBglghkgBZQIBCxMwHQYDVR0OBBYEFFhzyfk4PpY2JzyrNAH+ka4n
MDLRMGMGCCsGAQUFBwEBBFcwVTAxBggrBgEFBQcwAoYlaHR0cDovL2NybC5kaXNh
Lm1pbC9zaWduL0RPRENBXzI1LmNlcjAgBggrBgEFBQcwAYYUaHR0cDovL29jc3Au
ZGlzYS5taWwwGwYDVR0JBBQwEjAQBggrBgEFBQcJBDEEEwJVUzANBgkqhkiG9w0B
AQUFAAOCAQEATpknlaaGiKZRNL+8YNgVy2kQDEFgdg/O4tB7NBRq3PiyUodnpOur
2WbML+ViDMv7IxKEKUGnOgpc9CRNCR3+NERmaeVShlQwfF/3PjZ/DWiSuSMD79qC
Y+tom4AkV69kLKl/O07Ql+jYh+Uy1x+MGWm46QsdOU5kwXHvPrgBI+5IpOrhXAW9
DmOfTbdpmQvQHBC8nnLscrolQutLQtOIN60mRZmJG1x762sGNQsFgO8fTOus+C8v
rlGafWRi/BJxlQCB3qb5nvI1TI68DLlqvgvX8IR7fpL/tq222PDAorpGf23YpSQt
9x1xD5aZLkgYIICa6/L1Yus9FjtCR6eHug==
-----END CERTIFICATE-----
=======================================================

Similar Messages

  • Java.security.InvalidKeyException: Illegal key size

    Hi,
    I have developed an adf application using jdeveloper 11g which hosts weblogic 10.3.3.0.
    My adf application has to connect to an external application for credit card validation.
    To achieve this i am using a HTTPURLConnection and passing the external address and attributes that has to be written to it.
    The external application which i am trying to connect is secured starts with https://..
    I get an error as soon i am trying to open the "connection.getOutputStream()".
    Following is the error i am getting
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    java.security.InvalidKeyException: Illegal key size
         at javax.crypto.Cipher.a(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at com.certicom.tls.provider.Cipher.init(Unknown Source)
         at com.certicom.tls.ciphersuite.SecurityParameters.createWriteCipher(Unknown Source)
         at com.certicom.tls.record.handshake.HandshakeHandler.changeCipherSpec(Unknown Source)
         at com.certicom.tls.record.handshake.ClientStateReceivedCertificate.handle(Unknown Source)
         at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)
         at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
         at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)
         at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)
         at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
         at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
         at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
         at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
         at com.certicom.tls.record.WriteHandler.write(Unknown Source)
         at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)The code i am using to connect to the external website is as follows.
        URL url;  
        HttpURLConnection connection = null; 
        try {    
          //Create connection  
          url = new URL(targetURL); 
          connection = (HttpURLConnection)url.openConnection();   
          connection.setRequestMethod("POST");
          connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
         connection.setRequestProperty("Content-Length", "" + Integer.toString(urlParameters.getBytes().length));
          connection.setRequestProperty("Content-Language", "en-US");  
          connection.setUseCaches (false); 
           connection.setDoOutput(true); 
           DataOutputStream wr = new DataOutputStream (      
               connection.getOutputStream ());
                wr.writeBytes (urlParameters);  
                wr.flush ();  
          wr.close ();   
                //Get Response   
          InputStream is = connection.getInputStream();  
          System.out.println("after getting input stream");
        BufferedReader rd = new BufferedReader(new InputStreamReader(is));  
          System.out.println("after BUffered reader");
        String line;  
        StringBuffer response = new StringBuffer();  
          System.out.println("after String buffer");
        while((line = rd.readLine()) != null) {     
          response.append(line);   
          response.append('\r');  
          }      rd.close();  
        return response.toString();
        } catch (Exception e) { 
          e.printStackTrace();   
          return null; 
          } finally { 
          if(connection != null) {      
            connection.disconnect();  
        }I am currently totally clueless , i dont understand what steps should i take. Is this error due to some keystore stuff??
    I even tried to replace the policy files in jre as per some blogs but it still does not work.
    I have very limited knowledge of the security issues with weblogic , i will really appreciate if i can get any links or any help in this matter.
    Thanks in advance
    ash

    The messages prior to the exception are very significant:
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    java.security.InvalidKeyException: Illegal key size
    So there are at least 4 certificates in your server's truststore that are causing issues.
    Is your weblogic server using CustomIdentityAndStandardTrust? If so, the the keystore is the $JAVA_HOME/jre/lib/security/cacerts
    You should familiarize yourself with keytool ( in $JAVA_HOME/bin ) and consider removing entries from your trust store unless you absolutely need them and are willing to trust any cert signed by them. There's been a thread about some newer Certificate Authorities ( CAs ) that were included as part of a recent java upgrade which have caused similar "unknown OID" issues.
    For your specific endpoint, you can use your browser to invoke the services' wsdl; this will cause your browser to fetch the certificate from that server
    You can then see what CA is used to sign it. Then see whether that CA is in your truststore.
    There is also a thread with a very simple class to test the SSL handshake:
    Re: Use Server Cert in Managed server not working

  • Java.security.InvalidKeyException: Wrong key size

    Hi,
    I am getting this InvalidKeyException can someone help me what is that I am missing here.
    Thanks
    here is the code I am working on
    platform- Win2000, JCE1.2.1
    String message = "SSO test message";
    String ssoKey =new String( "newtestKey");
    Security.addProvider(new com.sun.crypto.provider.SunJCE());
    byte [] keyByte = ssoKey.getBytes();
    SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
    DESedeKeySpec desKeySpec = new DESedeKeySpec(keyByte);
    SecretKey secretKey = keyFactory.generateSecret(desKeySpec);

    Stupid question. If you have taken some informations about the cipher you're using, then you would be able to get the answer on your own.
    The DESede use a 192 bits key, That give us 24 as size in byte. This size give us a key of 24 characters. You only use 10 characters, so don't be surprised of having such error.
    I just add some idea : the random generation of a key is the most secure, and if a manual generation is needed, using the ASCII table as base is already better than the limited characters of the keyboard.
    Next time, take a book about cipher before trying to play with them.

  • Unsupported key type: Sun DSA Public Key

    Hi all,
    Does anyone know how to use the SHA1withDSA algorithm with WSS4J/Axis?
    When using a private key generated by keytool with type DSA, I get the errors:
    org.apache.ws.security.WSSecurityException: Cannot encrypt data
    Caused by: java.security.InvalidKeyException: Unsupported key type: Sun DSA Public Key
    It seems I have to generate the key using type RSA.
    Regards,
    Alex
    Edited by: ao on 2012-mar-12 12:53

    DSA (Digital Signature Algorithm) keys, by definition, can only be used for digital signature and not for encryption. As EJP suggested, you must use the RSA key-type and the SHA1withRSA - I would recommend using SHA256withRSA - construct to enable message-confidentiality.
    Arshad Noor
    StrongAuth, Inc.

  • Invalid Key Exception: Unsupported key type: Sun RSA public key, 1024 bits

    I am trying to retrieve certificates from Microsoft Keystore and extract its keys using SunMSCAPI in jdk 1.6. It gives me an invalid key exception, when I am trying to wrap the Symmetric key (which was previously used to perform AES encryption on data), using RSA algorithm.
    Code snippet:
               // RSA 1024 bits Asymmetric encryption of Symmetric AES key             
                // List the certificates from Microsoft KeyStore using SunMSCAPI.
                      System.out.println("List of certificates found in Microsoft Personal Keystore:");
                       KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
                       ks.load(null, null) ;
                       Enumeration en = ks.aliases() ;
                       PublicKey RSAPubKey = null;
                       Key RSAPrivKey = null;
                       int i = 0;
                       while (en.hasMoreElements()) {
                            String aliasKey = (String)en.nextElement() ;              
                            X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey) ;     
                            String sss = ks.getCertificateAlias(c);
                            if(sss.equals("C5151997"))
                            System.out.println("---> alias : " + sss) ;
                            i= i + 1;
                            String str = c.toString();
                            System.out.println(" Certificate details : " + str ) ;
                          RSAPubKey = c.getPublicKey();
                            RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
                            Certificate[] chain = ks.getCertificateChain(aliasKey);     
                       System.out.println("No of certificates found from Personal MS Keystore: " + i);
                // Encrypt the generated Symmetric AES Key using RSA cipher      
                        Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());            
                       rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
                       byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);   
                       System.out.println("Encrypted Symmetric Key :" + new String(encryptedSymmKey));
                       System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
                       // RSA Decryption of Encrypted Symmetric AES key
                       rsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
                       Key decryptedKey = rsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);Output:
    List of certificates found in Microsoft Personal Keystore:
    ---> alias : C5151997
    Certificate details : [
    Version: V3
    Subject: CN=C5151997, O=SAP-AG, C=DE
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: Sun RSA public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
    Validity: [From: Mon Jan 24 18:17:49 IST 2011,
                   To: Wed Jan 23 18:17:49 IST 2013]
    Issuer: CN=SSO_CA, O=SAP-AG, C=DE
    SerialNumber: [    4d12c509 00000005 eb85]
    Certificate Extensions: 6
    [1]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 07 E5 83 A1 B2 B7 DF 6B 4B 67 9C 1D 42 C9 0D F4 .......kKg..B...
    0010: 35 76 D3 F7 5v..
    [2]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: E4 C4 2C 93 20 AF DA 4C F2 53 68 4A C0 E7 EC 30 ..,. ..L.ShJ...0
    0010: 8C 0C 3B 9A ..;.
    [3]: ObjectId: 1.3.6.1.4.1.311.21.7 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 30 30 2E 06 26 2B 06 01 04 01 82 37 15 08 82 .00..&+.....7...
    0010: D1 E1 73 84 E4 FE 0B 84 FD 8B 15 83 E5 90 1B 83 ..s.............
    0020: E6 A1 43 81 62 84 B1 DA 50 9E D3 14 02 01 64 02 ..C.b...P.....d.
    0030: 01 1B ..
    [4]: ObjectId: 2.5.29.17 Criticality=false
    SubjectAlternativeName [
    RFC822Name: [email protected]
    [5]: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
    DigitalSignature
    Non_repudiation
    Key_Encipherment
    Data_Encipherment
    [6]: ObjectId: 2.5.29.19 Criticality=true
    BasicConstraints:[
    CA:false
    PathLen: undefined
    Algorithm: [SHA1withRSA]
    Signature:
    0000: B3 C5 92 66 8D D7 ED 6D 51 12 63 CC F4 52 18 B9 ...f...mQ.c..R..
    0010: B8 A6 78 F7 ED 7D 78 18 DA 71 09 C9 AE C8 49 23 ..x...x..q....I#
    0020: F5 32 2F 0F D1 C0 4C 08 2B 6D 3C 11 B9 5F 5B B5 .2/...L.+m<.._[.
    0030: 05 D9 CA E6 F9 0A 94 14 E7 C6 7A DB 63 FE E5 EC ..........z.c...
    0040: 48 94 8C 0D 77 92 59 DE 34 6E 77 1A 24 FE E3 C1 H...w.Y.4nw.$...
    0050: D8 0B 52 6A 7E 22 13 71 D7 F8 AF D1 17 C8 64 4F ..Rj.".q......dO
    0060: 83 EA 2D 6A CA 7F C3 84 37 15 FE 99 73 1D 7C D1 ..-j....7...s...
    0070: 6D B4 99 09 62 B9 0F 18 33 4C C6 66 7A 9F C0 DB m...b...3L.fz...
    No of certificates found from Personal MS Keystore: 1
    Exception in thread "main" java.security.InvalidKeyException: Unsupported key type: Sun RSA public key, 1024 bits
    modulus: 171871587533146191561538456391418351861663300588728159334223437391061141885590024223283480319626015611710315581642512941578588886825766256507714725820048129123720143461110410353346492039350478625370269565346566901446816729164309038944197418238814947654954590754593726047828813400082450341775203029183105860831
    public exponent: 65537
         at sun.security.mscapi.RSACipher.init(RSACipher.java:176)
         at sun.security.mscapi.RSACipher.engineInit(RSACipher.java:129)
         at javax.crypto.Cipher.init(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at com.sap.srm.crpto.client.applet.CryptoClass.main(CryptoClass.java:102)
    Edited by: sabre150 on 18-Jul-2011 03:47
    Added [ code] tags to make code readable.

    A bit of research indicates that the classes of the keys obtained by
                          RSAPubKey = c.getPublicKey();
                               RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()are sun.security.rsa.RSAPublicKeyImpl and sun.security.*mscapi*.RSAPrivateKey . It seems that for Cipher objects from the SunMSCAPI provider cannot accept RSA public keys of class sun.security.rsa.RSAPublicKeyImpl and that the SunMSCAPI will only accept RSA private keys of class sun.security.mscapi.RSAPrivateKey.
    This came up under different guise a couple of years ago. It makes sense since encrypting/wrapping with a public key does not represent a security problem (there is nothing secret in any of the encryption operations) when done outside of MSCAPI so one can use any provider that has the capability BUT the decryption/unwrapping must be done with the SunMSCAPI provider which delegates it to the MSCAPI.
    My working test code based on your code implementing this approach is :
            // RSA 1024 bits Asymmetric encryption of Symmetric AES key             
            // List the certificates from Microsoft KeyStore using SunMSCAPI.
            System.out.println("List of certificates found in Microsoft Personal Keystore:");
            KeyStore ks = KeyStore.getInstance("Windows-MY", "SunMSCAPI");
            ks.load(null, null);
            Enumeration en = ks.aliases();
            PublicKey RSAPubKey = null;
            Key RSAPrivKey = null;
            int i = 0;
            while (en.hasMoreElements())
                String aliasKey = (String) en.nextElement();
                X509Certificate c = (X509Certificate) ks.getCertificate(aliasKey);
                String sss = ks.getCertificateAlias(c);
                if (sss.equals("rsa_key")) // The alias for my key - make sure you change it back to your alias
                    System.out.println("---> alias : " + sss);
                    i = i + 1;
                    String str = c.toString();
                    System.out.println(" Certificate details : " + str);
                    RSAPubKey = c.getPublicKey();
             System.out.println(RSAPubKey.getClass().getName());
                   RSAPrivKey = ks.getKey(aliasKey, null);  //"mypassword".toCharArray()
            System.out.println(RSAPrivKey.getClass().getName());
                    Certificate[] chain = ks.getCertificateChain(aliasKey);
            System.out.println(ks.getProvider().getName());
            System.out.println("No of certificates found from Personal MS Keystore: " + i);
            Cipher rsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");//, ks.getProvider().getName());       !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                rsaCipher.init(Cipher.WRAP_MODE, RSAPubKey);
            byte[] keyBytes =
                1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9
            SecretKey aeskey = new SecretKeySpec(keyBytes, "AES");
            byte[] encryptedSymmKey = rsaCipher.wrap(aeskey);
            System.out.println("Encrypted Symmetric Key :" + Arrays.toString(encryptedSymmKey));
            System.out.println("Encrypted Symmetric Key Length in Bytes: " + encryptedSymmKey.length);
            // RSA Decryption of Encrypted Symmetric AES key
            Cipher unwrapRsaCipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", ks.getProvider().getName());       //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            unwrapRsaCipher.init(Cipher.UNWRAP_MODE, RSAPrivKey);
            Key decryptedKey = unwrapRsaCipher.unwrap(encryptedSymmKey, "AES", Cipher.SECRET_KEY);
            System.out.println("Decrypted Symmetric Key :" + Arrays.toString(decryptedKey.getEncoded())); // Matches the 'keyBytes' above

  • Java.security.InvalidKeyException:Elgamal

    I am trying to encrypt and decrypt Elgaman but I am getting error ofElGamal: Exception: java.security.InvalidKeyException: Illegal key size or default parameters
    java.security.InvalidKeyException: Illegal key size or default parameters
         at javax.crypto.Cipher.a(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at org.students.RSA2.testGP(RSA2.java:71)
         at org.students.RSA2.performTest(RSA2.java:277)
         at org.bouncycastle.util.test.SimpleTest.perform(Unknown Source)
         at org.bouncycastle.util.test.SimpleTest.runTest(Unknown Source)
         at org.bouncycastle.util.test.SimpleTest.runTest(Unknown Source)
         at org.students.RSA2.main(RSA2.java:291)
    i installed the JDK 5.0 Update 22 and download the jce from
    http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html and installed in
    C:\Program Files\Java\jdk1.5.0_22\jre\lib\security
    but It give me same error .Please help me. Thanks in advance
    Edited by: user11357554 on Apr 17, 2011 2:06 PM
    Edited by: EJP on 18/04/2011 11:41: added code tags. Please use them.
    Edited by: user11357554 on Apr 22, 2011 9:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    user11357554 wrote:
    i installed the JDK 5.0 Update 22 and download the jce from
    http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html and installed in
    C:\Program Files\Java\jdk1.5.0_22\jre\lib\securityI don't think you can have followed the 'unlimited strength' installation instructions. You need to unzip the 'unlimited strength' file and copy the content of it's jce subdirectory directly to the C:\Program Files\Java\jdk1.5.0_22\jre\lib\security directory.
    P.S. Why are you using JDK1.5?
    P.S-1. When you convert a String to/from bytes ALWAYS specify the character encoding since the default character encoding is very likely to be different for different OS, OS variants and Java variants.
    P.S-2. Never use String as a container for binary data and ciphertext IS binary data.

  • Java.security.InvalidKeyException IOException  algid parse error

    Hi
    i am trying to encrypt message using private key (RSA), when i try to get the private key, for the given key spec, I get error (java.security.InvalidKeyException: IOException : algid parse error, not a sequence
    below is he code snippet, error occurs at line no 4
    KeyFactory keyFactory;
    keyFactory = KeyFactory.getInstance(RSA);
    PKCS8EncodedKeySpec privSpec = new PKCS8EncodedKeySpec(encryptionKeyBytes);
    privKey = (RSAPrivateKey) keyFactory.generatePrivate(privSpec);
    cf = Cipher.getInstance(RSA);
    cf.init(Cipher.ENCRYPT_MODE, privKey);
    let me know if i am missing something, the key is provide by 3rd party,
    Thanks in advance

    Hi,
    glennlasrado wrote:
    Its a valid private key, the same key is used by PHP client and it works,This may be due to PHP handling different key formats for you where your Java code is trying to decode a specific key format. You should try decoding the DER encoded key to see what format it is in.
    Here is an example CRT private key from Java. You could pass this through a DER dump tool to see the tags if you are not familiar with DER encoding.
    <pre>
    30 820155
    02 01 00
    30 0D
    06 09 2A864886F70D010101
    05 00
    04 82013F
    30 82013B
    02 01 00
    02 41 00917ACA34E71863DDD2A6E9FF52850D88EB2EFF7BA936FF079ECBA0576B412388D12E76C31C09C136A041A7145043470606B7E4CC045BD343739181E1C380DB81
    02 03 010001
    02 40 7EFFEE9E1850167E8372EB3BD55209EAC945120B66417889B27A98D337F2798D9118564F1B4DB704A0BB2B589F8491D3B4AEA74512031AAEFB3BAB34C5AA0341
    02 21 00F2B6B08C77C9100C914BD43E71D514CE52DC9CAF431C679D4274C58E2B0D6205
    02 21 0099717E9F6020C0428FF8F002BA29BF339C4AB2F777860FE92D40933ADFBEE04D
    02 21 00CF2088D9D6FF86EAB2B3FB94AEA020F9524D62894EC456C82586717139DC59E1
    02 20 60E97DBFCB46E427262763EF5504E8EDFFD86E103E3D3DEF57D56127DE090041
    02 21 008AEC6D299EAAF5378EEFAAF0043093A47CC0EE336745033225E071EE2393F172
    </pre>
    Your key file may look like this (the inner sequence of the above):
    <pre>
    30 82013B
    02 01 00
    02 41 00917ACA34E71863DDD2A6E9FF52850D88EB2EFF7BA936FF079ECBA0576B412388D12E76C31C09C136A041A7145043470606B7E4CC045BD343739181E1C380DB81
    02 03 010001
    02 40 7EFFEE9E1850167E8372EB3BD55209EAC945120B66417889B27A98D337F2798D9118564F1B4DB704A0BB2B589F8491D3B4AEA74512031AAEFB3BAB34C5AA0341
    02 21 00F2B6B08C77C9100C914BD43E71D514CE52DC9CAF431C679D4274C58E2B0D6205
    02 21 0099717E9F6020C0428FF8F002BA29BF339C4AB2F777860FE92D40933ADFBEE04D
    02 21 00CF2088D9D6FF86EAB2B3FB94AEA020F9524D62894EC456C82586717139DC59E1
    02 20 60E97DBFCB46E427262763EF5504E8EDFFD86E103E3D3DEF57D56127DE090041
    02 21 008AEC6D299EAAF5378EEFAAF0043093A47CC0EE336745033225E071EE2393F172
    </pre>
    These are just the Hex string representations of the key formatted for your readability. There are several Eclipse plugins that can help you view DER encoded streams.
    Cheers,
    Shane
    Edited by: safarmer on Oct 11, 2010 4:55 PM

  • TIFF unsupported compression type

    Dear all
    I want to get the RGB values of every pixel of a TIFF-File. Therefore I use JAI. My first steps are...
    PlanarImage image = JAI.create("fileload", in_path);
    BufferedImage bufferedImage = image.getAsBufferedImage();
    ...because in other cases (JPEG, PNG, BMP) I used a BufferedImage to get the RGBValues.
    But when I execute this code I get the Exception below. I founded that the 'unsupported compression type' perhaps means that the tiff file has non-bilevel data.
    Can you help me?
    Thanks Thomas
    Caused by: javax.media.jai.util.ImagingException: All factories fail for the operation "tiff"
         at javax.media.jai.OperationRegistry.invokeFactory(Unknown Source)
         at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(Unknown Source)
         at javax.media.jai.registry.RIFRegistry.create(Unknown Source)
         at com.sun.media.jai.opimage.StreamRIF.create(Unknown Source)
         ... 23 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at javax.media.jai.FactoryCache.invoke(Unknown Source)
         ... 27 more
    Caused by: java.lang.RuntimeException: Unsupported compression type.
         at com.sun.media.jai.codecimpl.TIFFImage.<init>(Unknown Source)
         at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(Unknown Source)
         at com.sun.media.jai.opimage.CodecRIFUtil.create(Unknown Source)
         at com.sun.media.jai.opimage.TIFFRIF.create(Unknown Source)
         ... 32 more

    function(){return A.apply(null,[this].concat($A(arguments)))}
    evan_messy wrote:
    When I try to import mxf files into premiere, it comes up with the message unsupported compression type.
    These files originally came from d5 tape and I'm not sure what the process is from there, but adobe usually supports mfx files.
    Is there another step I need to take because the footage originates from film?
    you probably have the same problem i am, i have some avid DNxHD mxf files from a cinedeck recorder that are not loading into premiere for me either.

  • Unsupported key or value

    Hi,
    I'm getting the following error when I try to retreive an object from the cache:
    11:10:47,835 ERROR [STDERR] java.lang.IllegalArgumentException: Unsupported key or value: Key=1391631, Value=PartyImpl[PartyImpl[PartyImpl[objectId=61
    380,entityId=6763,entityVersion=2],partyId=1391631,name=SUNRISE PARTNERS LIMITED PARTNERSHIP],shortName=SUNRISE PARTNERS LP]
    11:10:47,851 ERROR [STDERR]     at com.tangosol.net.cache.BinaryMemoryCalculator.calculateUnits(BinaryMemoryCalculator.java:43)
    11:10:47,851 ERROR [STDERR]     at com.tangosol.net.cache.OldCache$Entry.calculateUnits(OldCache.java:2396)
    11:10:47,866 ERROR [STDERR]     at com.tangosol.net.cache.OldCache$Entry.onAdd(OldCache.java:1990)
    11:10:47,866 ERROR [STDERR]     at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
    11:10:47,866 ERROR [STDERR]     at com.tangosol.net.cache.OldCache.put(OldCache.java:266)
    11:10:47,882 ERROR [STDERR]     at com.tangosol.net.cache.OldCache.put(OldCache.java:234)
    11:10:47,882 ERROR [STDERR]     at com.tangosol.net.cache.CachingMap.get(CachingMap.java:534)
    11:10:47,882 ERROR [STDERR]     at com.jpm.ibt.primegps.repository.AbstractCoherenceRepository.get(AbstractCoherenceRepository.java:233)
    11:10:47,898 ERROR [STDERR]     at com.jpm.ibt.primegps.bulkload.reference.PartyBulkLoader.populateCache(PartyBulkLoader.java:33)
    11:10:47,898 ERROR [STDERR]     at com.jpm.ibt.primegps.bulkload.AbstractBulkLoader.run(AbstractBulkLoader.java:167)
    11:10:47,945 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    11:10:47,945 ERROR [STDERR]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    11:10:47,945 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:619)I found a similar thread that was seeing the same error but this was only for a replicated cache. My config is:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd" >
    <cache-config>
         <caching-scheme-mapping>
         <cache-mapping>
              <cache-name>PARTY_CACHE</cache-name>
              <scheme-name>party_cache</scheme-name>
         </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>
              <near-scheme>
                   <scheme-name>party_cache</scheme-name>
                   <service-name>partyCacheService</service-name>
                   <!-- a sensible default ? -->
                   <thread-count>5</thread-count>
                   <front-scheme>
                        <local-scheme>
                             <!-- up to 10Megabytes -->
                                  <high-units>10485760</high-units>
                                  <unit-calculator>BINARY</unit-calculator>
                        </local-scheme>
                   </front-scheme>
                   <back-scheme>
                        <distributed-scheme>
                             <backing-map-scheme>
                                  <read-write-backing-map-scheme>
                                       <internal-cache-scheme>
                                            <local-scheme>
                                            </local-scheme>
                                       </internal-cache-scheme>
                                       <cachestore-scheme>
                                            <class-scheme>
                                                 <class-name>spring-bean:partyCacheStore</class-name>
                                            </class-scheme>
                                       </cachestore-scheme>
                                  </read-write-backing-map-scheme>
                             </backing-map-scheme>
                        </distributed-scheme>
                   </back-scheme>
                   <autostart>true</autostart>
              </near-scheme>
         </caching-schemes>
    </cache-config>removing the BINARY units part of the config seems to fix the problem but what is the effect of this? As I understand it this leaves me open to memory issues should the cache grow too large.

    Hi Willy,
    You problem is because the front scheme of a near cache stores data in deserialized form so you cannot use the BINARY unit calculator.
    JK

  • SecureSocketListener: Could not setup context and create a secure socket on 142.182.112.123:5555 : java.security.cert.CertificateParsingException: PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11. java.security.cert.Certifica

    HI Team,
    while starting the node manager in wls 8.1 and java1.4
    we are facing this issue plz help on this immediately.
    + CLASSPATH=/srvrs/bdv/patches/CR210310_81sp4.jar:/usr/java14/lib/tools.jar:/srvrs/bdv/bea/weblogic81/server/lib/weblogic_sp.jar:/srvrs/bdv/bea/weblogic81/server/lib/weblogic.jar::/srvrs/bdv/bea
    + export CLASSPATH
    + export PATH
    + set -x
    + [ 5555 !=  ]
    + [ 142.182.112.123 !=  ]
    + /usr/java14/bin/java -Xms32m -Xmx32m -Dweblogic.security.SSL.enforceConstraints=off -Djava.security.policy=/srvrs/bdv/bea/weblogic81/server/lib/weblogic.policy -Dweblogic.nodemanager.javaHome=/usr/java14 -DListenAddress=142.182.112.123 -DListenPort=5555 weblogic.NodeManager
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <NodeManager: for information on command line options,  try "java weblogic.NodeManager -h">
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Starting NodeManager >
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Setting listenAddress to 142.182.112.123..>
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Setting listenPort to 5,555..>
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Setting java home to '/usr/java14'>
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Effective values of properties :
            ListenAddress=142.182.112.123
            ListenPort=5555
            ListenerType=secureSocket
            SavedLogsDirectory=NodeManagerLogs
            NativeVersionEnabled=true
            TrustedHosts=nodemanager.hosts
            StartTemplate=../../server/lib/unix/nodemanager.sh
            ReverseDnsEnabled=false
            ScavangerDelaySeconds=180
            PIDFileReadRetryCount=0
            WeblogicHome=null
            bea.home=null
            JavaHome=/usr/java14
            PropertiesVersion=8.1
    >
    <Sep 15, 2013 7:35:26 AM EDT> <Info> <NodeManager> <Saving logs in'NodeManagerLogs'>
    <Sep 15, 2013 7:35:31 AM EDT> <Info> <[email protected]:5555> <Reading private key and certificate chain from the keystore /srvrs/bdv/bea/weblogic81/server/lib/DemoIdentity.jks. KeyStore type = jks, Using keystore passphrase = true, Alias = DemoIdentity>
    <Sep 15, 2013 7:35:31 AM EDT> <Info> <[email protected]:5555> <Reading trusted CAs from the keystore /srvrs/bdv/bea/weblogic81/server/lib/DemoTrust.jks. KeyStore type = jks, Using keystore passphrase = true>
    <Sep 15, 2013 7:35:31 AM EDT> <Info> <[email protected]:5555> <Reading trusted CAs from the keystore /usr/java14/jre/lib/security/cacerts. KeyStore type = jks, Using keystore passphrase = false>
    SecureSocketListener: Could not setup context and create a secure socket on 142.182.112.123:5555 : java.security.cert.CertificateParsingException: PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.
    java.security.cert.CertificateParsingException: PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11
            at com.certicom.security.cert.internal.x509.X509V3CertImpl.<init>(Unknown Source)
            at com.certicom.tls.interfaceimpl.CertificateSupport.addTrustedCertificate(Unknown Source)
            at com.certicom.net.ssl.SSLContext.addTrustedCertificate(Unknown Source)
            at com.bea.sslplus.CerticomSSLContext.addTrustedCA(Unknown Source)
            at weblogic.security.utils.SSLContextWrapper.addTrustedCA(SSLContextWrapper.java:52)
            at weblogic.nodemanager.internal.SecureSocketListener.run(SecureSocketListener.java:57)
            at weblogic.nodemanager.internal.GenericListener.startListener(GenericListener.java:16)
            at weblogic.nodemanager.NodeManager.startSecureSocketListener(NodeManager.java:461)
            at weblogic.nodemanager.NodeManager.init(NodeManager.java:305)
            at weblogic.nodemanager.NodeManager.run(NodeManager.java:511)
            at weblogic.NodeManager.main(NodeManager.java:31)
    Thanks,
    Eswar

    Hi,
    Did you find a solution to this? We are running into the same issue since upgrading to Weblogic 9.2.3 for WebCT Vista 8.0.4.
    Thanks,
    Ron

  • Help : java.security.UnrecoverableKeyException: excess private key

    Hi,
    I require help for the exception "java.security.UnrecoverableKeyException: excess private key"
    When i am trying to generate digital signature using PKCS7 format using bouncyCastle API, it gives the "java.security.UnrecoverableKeyException: excess private key" exception.
    The full stack trace is as follows
    ------------------------------------------------------------------------java.security.UnrecoverableKeyException: excess private key
         at sun.security.provider.KeyProtector.recover(KeyProtector.java:311)
         at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:120)
         at java.security.KeyStore.getKey(KeyStore.java:289)
         at com.security.Security.generatePKCS7Signature(Security.java:122)
         at com.ibm._jsp._SendSecureDetail._jspService(_SendSecureDetail.java:2282)
         at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:93)
    I had tested the program under following scenarios...
    The Java Program for generating the digital signature independently worked successfully(without any change in policy files or java.security file) I have tested this independently on Sun's JDK 1.4, 1.6
    For IBM JDK 1.4 on Windows machine for WAS(Webshere Application Server) 6.0, The Program for generating the digital signature using PKCS7 works fine, but it required IBM Policy files(local_policy.jar, US_export_policy.jar) and updation in java.security file
    But the problem occurs in Solaris 5.10, WAS 6.0 where Sun JDK 1.4.2_6 is used.
    I copied the unlimited strength policy files for JDK 1.4.2 from Sun's site(because the WAS 6.0 is running on Sun's JDK intead of IBM JDK)...
    I changed the java.security file as follows(only changed content)
    security.provider.1=sun.security.provider.Sun
    security.provider.2=com.ibm.security.jgss.IBMJGSSProvider
    security.provider.3=com.ibm.crypto.fips.provider.IBMJCEFIPS
    security.provider.4=com.ibm.crypto.provider.IBMJCE
    security.provider.5=com.ibm.jsse2.IBMJSSEProvider2
    security.provider.6=com.ibm.jsse.IBMJSSEProvider
    security.provider.7=com.ibm.security.cert.IBMCertPath
    security.provider.8=com.ibm.security.cmskeystore.CMSProvider
    I have used PKCS12(PFX) file for digital signature
    which is same for all environment(i have described as above)
    I copied the PFX file from windows to solaris using WinSCP in binary format so the content of certificate won't get currupted.
    I can not change the certificate because it's given by the company and which is working in other enviroments absolutely fine(just i have described above)
    I have gone though the "http://forums.sun.com/thread.jspa?threadID=408066" and other URLs too. but none of them helped...
    So what could be the problem for such exception?????
    I am on this issue since last one month...
    I know very little about security.
    Thanks in advance
    PLEASE HELP ME(URGENT)
    Edited by: user10935179 on Sep 27, 2010 2:47 AM
    Edited by: user10935179 on Sep 27, 2010 2:54 AM

    user10935179 wrote:
    The Java Program for generating the digital signature independently worked successfully(without any change in policy files or java.security file) If the program was working fine without changing the java.security policy file, why have you changed it to put the IBM Providers ahead of the SunRsaSign provider?
    While I cannot be sure (because I don't have an IBM provider to test this), the error is more than likely related to the fact that the IBM Provider implementations for handling RSA keys internally are different from the SunRsaSign provider. Since you've now forced the IBM provider ahead of the original Sun provider, you're probably running into interpretation issues of the encoded objects inside the keystore.
    Change your java.security policy back to the default order, and put your IBM Providers at the end of the original list and run your application to see what happens.
    Arshad Noor
    StrongAuth, Inc.

  • Getting java.io.IOException: unsupported type / corrupted stream

    I am sporadically getting the following exception:
    (Wrapped) java.io.IOException: unsupported type / corrupted stream
         at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2162)
         at com.tangosol.util.ExternalizableHelper.readMap(ExternalizableHelper.java:1557)
         at com.tsysa.risk.SyncpointController.readExternal(SyncpointController.java:262)
         at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:1908)
         at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2199)
         at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:205)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ConverterFromBinary.convert(DistributedCache.CDB:4)
         at com.tangosol.util.ConverterCollections$ConverterMap.put(ConverterCollections.java:1317)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap.put(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
         at test.SyncpointController.updateStateInCache(SyncpointController.java:151) 
         at test.SyncpointController.onMapEvent(SyncpointController.java:121)
         at com.tangosol.util.MultiplexingMapListener.entryUpdated(MultiplexingMapListener.java:41)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:195)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:164)
         at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:556)
         at com.tangosol.coherence.component.util.SafeNamedCache.translateMapEvent(SafeNamedCache.CDB:7)
         at com.tangosol.coherence.component.util.SafeNamedCache.entryUpdated(SafeNamedCache.CDB:1)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:195)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.dispatch(DistributedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.entryUpdated(DistributedCache.CDB:1)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:195)
         at com.tangosol.coherence.component.util.CacheEvent.run(CacheEvent.CDB:18)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.onNotify(Service.CDB:17)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:35)
         at java.lang.Thread.run(Thread.java:595)I get this during a cache.put() call. Any idea what this could be about?
    Thanks
    Ghanshyam

    This is an issue with my code. I was selectively serializing a class member and relying on EOFException to detect if the class member should be initialized during readExternal(). Following shows the situation:
    public class A implements ExternalizableLite{
         private A1 a1 = null; // A1 is ExternalizableLite
         private A2 a2 = null; // A2 is ExternalizableLite
         public A(){}
         public void setA1(A1 a1){ this.a1 = a1; }
         public void readExternal(DataInput in) throws IOException {
             this.a1.readExternal(in);
             this.a2 = new A2();
             try{
                 this.a2.readExternal(in);
             catch(EOFException ex){ // a2 is null
                 this.a2 = null;
        public void writeExternal(DataOutput out) throws IOException {
            this.a1.writeExternal(out);
            if(this.a2 != null) this.a2.writeExternal(out);
    }A map had the above class A as the value and when the map was getting serialized, I was getting the exception. I changed class A (as below) to always initialize a2 to a non-null but empty class and the error went away:
    public class A implements ExternalizableLite{
         private A1 a1 = null; // A1 is ExternalizableLite
         private A2 a2 = new A2();
         public A(){}
         public void setA1(A1 a1){ this.a1 = a1; }
         public void readExternal(DataInput in) throws IOException {
             this.a1.readExternal(in);
             this.a2.readExternal(in);
        public void writeExternal(DataOutput out) throws IOException {
            this.a1.writeExternal(out);
            this.a2.writeExternal(out);
    }This means needless serialization/deserialization when a2 is null but the hit is negligible. Is there a way to get around the null values?
    Thanks
    Ghanshyam

  • Java.security.cert.CertificateException

    Hi,
    I am using a JAVA client to connect to a https server which uses certificates for authentication.
    The server uses gSOAP certificates for client authentication and encryption of messages.
    I am using JSSE coming along with JDK1.6 and generated keystore file from client.pem and cacert.pem files used by the server.
    I need to send SOAP messages with attachments.
    I am using SAAJ API with JDK 1.6 .
    When I try to connect to the server through javax.xml.soap.SOAPConnection, I am getting java.security.cert.CertificateException. Please see the exception below.
    Note: Server is responding properly to SOAP UI tool(java testing tool) with certifcates authentication.
    I have enabled debug option in SSL.
    E:\test\properties\storefile.jks
    keyStore is : E:\test\properties\storefile.jks
    keyStore type is : jks
    keyStore provider is :
    init keystore
    init keymanager of type SunX509
    trustStore is: E:\test\properties\storefile.jks
    trustStore type is : jks
    trustStore provider is :
    init truststore
    adding as trusted cert:
    Subject: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Issuer: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Algorithm: RSA; Serial number: 0x0
    Valid from Sat Oct 02 22:38:06 IST 2004 until Tue Oct 02 22:38:06 IST 2007
    adding as trusted cert:
    Subject: [email protected], CN=localhost, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Issuer: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Algorithm: RSA; Serial number: 0x7
    Valid from Sun Dec 25 01:01:53 IST 2005 until Wed Dec 24 01:01:53 IST 2008
    adding as trusted cert:
    Subject: [email protected], CN=localhost, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Issuer: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Algorithm: RSA; Serial number: 0x8
    Valid from Sun Dec 25 01:03:13 IST 2005 until Wed Dec 24 01:03:13 IST 2008
    trigger seeding of SecureRandom
    done seeding SecureRandom
    %% No cached client session
    *** ClientHello, TLSv1
    RandomCookie: GMT: 1155448094 bytes = { 120, 70, 246, 123, 195, 47, 61, 191, 223, 241, 23, 204, 98, 143, 212, 251, 80, 10, 100, 183, 82, 82, 215, 228, 212, 47, 68, 224 }
    Session ID: {}
    Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
    Compression Methods: { 0 }
    Thread-3, WRITE: TLSv1 Handshake, length = 73
    Thread-3, WRITE: SSLv2 client hello message, length = 98
    Thread-3, READ: TLSv1 Handshake, length = 74
    *** ServerHello, TLSv1
    RandomCookie: GMT: 1155531752 bytes = { 248, 141, 63, 154, 117, 213, 184, 250, 239, 237, 26, 225, 175, 38, 151, 65, 101, 127, 134, 46, 180, 80, 153, 133, 215, 120, 102, 11 }
    Session ID: {100, 201, 98, 232, 113, 191, 163, 129, 1, 101, 251, 29, 233, 245, 144, 203, 231, 208, 202, 248, 160, 99, 84, 248, 86, 16, 235, 234, 20, 73, 231, 148}
    Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
    Compression Method: 0
    %% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
    ** SSL_RSA_WITH_RC4_128_MD5
    Thread-3, READ: TLSv1 Handshake, length = 1868
    *** Certificate chain
    chain [0] = [
    Version: V3
    Subject: [email protected], CN=localhost, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: Sun RSA public key, 1024 bits
    modulus: 144881101064455404788814091404981462608080902688277626878350142057531273562236240952084735254146287262789443540177122740514352105900513219519909051335421867736741713195463254360663999239941476817345303119999799829037388457231058611674562175705514528085594563474765367007497034178272408363177194954006361904887
    public exponent: 65537
    Validity: [From: Sun Dec 25 01:03:13 IST 2005,
                   To: Wed Dec 24 01:03:13 IST 2008]
    Issuer: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    SerialNumber: [    08]
    Certificate Extensions: 4
    [1]: ObjectId: 2.16.840.1.113730.1.13 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 1F 16 1D 4F 70 65 6E 53 53 4C 20 47 65 6E 65 ....OpenSSL Gene
    0010: 72 61 74 65 64 20 43 65 72 74 69 66 69 63 61 74 rated Certificat
    0020: 65 e
    [2]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 3D C1 C8 B5 19 17 C3 8C 12 64 3C 05 C3 22 EE 7B =........d<.."..
    0010: BA 27 B4 C1 .'..
    [3]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: E0 CC 88 8B 41 A0 21 4A A4 61 18 67 27 61 A0 C9 ....A.!J.a.g'a..
    0010: 49 95 77 CA I.w.
    [[email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US]
    SerialNumber: [    00]
    [4]: ObjectId: 2.5.29.19 Criticality=false
    BasicConstraints:[
    CA:false
    PathLen: undefined
    Algorithm: [SHA1withRSA]
    Signature:
    0000: 6E D0 0E EC 85 EA A9 71 60 5D CB 13 3A 0C C2 C6 n......q`]..:...
    0010: A1 92 15 14 2A BB 86 2A 1D 68 B1 4B 41 C0 0B FB ....*..*.h.KA...
    0020: 35 C7 0F 6E 51 99 B3 25 95 4F 58 18 3D 73 F2 06 5..nQ..%.OX.=s..
    0030: 18 63 40 21 A7 44 1D AB 46 DB DD 6C 20 7D 23 23 .c@!.D..F..l .##
    0040: 08 84 92 CE 04 93 10 B3 CB 84 67 FD 3F 53 81 51 ..........g.?S.Q
    0050: 25 60 EE D1 02 89 06 58 E6 E0 B4 C2 20 D8 E8 84 %`.....X.... ...
    0060: 8A 4E 8D 59 62 67 33 4C 95 BD A3 F7 68 76 5E BA .N.Ybg3L....hv^.
    0070: D9 84 3F 80 C8 1E 49 3A 59 D0 B4 74 9E 2D CD F6 ..?...I:Y..t.-..
    chain [1] = [
    Version: V3
    Subject: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: Sun RSA public key, 1024 bits
    modulus: 106482211752195899275275639329238789380560290379431640534106480581317795742917955972475513891969031216742557266096088552725987675210922796797720103531106400345818891764659480805498923495886457178236281557583158652266656923442983245641013901721295378444704296581436391012531718274035287004196101203604693764023
    public exponent: 65537
    Validity: [From: Sat Oct 02 22:38:06 IST 2004,
                   To: Tue Oct 02 22:38:06 IST 2007]
    Issuer: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    SerialNumber: [    00]
    Certificate Extensions: 3
    [1]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: E0 CC 88 8B 41 A0 21 4A A4 61 18 67 27 61 A0 C9 ....A.!J.a.g'a..
    0010: 49 95 77 CA I.w.
    [2]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: E0 CC 88 8B 41 A0 21 4A A4 61 18 67 27 61 A0 C9 ....A.!J.a.g'a..
    0010: 49 95 77 CA I.w.
    [[email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US]
    SerialNumber: [    00]
    [3]: ObjectId: 2.5.29.19 Criticality=false
    BasicConstraints:[
    CA:true
    PathLen:2147483647
    Algorithm: [SHA1withRSA]
    Signature:
    0000: 59 9B F6 45 7E 10 3C 79 3B 88 FB 74 B3 2E F7 4F Y..E..<y;..t...O
    0010: 67 16 09 C1 2F 4E AC 7A 98 EA B4 12 08 6D 96 37 g.../N.z.....m.7
    0020: 1A 70 A0 79 FC 4A A7 54 BA 21 FD 35 FE 67 55 EF .p.y.J.T.!.5.gU.
    0030: D9 D9 18 99 5D 7A 03 3B EE DC F8 54 89 73 B8 86 ....]z.;...T.s..
    0040: B3 FB 63 4E F8 6A 9B AF A1 2B 39 1F B7 50 63 AB ..cN.j...+9..Pc.
    0050: 46 E1 F7 F5 A3 13 D4 3B F0 1D 8A 54 E4 65 3E 94 F......;...T.e>.
    0060: 6D 5A 58 77 50 A7 CB 99 E7 2E 28 90 C8 37 67 D2 mZXwP.....(..7g.
    0070: 19 E6 78 A3 91 49 E9 08 74 0E FA AF FC 16 B3 0B ..x..I..t.......
    Feb 24, 2007 9:50:47 AM com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection post
    SEVERE: SAAJ0009: Message send failed
    com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
         at SOAPConnector$1.run(SOAPConnector.java:145)
    Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
         at java.security.AccessController.doPrivileged(Native Method)Found trusted certificate:
    Version: V3
    Subject: [email protected], CN=localhost, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    Signature Algorithm: SHA1withRSA, OID = 1.2.840.113549.1.1.5
    Key: Sun RSA public key, 1024 bits
    modulus: 144881101064455404788814091404981462608080902688277626878350142057531273562236240952084735254146287262789443540177122740514352105900513219519909051335421867736741713195463254360663999239941476817345303119999799829037388457231058611674562175705514528085594563474765367007497034178272408363177194954006361904887
    public exponent: 65537
    Validity: [From: Sun Dec 25 01:03:13 IST 2005,
                   To: Wed Dec 24 01:03:13 IST 2008]
    Issuer: [email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US
    SerialNumber: [    08]
    Certificate Extensions: 4
    [1]: ObjectId: 2.16.840.1.113730.1.13 Criticality=false
    Extension unknown: DER encoded OCTET string =
    0000: 04 1F 16 1D 4F 70 65 6E 53 53 4C 20 47 65 6E 65 ....OpenSSL Gene
    0010: 72 61 74 65 64 20 43 65 72 74 69 66 69 63 61 74 rated Certificat
    0020: 65 e
    [2]: ObjectId: 2.5.29.14 Criticality=false
    SubjectKeyIdentifier [
    KeyIdentifier [
    0000: 3D C1 C8 B5 19 17 C3 8C 12 64 3C 05 C3 22 EE 7B =........d<.."..
    0010: BA 27 B4 C1 .'..
    [3]: ObjectId: 2.5.29.35 Criticality=false
    AuthorityKeyIdentifier [
    KeyIdentifier [
    0000: E0 CC 88 8B 41 A0 21 4A A4 61 18 67 27 61 A0 C9 ....A.!J.a.g'a..
    0010: 49 95 77 CA I.w.
    [[email protected], CN=genivia.com, OU=IT, O="Genivia, Inc.", L=Tallahassee, ST=FL, C=US]
    SerialNumber: [    00]
    [4]: ObjectId: 2.5.29.19 Criticality=false
    BasicConstraints:[
    CA:false
    PathLen: undefined
    Algorithm: [SHA1withRSA]
    Signature:
    0000: 6E D0 0E EC 85 EA A9 71 60 5D CB 13 3A 0C C2 C6 n......q`]..:...
    0010: A1 92 15 14 2A BB 86 2A 1D 68 B1 4B 41 C0 0B FB ....*..*.h.KA...
    0020: 35 C7 0F 6E 51 99 B3 25 95 4F 58 18 3D 73 F2 06 5..nQ..%.OX.=s..
    0030: 18 63 40 21 A7 44 1D AB 46 DB DD 6C 20 7D 23 23 .c@!.D..F..l .##
    0040: 08 84 92 CE 04 93 10 B3 CB 84 67 FD 3F 53 81 51 ..........g.?S.Q
    0050: 25 60 EE D1 02 89 06 58 E6 E0 B4 C2 20 D8 E8 84 %`.....X.... ...
    0060: 8A 4E 8D 59 62 67 33 4C 95 BD A3 F7 68 76 5E BA .N.Ybg3L....hv^.
    0070: D9 84 3F 80 C8 1E 49 3A 59 D0 B4 74 9E 2D CD F6 ..?...I:Y..t.-..
    Thread-3, SEND TLSv1 ALERT: fatal, description = certificate_unknown
    Thread-3, WRITE: TLSv1 Alert, length = 2
    Thread-3, called closeSocket()
    Thread-3, handling exception: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
         ... 2 more
    Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(Unknown Source)
         ... 3 more
    Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
         ... 5 more
    Caused by: java.security.cert.CertificateException: No subject alternative names present
         at sun.security.util.HostnameChecker.matchIP(Unknown Source)
         at sun.security.util.HostnameChecker.match(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 17 more
    CAUSE:
    java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
         at SOAPConnector$1.run(SOAPConnector.java:145)
    Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(Unknown Source)
         ... 3 more
    Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
         ... 5 more
    Caused by: java.security.cert.CertificateException: No subject alternative names present
         at sun.security.util.HostnameChecker.matchIP(Unknown Source)
         at sun.security.util.HostnameChecker.match(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 17 more
    CAUSE:
    java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.call(Unknown Source)
         at SOAPConnector$1.run(SOAPConnector.java:145)
    Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection.post(Unknown Source)
         at com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnection$PriviledgedPost.run(Unknown Source)
         ... 3 more
    Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
         ... 5 more
    Caused by: java.security.cert.CertificateException: No subject alternative names present
         at sun.security.util.HostnameChecker.matchIP(Unknown Source)
         at sun.security.util.HostnameChecker.match(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         ... 17 more
    Any help is appreciated.

    did you find the solution for the issue i am using jscape now...

  • Getting 415 Unsupported Media Type error when calling a windows web service

    I have a BPEL process that invokes a windows web service. This process is working currently on the production system. When trying to run the process in a new test clustered environment, I'm getting the error below (bolded).
    We're using 10.1.3.3 Oracle Application Server and BPEL. Please advise on what config files might need to be tweaked to fix this.
    InvokeWindowsLoggingWebService(faulted)
    [2010/04/16 17:26:35] Faulted while invoking operation "WriteLog" on provider "WindowsLoggingWebService". less
    -<messages>
    -<input>
    -<InvokeWindowsLoggingWebService_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters">
    -<WriteLog xmlns="http://tempuri.org/">
    <FileAbsolutePath>
    R:\CV & RM\upload_from_test.log
    </FileAbsolutePath>
    <Content>
    ||*************************************************************************************|Append to log file 2010-04-16T16:57:08-04:00|*************************************************************************************||START DATE: 2010-04-16T16:57:08-04:00|END DATE: 2010-04-16T17:25:58-04:00|COUNT: 106|TRANSFER OF FILES TO TAS SUCCESSFUL
    </Content>
    <NewLineDelimiter>
    |
    </NewLineDelimiter>
    </WriteLog>
    </part>
    </InvokeWindowsLoggingWebService_InputVariable>
    </input>
    -<fault>
    -<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="summary">
    <summary>
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 415 Unsupported Media Type
    </summary>
    </part>
    </remoteFault>
    </fault>
    </messages>
    [2010/04/16 17:26:35] "{http://schemas.oracle.com/bpel/extension}remoteFault" has been thrown. less
    -<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="summary">
    <summary>
    exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Bad response: 415 Unsupported Media Type
    </summary>
    </part>
    </remoteFault>

    I generated a proxy service in jdev and used the same parms as was done on OAS...
    <WriteLog xmlns="http://tempuri.org/">
    <FileAbsolutePath>
    R:\CV & RM\upload_from_test.log
    </FileAbsolutePath>
    <Content>
    ||*************************************************************************************|Append to log file 2010-04-16T16:57:08-04:00|*************************************************************************************||START DATE: 2010-04-16T16:57:08-04:00|END DATE: 2010-04-16T17:25:58-04:00|COUNT: 106|TRANSFER OF FILES TO TAS SUCCESSFUL
    </Content>
    <NewLineDelimiter>
    |
    </NewLineDelimiter>
    </WriteLog>
    and was able to call the service fine and it returned successful. Just seems to be an issue on the server when I execute it from there.

  • Java.lang.Exception:java.security.accesscontrolException:access denied

    good afternoon to all experts
    i am getting the following exception when i am going to read file
    java.lang.Exception:java.security.accesscontrolException:accessdenied(java.io.FilePermission c:\premiji.rar)
    my applet as follows
    import java.io.*;
    import java.applet.*;
    import java.awt.*;
    import java.security.*;
    import javax.crypto.Cipher;
    import javax.crypto.KeyGenerator;
    import javax.crypto.SecretKey;
    import javax.crypto.spec.*;
    import java.io.IOException;
    public class TestApp extends Applet
         public static TextField t;
         public static String key;
        public Label l;
    public  void init()
       setBackground(Color.GRAY);
       setLayout(null);
       t=new TextField("  ");
       t.setEchoChar('*');
       l=new Label("Enter ur key");
       l.setBounds(0,2,75,20);
       t.setForeground(Color.RED);
       t.setBounds(78,2,150,20);
    add(l);
       add(t);
    public static String eFile(String plainFile)throws Exception
    {String cFile="c://suri.rar";
         key=t.getText();
        byte[]raw=key.getBytes("UTF8");
        SecretKeySpec skeySpec = new SecretKeySpec(raw, "Blowfish");
        Cipher cipher = Cipher.getInstance("Blowfish");
        Cipher cipher2=Cipher.getInstance("Blowfish");
        cipher2.init(Cipher.DECRYPT_MODE,skeySpec);
        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
        InputStream fis,dis;
        FileOutputStream fos,dos;
        fis = new FileInputStream("c://premji.rar");
        fis = new javax.crypto.CipherInputStream(fis, cipher);
        fos = new FileOutputStream(cFile);
        byte[] b = new byte[8];
        int i = fis.read(b);
        while (i != -1) {
            fos.write(b, 0, i);
            i = fis.read(b);
    dis = new FileInputStream(cFile);
    dis = new javax.crypto.CipherInputStream(dis, cipher2);
    dos=new FileOutputStream("c://madhu.rar");
    byte[] c=new byte[8];
    int j=dis.read(c);
    while(j!=-1)
         dos.write(c,0,j);
         j=dis.read(c);
       fis.close() ;
       fos.close();
       return cFile;
    }my html as follows
    html>
    <script language="JavaScript">
      function pass()
        document.myForm.uname.value=document.myApp.eFile(document.myForm.upfile.value);
    </script>
    <applet name="myApp" code="TestApp.class" archive="TestApp.jar" width=600 height=80></applet>
    <body>
    <form name="myForm" >
    Name
    <input type="text" name="uname"/>
    File
    <input type="file" name="upfile"/>
    <input type=button value="click" onClick="pass();">
    <input type="submit"/>
    </form>
    </body>
    </html>note:
    i signed my applet like
    keytool -genkey -alias sgsits -validity 365
    jarsigner TestApp.jar sgsitshave we to modify polacy file also?
    if so how & which one modify
    any suggestion would be greatly appreciated
    thanks in advance

    I assume your signature is correct.
    Signing the applet enables privileges (like file IO) whenever all the calls on the stack leading
    to the sensitive operation (in your case fis = new FileInputStream("c://premji.rar")) originate
    from the signed jar. It is not your case, as you come into the applet from javascript.
    The solution is to use AccessController.doPrivileged...(). It was designed with this situation in mind.

Maybe you are looking for

  • Intel Mac mini vs PowerMac Dual G5 storage server

    I would like to setup a server to store family pictures, iTunes purchases and other media. Also I would like to use it as a backup for important documents and data. I have a Intel Mac Mini 1.66 and a G5 PowerMac dual 1.8GHz. I have purchased 4 400GB

  • How can I write HTML code in this forums

    Sorry but I didn't know where to post this thread..... How can I write HTML code in this forums?

  • Renewed .Mac, Lost old Pages!

    I recently renewed my .Mac membership--two days after it had expired. Now when I fire up iWeb, it starts an entirely new website! I had hundreds of pages complete on our old website! How can I get my old .Mac website back into iWeb to modify? Thanks!

  • Fieldpoint config and functions

    hi,   i connected a fp tc 120 i/o module and fp1000 network module. successfully configured but where to save the configuration file? i cannot see any fieldpoint read, write, etc functions in the block diagram of labview version 8.2.  from where do i

  • Simple fade-in fade-out doesn't work with premiere 9

    Hello, I'm using Windows 7, service pack 1 on a Dell computer XPS 8300 (Intel® Core™ i7-2600 CPU @ 3.40GHz × 8), 64 bits. Complex fades work, but not simple as fade-in fade-out. Note I had the same problem with Studio : it was solved by not using har