You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2014/10/24 21:30:34 UTC
[jira] [Updated] (HADOOP-11230) [JDK 8]
KeyStoreTestUtil#generateCertificate fails due to "subject class type
invalid"
[ https://issues.apache.org/jira/browse/HADOOP-11230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Kanter updated HADOOP-11230:
-----------------------------------
Attachment: HADOOP-11230.patch
The patch replaces the sun code with code from bouncycastle. Tests in other modules are depending on hadoop-common's test-jar, and unfortunately, maven doesn't include transitive dependencies with test-jars, so I had to add the bouncycastle test dependency to a few other pom files.
I verified that all tests using {{KeyStoreTestUtil}} pass with Java 7 and Java 8 on both trunk and branch-2.
> [JDK 8] KeyStoreTestUtil#generateCertificate fails due to "subject class type invalid"
> --------------------------------------------------------------------------------------
>
> Key: HADOOP-11230
> URL: https://issues.apache.org/jira/browse/HADOOP-11230
> Project: Hadoop Common
> Issue Type: Bug
> Components: test
> Affects Versions: 2.7.0
> Reporter: Robert Kanter
> Assignee: Robert Kanter
> Attachments: HADOOP-11230.patch
>
>
> Tests using {{KeyStoreTestUtil}} fail because it's using some internal sun classes to generate a self-signed certificate, and these have changed in JDK 8. We should not rely on the sun classes.
> {noformat}
> Running org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle
> Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.505 sec <<< FAILURE! - in org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle
> encryptedShuffleWithClientCerts(org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle) Time elapsed: 0.23 sec <<< ERROR!
> java.security.cert.CertificateException: Subject class type invalid.
> at sun.security.x509.X509CertInfo.setSubject(X509CertInfo.java:888)
> at sun.security.x509.X509CertInfo.set(X509CertInfo.java:415)
> at org.apache.hadoop.security.ssl.KeyStoreTestUtil.generateCertificate(KeyStoreTestUtil.java:96)
> at org.apache.hadoop.security.ssl.KeyStoreTestUtil.setupSSLConfig(KeyStoreTestUtil.java:259)
> at org.apache.hadoop.security.ssl.KeyStoreTestUtil.setupSSLConfig(KeyStoreTestUtil.java:223)
> at org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle.encryptedShuffleWithCerts(TestEncryptedShuffle.java:135)
> at org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle.encryptedShuffleWithClientCerts(TestEncryptedShuffle.java:167)
> encryptedShuffleWithoutClientCerts(org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle) Time elapsed: 0.077 sec <<< ERROR!
> java.security.cert.CertificateException: Subject class type invalid.
> at sun.security.x509.X509CertInfo.setSubject(X509CertInfo.java:888)
> at sun.security.x509.X509CertInfo.set(X509CertInfo.java:415)
> at org.apache.hadoop.security.ssl.KeyStoreTestUtil.generateCertificate(KeyStoreTestUtil.java:96)
> at org.apache.hadoop.security.ssl.KeyStoreTestUtil.setupSSLConfig(KeyStoreTestUtil.java:268)
> at org.apache.hadoop.security.ssl.KeyStoreTestUtil.setupSSLConfig(KeyStoreTestUtil.java:223)
> at org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle.encryptedShuffleWithCerts(TestEncryptedShuffle.java:135)
> at org.apache.hadoop.mapreduce.security.ssl.TestEncryptedShuffle.encryptedShuffleWithoutClientCerts(TestEncryptedShuffle.java:172)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)