Skip to content

Commit eb7c3b1

Browse files
Project import generated by Copybara. (#1491)
PiperOrigin-RevId: 900717774 Co-authored-by: Miguel Aranda <miguelaranda@google.com>
1 parent 4631ac6 commit eb7c3b1

7 files changed

Lines changed: 223 additions & 8 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (C) 2026 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.libcore;
18+
19+
@SuppressWarnings({"unused", "DoNotCallSuggester"})
20+
public final class Flags {
21+
private Flags() {}
22+
23+
public static boolean networkSecurityPolicyReasonCtEnabledApi() {
24+
throw new RuntimeException("Stub!");
25+
}
26+
27+
public static boolean networkSecurityPolicyEchApi() {
28+
throw new RuntimeException("Stub!");
29+
}
30+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (C) 2026 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package libcore.net;
18+
19+
@SuppressWarnings({"unused", "DoNotCallSuggester"})
20+
public final class NetworkSecurityPolicy {
21+
public static final int CERTIFICATE_TRANSPARENCY_REASON_APP_OPT_IN = 1;
22+
public static final int CERTIFICATE_TRANSPARENCY_REASON_DOMAIN_OPT_IN = 2;
23+
public static final int CERTIFICATE_TRANSPARENCY_REASON_SDK_TARGET_DEFAULT_ENABLED = 3;
24+
25+
public static final int DOMAIN_ENCRYPTION_MODE_DISABLED = 1;
26+
public static final int DOMAIN_ENCRYPTION_MODE_OPPORTUNISTIC = 2;
27+
public static final int DOMAIN_ENCRYPTION_MODE_ENABLED = 3;
28+
public static final int DOMAIN_ENCRYPTION_MODE_REQUIRED = 4;
29+
30+
public static NetworkSecurityPolicy getInstance() {
31+
throw new RuntimeException("Stub!");
32+
}
33+
34+
public boolean isCleartextTrafficPermitted() {
35+
throw new RuntimeException("Stub!");
36+
}
37+
38+
public boolean isCleartextTrafficPermitted(String hostname) {
39+
throw new RuntimeException("Stub!");
40+
}
41+
42+
public boolean isCertificateTransparencyVerificationRequired(String hostname) {
43+
throw new RuntimeException("Stub!");
44+
}
45+
46+
public int getCertificateTransparencyVerificationReason(String hostname) {
47+
throw new RuntimeException("Stub!");
48+
}
49+
50+
public int getDomainEncryptionMode(String hostname) {
51+
throw new RuntimeException("Stub!");
52+
}
53+
54+
public void handleTrustStorageUpdate() {
55+
throw new RuntimeException("Stub!");
56+
}
57+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (C) 2026 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.conscrypt.net.flags;
18+
19+
@SuppressWarnings({"unused", "DoNotCallSuggester"})
20+
public final class Flags {
21+
private Flags() {}
22+
23+
public static boolean encryptedClientHelloPlatform() {
24+
throw new RuntimeException("Stub!");
25+
}
26+
}

openjdk/src/test/java/org/conscrypt/AbstractSessionContextTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,10 @@
2323
import static org.mockito.Mockito.any;
2424
import static org.mockito.Mockito.mock;
2525
import static org.mockito.Mockito.verify;
26-
import static org.mockito.Mockito.when;
2726

2827
import org.junit.Before;
2928
import org.junit.Test;
3029

31-
import java.security.cert.Certificate;
32-
3330
import javax.net.ssl.SSLSession;
3431

3532
public abstract class AbstractSessionContextTest<T extends AbstractSessionContext> {

openjdk/src/test/java/org/conscrypt/DuckTypedPSKKeyManagerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.conscrypt;
1818

1919
import static org.junit.Assert.assertEquals;
20-
import static org.junit.Assert.assertFalse;
2120
import static org.junit.Assert.assertNotNull;
2221
import static org.junit.Assert.assertSame;
2322
import static org.junit.Assert.fail;

0 commit comments

Comments
 (0)