Faultstring Javax.net.ssl.sslkeyexception Rsa Premaster Secret Error
Contents |
JCC SSL SSLKeyException .InvalidKeyException
Handling Exception: Javax.net.ssl.sslkeyexception: Rsa Premaster Secret Error
Technote (troubleshooting) Problem(Abstract) My java application using the Data Server Driver
Java.security.nosuchalgorithmexception: Suntlsrsapremastersecret Keygenerator Not Available
for JDBC (JCC) is failing to establish SSL connection with following error: SSLKeyException: RSA premaster secret error. Caused
Javax.net.ssl.sslkeyexception Rsa Premaster Secret Error Weblogic
by: java.security.InvalidKeyException: Illegal key size or default parameters. Symptom javax.net.ssl.SSLKeyException: RSA premaster secret error. Caused by: java.security.InvalidKeyException: Illegal key size or default parameters Cause The default restricted policy file has a 2048 key size limit. If javax.net.ssl.sslkeyexception rsa premaster secret error eclipse the RSA key size exceeds this limit then this error is expected. Resolving the problem This issue can be resolved by upgrading to the unrestricted policy files, replacing the security policy files with the IBM unlimited cryptography files. Replace the local_policy.jar with the Unrestricted JCE policy File. Document information More support for: DB2 for Linux, UNIX and Windows Programming Interface - JDBC Software version: 9.5, 9.7, 10.1, 10.5 Operating system(s): AIX, HP-UX, Linux, Solaris, Windows Reference #: 1663373 Modified date: 2014-10-11 Site availability Site assistance Contact and feedback Need support? Submit feedback to IBM Support 1-800-IBM-7378 (USA) Directory of worldwide contacts Contact Privacy Terms of use Accessibility
here for a quick overview of the site Help Center Detailed answers to i/o error: rsa premaster secret error any questions you might have Meta Discuss the workings and rsa premaster secret error ibm policies of this site About Us Learn more about Stack Overflow the company Business Learn "javax.net.ssl.sslkeyexception: rsa premaster secret error" tomcat more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow http://www-01.ibm.com/support/docview.wss?uid=swg21663373 Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up RSA Premaster secret error up vote 2 down vote favorite I inherited some code, no clue what it's trying to do (I commented what i think http://stackoverflow.com/questions/21390157/rsa-premaster-secret-error its doing), the original coder left my organization years ago... I'm hoping the great community here can at least point me in some direction as to what this code might be trying to do, and where I can start looking for a solution... Java code //Read java.security file from JDK and create a Security provider from it PropertyFileReader reader = new PropertyFileReader(); Security.addProvider(new IBMJSSEProvider()); Security.setProperty("ssl.SocketFactory.provider", "com.ibm.jsse2.SSLSocketFactoryImpl"); System.getProperties().putAll( reader.readProperties("security.properties")); //Set some authentication stuff Authenticator.setDefault(new PasswordAuthentication("User", "Password")); // get url to servlet (note, actual application has valid url) url = new URL("Connection URL"); // Set out HTTP URL connection httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestProperty("Authorization", "Basic "); httpURLConnection.setDoInput(true); httpURLConnection.setDoOutput(true); httpURLConnection.setUseCaches(false); httpURLConnection.setDefaultUseCaches(false); httpURLConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); httpURLConnection.setRequestMethod("POST"); //EXCEPTION IS THROWN HERE! DataOutputStream outputStream = new DataOutputStream( httpURLConnection.getOutputStream()); Stack trace javax.net.ssl.SSLKeyException: RSA premaster secret error at com.ibm.jsse2.fb.
RepublicDenmarkEcuadorEgyptEstoniaFinlandFranceGermanyGreeceGuatemalaHondurasHong KongHungaryIndiaIndonesiaIraqIrelandIsraelItalyJapanJordanKazakhstanKoreaKuwaitLaosLatviaLebanonLithuaniaMalaysiaMaldivesMaltaMexicoMoldovaNepalNetherlandsNew ZealandNicaraguaNorwayOmanPakistanPanamaParaguayPeruPhilippinesPolandPortugalPuerto RicoQatarRomaniaRussiaSaudi ArabiaSerbia & MontenegroSingaporeSlovakiaSloveniaSouth AfricaSpainSri LankaSwedenSwitzerland -- FrenchSwitzerland -- GermanTaiwanThailandTurkeyUkraineUnited Arab EmiratesUnited KingdomUnited StatesUruguayVenezuelaVietnamYemen Communities Social Applications Oracle Mix Oracle Blogs Oracle Wiki Oracle on Facebook Oracle http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6382135 on Twitter Networks Oracle ACEs Oracle PartnerNetwork Oracle Technology Network Knowledge Base Oracle User Groups Oracle Discussion Forums Support My Oracle https://bugs.openjdk.java.net/browse/JDK-6382135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel Support Community I am a... Java Developer Database Admins and Developers System Admins and Developers Architect C-Level Executives Chief Financial Officer (CFO) rsa premaster Chief Information Officer (CIO) Other Roles Analyst Investor Job Seeker Partner PeopleSoft Customer Siebel Customer Sun Customer Student Midsize Company I want to... Support Create or Update Service Request Search Support Knowledge Database Download Patches Education Find Oracle University Training Choose an Oracle Certification rsa premaster secret Path Partner Find a Partner Solution Access Software and Technical Support Attend a Partner-Only Event Attend Training Download Logos Manage Solutions Catalog Other Tasks Purchase Oracle Products Online Browse Oracle Documentation Search Oracle Documentation Check Oracle Earnings Check Oracle Price Lists Download Oracle Software Find an Oracle ACE View Oracle Benchmarks Filters: All Bugs.java.com Blogs Corporate Site Discussion Forums Documentation Training PartnerNetwork Technology Network Products and Services Products Oracle Database Enterprise Manager Oracle Fusion Middleware Oracle Applications Server and Storage Systems Development Tools Oracle On Demand Oracle CRM On Demand Products A-Z List Solutions Java Business Intelligence Enterprise Performance Management Data Warehousing Governance, Risk, and Compliance For Midsize Companies See All ??? Services Advanced Customer Services Consulting Financing On Demand Support Oracle University Industries Communications Education and Research Eng
ExportXMLWordPrintable Details Type: Bug Status: Closed Priority: P4 Resolution: Not an Issue Affects Version/s: 5.0 Fix Version/s: None Component/s: security-libs Labels: jdcinclude webbug Subcomponent: java.security CPU: x86 OS: windows_xp Description FULL PRODUCT VERSION : java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Windows -XP A DESCRIPTION OF THE PROBLEM : While communicating to an Active Directory server via SSL and also exuting the application with a security manager in place javax.naming.CommunicationException exception is thrown. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : 1. Include the root certificate of Active Direcotry into the cacerts of the JAVA_HOME/jre/lib/security folder. 2.Create a class file from the attached testcase 3. JAR this class file. Make sure that a policy file exists to grant it all the permissions. Excute it via the command prompt and use java -Djava.security.manager