Skip to content

Commit ea2f753

Browse files
committed
Fix quotes in SSL guide
1 parent 7c63100 commit ea2f753

File tree

4 files changed

+140
-140
lines changed

4 files changed

+140
-140
lines changed

docs/ssl/index.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ public class Example1 {
708708

709709
public static void main(String[] args) throws Exception {
710710
ConnectionFactory factory = new ConnectionFactory();
711-
factory.setHost("localhost");
711+
factory.setHost("localhost");
712712
factory.setPort(5671);
713713

714714
factory.useSslProtocol();
@@ -719,15 +719,15 @@ public class Example1 {
719719
Channel channel = conn.createChannel();
720720

721721
// non-durable, exclusive, auto-delete queue
722-
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
723-
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
722+
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
723+
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
724724

725-
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
725+
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
726726
if (chResponse == null) {
727-
System.out.println("No message retrieved");
727+
System.out.println("No message retrieved");
728728
} else {
729729
byte[] body = chResponse.getBody();
730-
System.out.println("Received: " + new String(body));
730+
System.out.println("Received: " + new String(body));
731731
}
732732

733733
channel.close();
@@ -777,41 +777,41 @@ import com.rabbitmq.client.*;
777777
public class Example2 {
778778

779779
public static void main(String[] args) throws Exception {
780-
char[] keyPassphrase = "MySecretPassword".toCharArray();
781-
KeyStore ks = KeyStore.getInstance("PKCS12");
782-
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
780+
char[] keyPassphrase = "MySecretPassword".toCharArray();
781+
KeyStore ks = KeyStore.getInstance("PKCS12");
782+
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
783783

784-
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
784+
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
785785
kmf.init(ks, keyPassphrase);
786786

787-
char[] trustPassphrase = "rabbitstore".toCharArray();
788-
KeyStore tks = KeyStore.getInstance("JKS");
789-
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
787+
char[] trustPassphrase = "rabbitstore".toCharArray();
788+
KeyStore tks = KeyStore.getInstance("JKS");
789+
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
790790

791-
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
791+
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
792792
tmf.init(tks);
793793

794-
SSLContext c = SSLContext.getInstance("TLSv1.2");
794+
SSLContext c = SSLContext.getInstance("TLSv1.2");
795795
c.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
796796

797797
ConnectionFactory factory = new ConnectionFactory();
798-
factory.setHost("localhost");
798+
factory.setHost("localhost");
799799
factory.setPort(5671);
800800
factory.useSslProtocol(c);
801801
factory.enableHostnameVerification();
802802

803803
Connection conn = factory.newConnection();
804804
Channel channel = conn.createChannel();
805805

806-
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
807-
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
806+
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
807+
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
808808

809-
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
809+
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
810810
if (chResponse == null) {
811-
System.out.println("No message retrieved");
811+
System.out.println("No message retrieved");
812812
} else {
813813
byte[] body = chResponse.getBody();
814-
System.out.println("Received: " + new String(body));
814+
System.out.println("Received: " + new String(body));
815815
}
816816

817817
channel.close();
@@ -840,25 +840,25 @@ import com.rabbitmq.client.*;
840840
public class Example2 {
841841

842842
public static void main(String[] args) throws Exception {
843-
char[] keyPassphrase = "MySecretPassword".toCharArray();
844-
KeyStore ks = KeyStore.getInstance("PKCS12");
845-
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
843+
char[] keyPassphrase = "MySecretPassword".toCharArray();
844+
KeyStore ks = KeyStore.getInstance("PKCS12");
845+
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
846846

847-
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
847+
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
848848
kmf.init(ks, keyPassphrase);
849849

850-
char[] trustPassphrase = "rabbitstore".toCharArray();
851-
KeyStore tks = KeyStore.getInstance("JKS");
852-
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
850+
char[] trustPassphrase = "rabbitstore".toCharArray();
851+
KeyStore tks = KeyStore.getInstance("JKS");
852+
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
853853

854-
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
854+
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
855855
tmf.init(tks);
856856

857-
SSLContext c = SSLContext.getInstance("TLSv1.2");
857+
SSLContext c = SSLContext.getInstance("TLSv1.2");
858858
c.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
859859

860860
ConnectionFactory factory = new ConnectionFactory();
861-
factory.setHost("localhost");
861+
factory.setHost("localhost");
862862
factory.setPort(5671);
863863
factory.useSslProtocol(c);
864864
factory.enableHostnameVerification();
@@ -887,7 +887,7 @@ or a `SSLContext`:
887887

888888
```java
889889
ConnectionFactory factory = new ConnectionFactory();
890-
factory.setHost("localhost");
890+
factory.setHost("localhost");
891891
factory.setPort(5671);
892892

893893
factory.useSslProtocol("TLSv1.2");
@@ -2143,9 +2143,9 @@ will change in a future RabbitMQ Erlang client release.
21432143
### Code Example {#erlang-code-example}
21442144

21452145
```erlang
2146-
SslOpts = [{cacertfile, "/path/to/ca_certificate.pem"},
2147-
{certfile, "/path/to/client/certificate.pem"},
2148-
{keyfile, "/path/to/client/private_key.pem"},
2146+
SslOpts = [{cacertfile, "/path/to/ca_certificate.pem"},
2147+
{certfile, "/path/to/client/certificate.pem"},
2148+
{keyfile, "/path/to/client/private_key.pem"},
21492149

21502150
%% only necessary with intermediate CAs
21512151
%% {depth, 2},

versioned_docs/version-3.13/ssl/index.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ public class Example1 {
701701

702702
public static void main(String[] args) throws Exception {
703703
ConnectionFactory factory = new ConnectionFactory();
704-
factory.setHost("localhost");
704+
factory.setHost("localhost");
705705
factory.setPort(5671);
706706

707707
factory.useSslProtocol();
@@ -712,15 +712,15 @@ public class Example1 {
712712
Channel channel = conn.createChannel();
713713

714714
// non-durable, exclusive, auto-delete queue
715-
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
716-
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
715+
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
716+
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
717717

718-
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
718+
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
719719
if (chResponse == null) {
720-
System.out.println("No message retrieved");
720+
System.out.println("No message retrieved");
721721
} else {
722722
byte[] body = chResponse.getBody();
723-
System.out.println("Received: " + new String(body));
723+
System.out.println("Received: " + new String(body));
724724
}
725725

726726
channel.close();
@@ -770,41 +770,41 @@ import com.rabbitmq.client.*;
770770
public class Example2 {
771771

772772
public static void main(String[] args) throws Exception {
773-
char[] keyPassphrase = "MySecretPassword".toCharArray();
774-
KeyStore ks = KeyStore.getInstance("PKCS12");
775-
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
773+
char[] keyPassphrase = "MySecretPassword".toCharArray();
774+
KeyStore ks = KeyStore.getInstance("PKCS12");
775+
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
776776

777-
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
777+
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
778778
kmf.init(ks, keyPassphrase);
779779

780-
char[] trustPassphrase = "rabbitstore".toCharArray();
781-
KeyStore tks = KeyStore.getInstance("JKS");
782-
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
780+
char[] trustPassphrase = "rabbitstore".toCharArray();
781+
KeyStore tks = KeyStore.getInstance("JKS");
782+
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
783783

784-
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
784+
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
785785
tmf.init(tks);
786786

787-
SSLContext c = SSLContext.getInstance("TLSv1.2");
787+
SSLContext c = SSLContext.getInstance("TLSv1.2");
788788
c.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
789789

790790
ConnectionFactory factory = new ConnectionFactory();
791-
factory.setHost("localhost");
791+
factory.setHost("localhost");
792792
factory.setPort(5671);
793793
factory.useSslProtocol(c);
794794
factory.enableHostnameVerification();
795795

796796
Connection conn = factory.newConnection();
797797
Channel channel = conn.createChannel();
798798

799-
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
800-
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
799+
channel.queueDeclare("rabbitmq-java-test", false, true, true, null);
800+
channel.basicPublish("", "rabbitmq-java-test", null, "Hello, World".getBytes());
801801

802-
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
802+
GetResponse chResponse = channel.basicGet("rabbitmq-java-test", false);
803803
if (chResponse == null) {
804-
System.out.println("No message retrieved");
804+
System.out.println("No message retrieved");
805805
} else {
806806
byte[] body = chResponse.getBody();
807-
System.out.println("Received: " + new String(body));
807+
System.out.println("Received: " + new String(body));
808808
}
809809

810810
channel.close();
@@ -833,25 +833,25 @@ import com.rabbitmq.client.*;
833833
public class Example2 {
834834

835835
public static void main(String[] args) throws Exception {
836-
char[] keyPassphrase = "MySecretPassword".toCharArray();
837-
KeyStore ks = KeyStore.getInstance("PKCS12");
838-
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
836+
char[] keyPassphrase = "MySecretPassword".toCharArray();
837+
KeyStore ks = KeyStore.getInstance("PKCS12");
838+
ks.load(new FileInputStream("/path/to/client_key.p12"), keyPassphrase);
839839

840-
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
840+
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
841841
kmf.init(ks, keyPassphrase);
842842

843-
char[] trustPassphrase = "rabbitstore".toCharArray();
844-
KeyStore tks = KeyStore.getInstance("JKS");
845-
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
843+
char[] trustPassphrase = "rabbitstore".toCharArray();
844+
KeyStore tks = KeyStore.getInstance("JKS");
845+
tks.load(new FileInputStream("/path/to/trustStore"), trustPassphrase);
846846

847-
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
847+
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
848848
tmf.init(tks);
849849

850-
SSLContext c = SSLContext.getInstance("TLSv1.2");
850+
SSLContext c = SSLContext.getInstance("TLSv1.2");
851851
c.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
852852

853853
ConnectionFactory factory = new ConnectionFactory();
854-
factory.setHost("localhost");
854+
factory.setHost("localhost");
855855
factory.setPort(5671);
856856
factory.useSslProtocol(c);
857857
factory.enableHostnameVerification();
@@ -880,7 +880,7 @@ or a `SSLContext`:
880880

881881
```java
882882
ConnectionFactory factory = new ConnectionFactory();
883-
factory.setHost("localhost");
883+
factory.setHost("localhost");
884884
factory.setPort(5671);
885885

886886
factory.useSslProtocol("TLSv1.2");
@@ -2138,9 +2138,9 @@ will change in a future RabbitMQ Erlang client release.
21382138
### Code Example {#erlang-code-example}
21392139

21402140
```erlang
2141-
SslOpts = [{cacertfile, "/path/to/ca_certificate.pem"},
2142-
{certfile, "/path/to/client/certificate.pem"},
2143-
{keyfile, "/path/to/client/private_key.pem"},
2141+
SslOpts = [{cacertfile, "/path/to/ca_certificate.pem"},
2142+
{certfile, "/path/to/client/certificate.pem"},
2143+
{keyfile, "/path/to/client/private_key.pem"},
21442144

21452145
%% only necessary with intermediate CAs
21462146
%% {depth, 2},

0 commit comments

Comments
 (0)