Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sun.security.x509 dependency #1173

Open
merks opened this issue Oct 6, 2023 · 0 comments
Open

Remove sun.security.x509 dependency #1173

merks opened this issue Oct 6, 2023 · 0 comments

Comments

@merks
Copy link

merks commented Oct 6, 2023

The most recent version on Maven central

https://repo1.maven.org/maven2/org/conscrypt/conscrypt-openjdk-uber/2.5.2/

has an unfortunate Import-Package of of sun.security.x509

Automatic-Module-Name                   org.conscrypt
Bnd-LastModified                        1617109637399
BoringSSL-Version                       49f0329110a1d93a5febc2bceceedc655d995420
Built-By                                root
Built-JDK                               1.8.0_131
Bundle-ManifestVersion                  2
Bundle-Name                             org.conscrypt
Bundle-SymbolicName                     org.conscrypt
Bundle-Version                          2.5.2
Created-By                              1.8.0_131 (Oracle Corporation)
Export-Package                          org.conscrypt.ct;uses:="org.conscrypt";version="2.5.2"
                                        org.conscrypt.io;version="2.5.2"
                                        org.conscrypt;uses:="javax.crypto,javax.net.ssl,javax.security.auth.x500,org.conscrypt.ct";version="2.5.2"
Implementation-Title                    conscrypt-openjdk-uber
Implementation-Version                  2.5.2
Import-Package                          javax.crypto
                                        javax.crypto.spec
                                        javax.net
                                        javax.net.ssl
                                        javax.security.auth.x500
                                        javax.security.cert
                                        org.conscrypt
                                        org.conscrypt.ct
                                        org.conscrypt.io
                                        sun.security.x509
Manifest-Version                        1.0
Require-Capability                      osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.7))"
Source-Compatibility                    1.7
Target-Compatibility                    1.7
Tool                                    Bnd-4.3.0.201909301554

I believe the comes from this import:

import sun.security.x509.AlgorithmId;

which is used only in this method which is annotated as unused:

/**
* OID to Algorithm Name mapping.
*/
@SuppressWarnings("unused")
static String oidToAlgorithmName(String oid) {
try {
return AlgorithmId.get(oid).getName();
} catch (Exception e) {
return oid;
} catch (IllegalAccessError e) {
// This can happen under JPMS because AlgorithmId isn't exported by java.base
return oid;
}
}

Probably this can be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant