1Net::MQTT::Simple::SSL(U3s)er Contributed Perl DocumentatNieotn::MQTT::Simple::SSL(3)
2
3
4

NAME

6       Net::MQTT::Simple::SSL - Minimal MQTT version 3 interface with SSL
7       support
8

SYNOPSIS

10           # Specifying SSL parameters in environment variables
11
12           export MQTT_SIMPLE_SSL_CA=/etc/ssl/ca.crt
13           export MQTT_SIMPLE_SSL_CERT=/etc/ssl/mqtt.crt
14           export MQTT_SIMPLE_SSL_KEY=/etc/ssl/mqtt.key
15
16           perl -MNet::MQTT::Simple::SSL=mosquitto.example.org \
17                -nle'retain "topic/here" => $_'
18
19
20           # Specifying explicit SSL parameters
21
22           use Net::MQTT::Simple::SSL;
23
24           my $mqtt = Net::MQTT::Simple::SSL->new("mosquitto.example.org", {
25               SSL_ca_file   => '/etc/ssl/ca.crt',
26               SSL_cert_file => '/etc/ssl/mqtt.crt',
27               SSL_key_file  => '/etc/ssl/mqtt.key',
28           });
29
30           $mqtt->publish("topic/here" => "Message here");
31           $mqtt->retain( "topic/here" => "Message here");
32

DESCRIPTION

34       A subclass of Net::MQTT::Simple that adds SSL/TLS.
35
36       Like its base class, a server can be given on the "use" line, in which
37       case "publish" and "retain" are exported so that they can be used as
38       simple functions. This interface supports configuration via environment
39       variables, but not via explicit options in code.
40
41       The object oriented interface does support explicit SSL configuration.
42       See IO::Socket::SSL for a comprehensive overview of all the options
43       that can be supplied to the constructor, "new".
44
45   Environment variables
46       Instead of explicitly specifying the SSL options in the constructor,
47       they can be set with environment variables. These are overridden by
48       options given to "new".
49
50       MQTT_SIMPLE_SSL_INSECURE  Set to something other than 0 to disable SSL
51                                 validation.
52
53       MQTT_SIMPLE_SSL_CA        Path to the CA certificate or a directory of
54                                 certificates. IO::Socket::SSL can find the CA
55                                 path automatically on some systems.
56
57       MQTT_SIMPLE_SSL_CERT
58       MQTT_SIMPLE_SSL_KEY       Path to the client certificate file and its
59                                 key file.
60

LICENSE

62       Pick your favourite OSI approved license :)
63
64       http://www.opensource.org/licenses/alphabetical
65

AUTHOR

67       Juerd Waalboer <juerd@tnx.nl>
68

SEE ALSO

70       Net::MQTT::Simple
71
72
73
74perl v5.30.1                      2020-01-30         Net::MQTT::Simple::SSL(3)
Impressum