class PemKeyCertOptions extends AnyRef
Key store options configuring a list of private key and its certificate based on Privacy-enhanced Electronic Email (PEM) files.
A key file must contain a non encrypted private key in PKCS8 format wrapped in a PEM block, for example:
-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDV6zPk5WqLwS0a ... K5xBhtm1AhdnZjx5KfW3BecE -----END PRIVATE KEY-----
Or contain a non encrypted private key in PKCS1 format wrapped in a PEM block, for example:
-----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAlO4gbHeFb/fmbUF/tOJfNPJumJUEqgzAzx8MBXv9Acyw9IRa ... zJ14Yd+t2fsLYVs2H0gxaA4DW6neCzgY3eKpSU0EBHUCFSXp/1+/ -----END RSA PRIVATE KEY-----
A certificate file must contain an X.509 certificate wrapped in a PEM block, for example:
-----BEGIN CERTIFICATE----- MIIDezCCAmOgAwIBAgIEZOI/3TANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV ... +tmLSvYS39O2nqIzzAUfztkYnUlZmB0l/mKkVqbGJA== -----END CERTIFICATE-----
Keys and certificates can either be loaded by Vert.x from the filesystem:
HttpServerOptions options = new HttpServerOptions(); options.setPemKeyCertOptions(new PemKeyCertOptions().setKeyPath("/mykey.pem").setCertPath("/mycert.pem"));
Or directly provided as a buffer:
Buffer key = vertx.fileSystem().readFileSync("/mykey.pem"); Buffer cert = vertx.fileSystem().readFileSync("/mycert.pem"); options.setPemKeyCertOptions(new PemKeyCertOptions().setKeyValue(key).setCertValue(cert));
Several key/certificate pairs can be used:
HttpServerOptions options = new HttpServerOptions(); options.setPemKeyCertOptions(new PemKeyCertOptions() .addKeyPath("/mykey1.pem").addCertPath("/mycert1.pem") .addKeyPath("/mykey2.pem").addCertPath("/mycert2.pem"));
- Alphabetic
- By Inheritance
- PemKeyCertOptions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new PemKeyCertOptions(_asJava: core.net.PemKeyCertOptions)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: core.net.PemKeyCertOptions
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def getCertPaths: Buffer[String]
- def getCertValues: Buffer[Buffer]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getKeyPaths: Buffer[String]
- def getKeyValues: Buffer[Buffer]
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
setCertPath(value: String): PemKeyCertOptions
Set the path of the first certificate, replacing the previous certificates paths
-
def
setCertPaths(value: Buffer[String]): PemKeyCertOptions
Set all the paths to the certificates files
-
def
setCertValue(value: Buffer): PemKeyCertOptions
Set the first certificate as a buffer, replacing the previous certificates buffers
-
def
setCertValues(value: Buffer[Buffer]): PemKeyCertOptions
Set all the certificates as a list of buffer
-
def
setKeyPath(value: String): PemKeyCertOptions
Set the path of the first key file, replacing the keys paths
-
def
setKeyPaths(value: Buffer[String]): PemKeyCertOptions
Set all the paths to the keys files
-
def
setKeyValue(value: Buffer): PemKeyCertOptions
Set the first key a a buffer, replacing the previous keys buffers
-
def
setKeyValues(value: Buffer[Buffer]): PemKeyCertOptions
Set all the keys as a list of buffer
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )