JDK-8257860 : [macOS]: Remove JNF dependency from libosxkrb5/SCDynamicStoreConfig.m
  • Type: Bug
  • Component: security-libs
  • Sub-Component: org.ietf.jgss:krb5
  • Affected Version: 17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-07
  • Updated: 2022-06-07
  • Resolved: 2021-02-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 15 JDK 17
11.0.12-oracleFixed 13.0.8Fixed 15.0.4Fixed 17 b08Fixed
Related Reports
Relates :  
Relates :  
Description
https://bugs.openjdk.java.net/browse/JDK-8257852 discusses removing 
JNF dependencies from the desktop module. 

It would be good to also remiove the dependency from other areas 
In the java.security.jgss module the file libosxkrb5/SCDynamicStoreConfig.m
makes uses of two categories of support

1) - JNI utility functions - which can be easily converted to direct JNU
2) - Type coercion support which is a small framework of classes to
support conversion between NS collections and JDK collections.
In particular it is used to convert an NSDictionary into a Hashtable.
As well as that converter, converters are registered for strings, numbers
 (which can be float or integer) NSArrays (into java.util.List)
So I think that (eg) if the dictionary itself contains a dictionary, then
the resulting Java Hashtable will contain a Hashtable.
The class sun/security/krb5/SCDynamicStoreConfig.convertNativeConfig() defines
what we are expecting so shows what cases need to be handled
So a good amount of coding needed here.
Or perhaps this code can be simplified ?

Comments
Fix Request (11u): This is the first bp of series to remove JNF dependency from jdk11u. Applies almost cleanly Same reason as 8257858, it's two bugs under one commit Review link https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2021-May/006232.html
18-05-2021

Fix Request (13u): This is the first bp of series of 8, to remove JNF dependency from jdk13u. Applies almost cleanly
07-04-2021

Fix Request (15u): Same reason as 8257858, it's two bugs under one commit
02-04-2021

Changeset: 4a8b5c16 Author: Weijun Wang <weijun@openjdk.org> Date: 2021-02-03 16:20:16 +0000 URL: https://git.openjdk.java.net/jdk/commit/4a8b5c16
03-02-2021

This native code returns a Hashtable. I'm wondering if it can just return a String array and then we can reconnect the relations outside on the Java side.
07-12-2020