Opened 14 years ago

Closed 14 years ago

#17 closed task (fixed)

Build sun security classes

Reported by: dmik Owned by:
Priority: blocker Milestone: Alpha
Component: general Version:
Severity: Keywords:
Cc:

Description

For now, building the security classes and native libraries (see openjdk/jdk/make/sun/security for the details of the contents) is disabled. This is to be done at a later stage.

Change History (16)

comment:1 by dmik, 14 years ago

This also includes the openjdk/jdk/make/com/sun/security stuff.

comment:2 by dmik, 14 years ago

This also includes some classes in openjdk/jdk/make/sun/net/FILES_java.gmk.

comment:3 by dmik, 14 years ago

More commented out security-related components in openjdk/jdk/make/com/sun/Makefile.

comment:4 by dmik, 14 years ago

The native methods of the krb5 related classes use the Lsa* Win32 API which is actually all stubs in Odin (doesn't do anything but returns success). However, these APIs are missing from the Odin's Win32 headers so they are not accessible at the source level. I will check if this native krb5 code may be disabled in Java (Linux doesn't use native calls for krb5) as it may be simpler than bringing the Lsa* function declarations to Odin headers to eventually build the code that actually does nothing.

comment:5 by dmik, 14 years ago

AFAIU, these native Kerberos methods are used to get native MS Kerberos Tickets on Windows platforms and use them to initialize Java Kerberos credentials (sun.security.krb5.Credentials). Since OS/2 doesn't seem to have any native Kerberos support, this code is irrelevant for us.

So, I disabled these Windows native methods on OS/2 (which in particular means that there will be no w2k_lsa_auth.dll in the OS/2 builds).

comment:6 by dmik, 14 years ago

The sun.security.smartcardio package provides the SmartCard access for authorization and other related procedures. The native methods of classes in this package are used to interface with SmartCard devices. For now, I don't find it very important on OS/2 so I will disable all the native code completely (the SCard* WinAPI is of course missing from Odin). If we really need it later, there is some Linux project for SmartCard support (MUSCLE SmartCard Development, http://www.linuxnet.com) which is used on Linux/Solaris which we may probably port to OS/2 and either integrate with Odin to implement the SCard* WinAPI or use in Java directly. Created ticket #21 for that.

comment:7 by dmik, 14 years ago

Enabled the sun.security.mscapi package (and sunmscapi.dll). The sun.* tree is done. The com.* tree is pending.

comment:8 by dmik, 14 years ago

Done the com.sun.security.auth.module package (jaas_nt.dll).

comment:9 by dmik, 14 years ago

The security stuff is done; Java now works when run from its standard locations (JDK image and JRE image).

I'm trying Zero Toaster now as a testcase.

comment:10 by dmik, 14 years ago

Okay, ZeroToaster works. At least it starts and I can telnet to port 110 from another machine.

I think that we are ready for an Alpha release. Will try some more console apps tomorrow to make sure so.

comment:11 by dmik, 14 years ago

Silvan reports that Zero Toaster works (sends mail and the web interface works too).

I found another application that works: http://www.pulptunes.com/.

I noticed some assertions in the debug version which I want to sort out first and then we'll release.

comment:12 by dmik, 14 years ago

No, there is a problem with ZeroToaster. It throws an exception when it want to get mails from a user POP3 and the same happens when it wants to store mails for local users:

23.09.2010 18:23:36.120 M 'POP3 [01/15]' I:pass seahorse
23.09.2010 18:23:36.130 D 'POP3 [01/15]' SMTP after POP3 timestamp updated
23.09.2010 18:23:36.130 ? 'POP3 [01/15]' Cannot create domain shortname path for silvan.scherrer@aroa.ch
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' null
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::java.lang.NullPointerException
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at java.io.File.<init>(File.java:239)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.storage.file.FileStorage.mailGetHeadersForUser_Impl(FileStorage.java:921)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.storage.StorageManager.mailGetHeadersForUser(StorageManager.java:540)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.cmd_rset(POP3_ServerInstance.java:302)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.cmd_pass_user(POP3_ServerInstance.java:253)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.cmd_pass(POP3_ServerInstance.java:194)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.service(POP3_ServerInstance.java:664)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.ServerSocketInstance.run(ServerSocketInstance.java:116)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at java.lang.Thread.run(Thread.java:636)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' Handled exception
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::net.zerotoaster.mta.storage.StorageException
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.storage.StorageManager.mailGetHeadersForUser(StorageManager.java:544)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.cmd_rset(POP3_ServerInstance.java:302)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.cmd_pass_user(POP3_ServerInstance.java:253)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.cmd_pass(POP3_ServerInstance.java:194)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.POP3_ServerInstance.service(POP3_ServerInstance.java:664)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at net.zerotoaster.mta.main.ServerSocketInstance.run(ServerSocketInstance.java:116)
23.09.2010 18:23:36.130 ! 'POP3 [01/15]' ::at java.lang.Thread.run(Thread.java:636)
23.09.2010 18:23:36.160 # 'POP3 [01/15]' TE POP3 [01/15]/12b3f6837a4 [localhost/127.0.0.1]

Looks like a construction of some file name fails so null gets passed to the java.io.File constructor. Waiting for the source of ZT from Silvan.

comment:13 by dmik, 14 years ago

Fixed a WinSock2 oddity in Odin (see http://svn.netlabs.org/odin32/ticket/10). This fixes the following exception in some applications using sockets (like pulptunes):

java.net.SocketException: error setting options
        at java.net.TwoStacksPlainDatagramSocketImpl.join(Native Method)

comment:14 by dmik, 14 years ago

After solving #23, ZT seems to work well now. Silvan, please check at your side. You may take the test build from ftp://ftp.netlabs.org/pub/qt4/tmp/jjj-2010-09-28.zip.

comment:15 by Silvan Scherrer, 14 years ago

i did some testing only for the problems we had. i could not reproduce them anymore. also everything seems in the SDK now, as i saw no class not found as in the last SDK.

comment:16 by dmik, 14 years ago

Resolution: fixed
Status: newclosed

Good.

Note: See TracTickets for help on using tickets.