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

SelfSignedCertificate should migrate from sun.security.* #2132

Closed
mikkolehtisalo opened this issue Apr 24, 2016 · 1 comment
Closed

SelfSignedCertificate should migrate from sun.security.* #2132

mikkolehtisalo opened this issue Apr 24, 2016 · 1 comment
Assignees
Milestone

Comments

@mikkolehtisalo
Copy link
Contributor

@mikkolehtisalo mikkolehtisalo commented Apr 24, 2016

Some newest javacs seems to fail to compile SelfSignedCertificate without applying workarounds. Probably should migrate to java.security.cert, or some 3rd party library.

Tested on master, and openJDK 1.8.0_91:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project graylog2-server: Compilation failure: Compilation failure:
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[21,25] sun.security.x509.AlgorithmId is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[22,25] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[23,25] sun.security.x509.CertificateIssuerName is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[24,25] sun.security.x509.CertificateSerialNumber is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[25,25] sun.security.x509.CertificateSubjectName is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[26,25] sun.security.x509.CertificateValidity is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[27,25] sun.security.x509.CertificateVersion is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[28,25] sun.security.x509.CertificateX509Key is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[29,25] sun.security.x509.X500Name is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[30,25] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[ERROR] /home/mlehtisalo/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[31,25] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
@joschi
Copy link
Contributor

@joschi joschi commented Apr 25, 2016

@mikkolehtisalo Thanks for reporting this.

I cannot reproduce this with Oracle JDK 1.8.0_92:

# java -version
java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

The respective imports only generate warnings in my case:

[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ graylog2-server ---
[INFO] Compiling 975 source files to /Users/joschi/src/graylog2-server/graylog2-server/target/classes
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[21,25] sun.security.x509.AlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[22,25] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[23,25] sun.security.x509.CertificateIssuerName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[24,25] sun.security.x509.CertificateSerialNumber is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[25,25] sun.security.x509.CertificateSubjectName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[26,25] sun.security.x509.CertificateValidity is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[27,25] sun.security.x509.CertificateVersion is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[28,25] sun.security.x509.CertificateX509Key is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[29,25] sun.security.x509.X500Name is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[30,25] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[31,25] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[21,25] sun.security.x509.AlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[22,25] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[23,25] sun.security.x509.CertificateIssuerName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[24,25] sun.security.x509.CertificateSerialNumber is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[25,25] sun.security.x509.CertificateSubjectName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[26,25] sun.security.x509.CertificateValidity is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[27,25] sun.security.x509.CertificateVersion is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[28,25] sun.security.x509.CertificateX509Key is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[29,25] sun.security.x509.X500Name is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[30,25] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[31,25] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[21,25] sun.security.x509.AlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[22,25] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[23,25] sun.security.x509.CertificateIssuerName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[24,25] sun.security.x509.CertificateSerialNumber is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[25,25] sun.security.x509.CertificateSubjectName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[26,25] sun.security.x509.CertificateValidity is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[27,25] sun.security.x509.CertificateVersion is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[28,25] sun.security.x509.CertificateX509Key is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[29,25] sun.security.x509.X500Name is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[30,25] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[31,25] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[21,25] sun.security.x509.AlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[22,25] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[23,25] sun.security.x509.CertificateIssuerName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[24,25] sun.security.x509.CertificateSerialNumber is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[25,25] sun.security.x509.CertificateSubjectName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[26,25] sun.security.x509.CertificateValidity is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[27,25] sun.security.x509.CertificateVersion is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[28,25] sun.security.x509.CertificateX509Key is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[29,25] sun.security.x509.X500Name is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[30,25] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[31,25] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[172,15] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[172,39] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[173,15] sun.security.x509.X500Name is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[173,36] sun.security.x509.X500Name is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[175,18] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[175,44] sun.security.x509.CertificateVersion is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[175,63] sun.security.x509.CertificateVersion is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[176,18] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[176,50] sun.security.x509.CertificateSerialNumber is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[178,22] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[178,48] sun.security.x509.CertificateSubjectName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[180,22] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[183,22] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[183,47] sun.security.x509.CertificateIssuerName is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[185,22] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[187,18] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[187,45] sun.security.x509.CertificateValidity is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[188,18] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[188,40] sun.security.x509.CertificateX509Key is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[189,18] sun.security.x509.X509CertInfo is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[190,21] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[190,48] sun.security.x509.AlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[190,60] sun.security.x509.AlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[193,9] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[193,33] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[197,18] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[197,54] sun.security.x509.CertificateAlgorithmId is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[197,97] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release
[WARNING] /Users/joschi/src/graylog2-server/graylog2-server/src/main/java/org/graylog2/shared/security/tls/SelfSignedCertificate.java:[198,20] sun.security.x509.X509CertImpl is internal proprietary API and may be removed in a future release

Since this is not a blocker and we can still compile the project, we'll postpone changing this after the GA release of Graylog 2.0.0.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.