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

Correct feedback from downstream. #1302

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/src/main/java/org/conscrypt/NativeCrypto.java
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ static String[] checkEnabledCipherSuites(String[] cipherSuites) {
}
// Not sure if we need to do this for SPAKE, but the SPAKE cipher suite
// not registered at the moment.
if (DEFAULT_SPAKE_CIPHER_SUITES[0] == cipherSuites[i]) {
if (DEFAULT_SPAKE_CIPHER_SUITES[0].equals(cipherSuites[i])) {
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import javax.net.ssl.SSLEngine;

/**
* @hide This class is not part of the Android public SDK API
* Provider of key material for Spake2Plus
*/
@Internal
public class Spake2PlusKeyManager implements KeyManager {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import javax.net.ssl.TrustManager;

/**
* @hide This class is not part of the Android public SDK API
* Noop TrustManager for Spake2Plus
*/
@Internal
public class Spake2PlusTrustManager implements TrustManager {
Expand All @@ -28,4 +28,4 @@ public class Spake2PlusTrustManager implements TrustManager {
public void checkClientTrusted() {}

public void checkServerTrusted() {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -243,25 +243,23 @@ public void test_TrustManagerFactory_intermediate() throws Exception {
keyStore.setCertificateEntry("alias", chain[1]);

ServiceTester.test("TrustManagerFactory")
.run(new ServiceTester.Test() {
@Override
public void test(Provider p, String algorithm) throws Exception {
TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm);
if (tmf.getAlgorithm() == "PAKE") {
return;
}
tmf.init(keyStore);
TrustManager[] trustManagers = tmf.getTrustManagers();
for (TrustManager trustManager : trustManagers) {
if (!(trustManager instanceof X509TrustManager)) {
continue;
.skipAlgorithm("PAKE")
.run(new ServiceTester.Test() {
@Override
public void test(Provider p, String algorithm) throws Exception {
TrustManagerFactory tmf = TrustManagerFactory.getInstance(algorithm);
tmf.init(keyStore);
TrustManager[] trustManagers = tmf.getTrustManagers();
for (TrustManager trustManager : trustManagers) {
if (!(trustManager instanceof X509TrustManager)) {
continue;
}
X509TrustManager tm = (X509TrustManager) trustManager;
tm.checkClientTrusted(chain, "RSA");
tm.checkServerTrusted(chain, "RSA");
}
X509TrustManager tm = (X509TrustManager) trustManager;
tm.checkClientTrusted(chain, "RSA");
tm.checkServerTrusted(chain, "RSA");
}
}
});
});
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
/**
* PakeKeyManagerFactory implementation.
* @see KeyManagerFactorySpi
* @hide This class is not part of the Android public SDK API
*/
@Internal
public class PakeKeyManagerFactory extends KeyManagerFactorySpi {
Expand Down
Loading