Problem while setting ADS password
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jaspreet_Singh
Posted On:   Wednesday, March 30, 2005 12:12 AM

Hi, Im trying to change password in ADS. Ultimately it has to be done via web interface but i was trying it out on my local machine, which has windows 2000. I got the following exception as a result. Any ideas? This is my code section ... Hashtable env = new Hashtable(); env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" ); env.put(Context.PROVIDER_URL, "ldap://10.2.0.22:636/"); env.put(Context.SECURITY_AUTHENTICATION,"simple"); env.put(Context.SECURITY_PROTOCOL, "ssl"); env.put(Context.REFERRAL,"ignore"); env.put(Context.SECURITY_PRINCIPAL,"app@something.com"); e   More>>

Hi,


Im trying to change password in ADS. Ultimately it has to be done via web interface but i was trying it out on my local machine, which has windows 2000. I got the following exception as a result. Any ideas?
This is my code section ...


			
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" );
env.put(Context.PROVIDER_URL, "ldap://10.2.0.22:636/");
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_PROTOCOL, "ssl");
env.put(Context.REFERRAL,"ignore");
env.put(Context.SECURITY_PRINCIPAL,"app@something.com");
env.put(Context.SECURITY_CREDENTIALS,"Password1");

DirContext dctx = null;

try
{
dctx = new InitialDirContext( env );
}


The following is the exception i got ...


javax.naming.CommunicationException: simple bind failed: 10.2.0.22:636 [Root exception is javax.net.ssl.SSLProtocolExcep
tion: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus size.]
at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:198)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
at com.sun.jndi.ldap.LdapCtx. (LdapCtx.java:290)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext. (InitialContext.java:195)
at javax.naming.directory.InitialDirContext. (InitialDirContext.java:80 )
at updtpass.main(updtpass.java:34)
Caused by: javax.net.ssl.SSLProtocolException: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus s
ize.
at com.sun.net.ssl.internal.ssl.HandshakeMessage$CertificateMsg. (Dasho A12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:390)
at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:334)
at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:193)
... 12 more
Caused by: java.security.cert.CertificateParsingException: java.io.IOException: subject key, Unknown key spec: Invalid R
SA modulus size.
at sun.security.x509.X509CertInfo. (X509CertInfo.java:155)
at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1679)
at sun.security.x509.X509CertImpl. (X509CertImpl.java:173)
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:90 )
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.ja va:389)
... 24 more
Caused by: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus size.
at sun.security.x509.X509Key.parse(X509Key.java:155)
at sun.security.x509.CertificateX509Key. (CertificateX509Key.java:58)
at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:706)
at sun.security.x509.X509CertInfo. (X509CertInfo.java:153)
... 28 more
Exception in thread "main" java.lang.NullPointerException
at updtpass.main(updtpass.java:61)

   <<Less
About | Sitemap | Contact