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

Add basics of TLS support #6

Merged
merged 15 commits into from
Dec 5, 2013
Prev Previous commit
Next Next commit
Start adding documentation to README
  • Loading branch information
mgdm committed Nov 4, 2013
commit 8446d5154af83c8978b9814fe838496aad16778e
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ This is the actual Mosquitto client.

1. [__construct](#__construct) - create a new client
1. [setCredentials](#setcredentials) - set the credentials to use on connection
1. [setTlsCertificates](#settlscertificates) - set the TLS certificate sources
1. [setTlsInsecure](#settlsinsecure) - Set verification of the server hostname
in TLS certificates
1. [setTlsOptions](#settlsoptions) - Set advanced TLS options
1. [setTlsPSK](#settlspsk) - Configure the client for pre-shared-key based TLS
support.
1. [setWill](#setwill) - set the client will, to be delivered if disconnected
uncleanly
1. [clearWill](#clearwill) - clear a previously-set will
Expand Down Expand Up @@ -83,6 +89,21 @@ called before connect().
| Username | string | Username to supply to the broker |
| Password | string | Password to supply to the broker |

#### setTlsCertificates

Configure the client for certificate based SSL/TLS support. Must be called
before connect(). Cannot be used in conjunction with setTlsPSK().

Define the Certificate Authority certificates to be trusted (ie. the server
certificate must be signed with one of these certificates) using cafile.
If the server you are connecting to requires clients to provide a certificate,
define certfile and keyfile with your client certificate and private key. If
your private key is encrypted, provide a password callback function or you will
have to enter the password at the command line.

| Parameter | Type | Description |
| --- | --- | ---- |

#### setWill

Set the client "last will and testament", which will be sent on an unclean
Expand Down