Skip to content

Commit 310d09a

Browse files
committed
rename ca configs
1 parent 7e7bf1a commit 310d09a

File tree

4 files changed

+43
-43
lines changed

4 files changed

+43
-43
lines changed

runtime/protocol/http-client-engines/http-client-engine-crt/api/http-client-engine-crt.api

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ public final class aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngine$Compa
1515
public final class aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngineConfig : aws/smithy/kotlin/runtime/http/engine/HttpClientEngineConfigImpl {
1616
public static final field Companion Laws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngineConfig$Companion;
1717
public synthetic fun <init> (Laws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngineConfig$Builder;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
18-
public final fun getCaDir ()Ljava/lang/String;
19-
public final fun getCaFile ()Ljava/lang/String;
20-
public final fun getCaRoot ()Ljava/lang/String;
18+
public final fun getCertificateFile ()Ljava/lang/String;
19+
public final fun getCertificatePem ()Ljava/lang/String;
20+
public final fun getCertificatesDirectory ()Ljava/lang/String;
2121
public final fun getClientBootstrap ()Laws/sdk/kotlin/crt/io/ClientBootstrap;
2222
public final fun getInitialWindowSizeBytes ()I
2323
public final fun getMaxConnections-pVg5ArA ()I
2424
public final fun getTlsCipherPreference ()Laws/sdk/kotlin/crt/io/TlsCipherPreference;
2525
public final fun getVerifyPeer ()Z
26-
public final fun setCaDir (Ljava/lang/String;)V
27-
public final fun setCaFile (Ljava/lang/String;)V
28-
public final fun setCaRoot (Ljava/lang/String;)V
26+
public final fun setCertificateFile (Ljava/lang/String;)V
27+
public final fun setCertificatePem (Ljava/lang/String;)V
28+
public final fun setCertificatesDirectory (Ljava/lang/String;)V
2929
public final fun setClientBootstrap (Laws/sdk/kotlin/crt/io/ClientBootstrap;)V
3030
public final fun setTlsCipherPreference (Laws/sdk/kotlin/crt/io/TlsCipherPreference;)V
3131
public final fun setVerifyPeer (Z)V
@@ -34,17 +34,17 @@ public final class aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngineConfig
3434

3535
public final class aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngineConfig$Builder : aws/smithy/kotlin/runtime/http/engine/HttpClientEngineConfigImpl$BuilderImpl {
3636
public fun <init> ()V
37-
public final fun getCaDir ()Ljava/lang/String;
38-
public final fun getCaFile ()Ljava/lang/String;
39-
public final fun getCaRoot ()Ljava/lang/String;
37+
public final fun getCertificateFile ()Ljava/lang/String;
38+
public final fun getCertificatePem ()Ljava/lang/String;
39+
public final fun getCertificatesDirectory ()Ljava/lang/String;
4040
public final fun getClientBootstrap ()Laws/sdk/kotlin/crt/io/ClientBootstrap;
4141
public final fun getInitialWindowSizeBytes ()I
4242
public final fun getMaxConnections-pVg5ArA ()I
4343
public final fun getTlsCipherPreference ()Laws/sdk/kotlin/crt/io/TlsCipherPreference;
4444
public final fun getVerifyPeer ()Z
45-
public final fun setCaDir (Ljava/lang/String;)V
46-
public final fun setCaFile (Ljava/lang/String;)V
47-
public final fun setCaRoot (Ljava/lang/String;)V
45+
public final fun setCertificateFile (Ljava/lang/String;)V
46+
public final fun setCertificatePem (Ljava/lang/String;)V
47+
public final fun setCertificatesDirectory (Ljava/lang/String;)V
4848
public final fun setClientBootstrap (Laws/sdk/kotlin/crt/io/ClientBootstrap;)V
4949
public final fun setInitialWindowSizeBytes (I)V
5050
public final fun setMaxConnections-WZ4Q5Ns (I)V

runtime/protocol/http-client-engines/http-client-engine-crt/jvm/src/aws/smithy/kotlin/runtime/http/engine/crt/ConnectionManager.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ internal class ConnectionManager(
3434
.apply {
3535
alpn = config.tlsContext.alpn.joinToString(separator = ";") { it.protocolId }
3636
minTlsVersion = toCrtTlsVersion(config.tlsContext.minVersion)
37-
caRoot = config.caRoot
38-
caFile = config.caFile
39-
caDir = config.caDir
37+
caRoot = config.certificatePem
38+
caFile = config.certificateFile
39+
caDir = config.certificatesDirectory
4040
tlsCipherPreference = config.tlsCipherPreference
4141
verifyPeer = config.verifyPeer
4242
}

runtime/protocol/http-client-engines/http-client-engine-crt/jvm/src/aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngineConfig.kt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ public class CrtHttpEngineConfig private constructor(builder: Builder) : HttpCli
4747

4848
/**
4949
* Certificate authority content in PEM format
50-
* Mutually exclusive with [caFile] and [caDir].
50+
* Mutually exclusive with [certificateFile] and [certificatesDirectory].
5151
*/
52-
public var caRoot: String? = builder.caRoot
52+
public var certificatePem: String? = builder.certificatePem
5353

5454
/**
55-
* Path to the root certificate. Must be in PEM format.
56-
* Mutually exclusive with [caRoot]. Can be used independently or together with [caDir].
55+
* Path to the certificate file in PEM format.
56+
* Mutually exclusive with [certificatePem]. Can be used independently or together with [certificatesDirectory].
5757
*/
58-
public var caFile: String? = builder.caFile
58+
public var certificateFile: String? = builder.certificateFile
5959

6060
/**
61-
* Path to the local trust store. Must be in PEM format.
62-
* Mutually exclusive with [caRoot]. Can be used independently or together with [caFile].
61+
* Path to the certificates directory containing PEM files.
62+
* Mutually exclusive with [certificatePem]. Can be used independently or together with [certificateFile].
6363
*/
64-
public var caDir: String? = builder.caDir
64+
public var certificatesDirectory: String? = builder.certificatesDirectory
6565

6666
/**
6767
* TLS cipher suite preference for connections.
@@ -82,9 +82,9 @@ public class CrtHttpEngineConfig private constructor(builder: Builder) : HttpCli
8282
maxConnections = this@CrtHttpEngineConfig.maxConnections
8383
initialWindowSizeBytes = this@CrtHttpEngineConfig.initialWindowSizeBytes
8484
clientBootstrap = this@CrtHttpEngineConfig.clientBootstrap
85-
caRoot = this@CrtHttpEngineConfig.caRoot
86-
caFile = this@CrtHttpEngineConfig.caFile
87-
caDir = this@CrtHttpEngineConfig.caDir
85+
certificatePem = this@CrtHttpEngineConfig.certificatePem
86+
certificateFile = this@CrtHttpEngineConfig.certificateFile
87+
certificatesDirectory = this@CrtHttpEngineConfig.certificatesDirectory
8888
tlsCipherPreference = this@CrtHttpEngineConfig.tlsCipherPreference
8989
verifyPeer = this@CrtHttpEngineConfig.verifyPeer
9090
}
@@ -114,19 +114,19 @@ public class CrtHttpEngineConfig private constructor(builder: Builder) : HttpCli
114114
* Certificate Authority content in PEM format.
115115
* Mutually exclusive with caFile and caDir.
116116
*/
117-
public var caRoot: String? = null
117+
public var certificatePem: String? = null
118118

119119
/**
120-
* Path to the root certificate. Must be in PEM format.
121-
* Mutually exclusive with caRoot.
120+
* Path to the certificate file in PEM format.
121+
* Mutually exclusive with [certificatePem]. Can be used independently or together with [certificatesDirectory].
122122
*/
123-
public var caFile: String? = null
123+
public var certificateFile: String? = null
124124

125125
/**
126-
* Path to the local trust store. Can be null.
127-
* Mutually exclusive with caRoot.
126+
* Path to the certificates directory containing PEM files.
127+
* Mutually exclusive with [certificatePem]. Can be used independently or together with [certificateFile].
128128
*/
129-
public var caDir: String? = null
129+
public var certificatesDirectory: String? = null
130130

131131
/**
132132
* TLS cipher suite preference for connections.

runtime/protocol/http-client-engines/test-suite/jvm/test/aws/smithy/kotlin/runtime/http/test/ConnectionTest.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,26 +191,26 @@ class ConnectionTest : AbstractEngineTest() {
191191
}
192192

193193
@Test
194-
fun testCaRoot() {
194+
fun testCertificatePem() {
195195
testTlsConfigs(
196-
"testCaRoot",
196+
"testCertificatePem",
197197
ServerType.TLS_1_2,
198198
crtConfigBlock = {
199-
caRoot = createTestPemCert(testCert)
199+
certificatePem = createTestPemCert(testCert)
200200
},
201201
)
202202
}
203203

204204
@Test
205-
fun testCaFile() {
205+
fun testCertificateFile() {
206206
val tempFile = createTempFile("ca-cert", ".pem").toFile()
207207
try {
208208
tempFile.writeText(createTestPemCert(testCert))
209209
testTlsConfigs(
210-
"testCaFile",
210+
"testCertificateFile",
211211
ServerType.TLS_1_2,
212212
crtConfigBlock = {
213-
caFile = tempFile.absolutePath
213+
certificateFile = tempFile.absolutePath
214214
},
215215
)
216216
} finally {
@@ -219,17 +219,17 @@ class ConnectionTest : AbstractEngineTest() {
219219
}
220220

221221
@Test
222-
fun testCaDir() {
222+
fun testCertificateDirectory() {
223223
val tempDir = createTempDirectory("ca-certs").toFile()
224224
try {
225225
val certFile = tempDir.resolve("ca-cert.pem")
226226
certFile.writeText(createTestPemCert(testCert))
227227

228228
testTlsConfigs(
229-
"testCaDir",
229+
"testCertificateDirectory",
230230
ServerType.TLS_1_2,
231231
crtConfigBlock = {
232-
caDir = tempDir.absolutePath
232+
certificatesDirectory = tempDir.absolutePath
233233
},
234234
)
235235
} finally {
@@ -243,7 +243,7 @@ class ConnectionTest : AbstractEngineTest() {
243243
"testVerifyPeers",
244244
ServerType.TLS_1_2,
245245
crtConfigBlock = {
246-
caRoot = createInvalidTestPemCert()
246+
certificatePem = createInvalidTestPemCert()
247247
verifyPeer = false
248248
},
249249
)

0 commit comments

Comments
 (0)