self.master = master
self.socket = None
- def _wrap_socket(self, socket, target, cafile=None,
+ def _wrap_socket(self, socket, target, certfile=None, cafile=None,
protocol=ssl.PROTOCOL_TLSv1):
try: # Python 3.2 and greater
ssl_context = ssl.SSLContext(protocol)
except AttributeError: # Python < 3.2
self.socket = ssl.wrap_socket(
- socket, cert_reqs=ssl.CERT_REQUIRED,
+ socket, certfile=certfile, cert_reqs=ssl.CERT_REQUIRED,
ssl_version=protocol, ca_certs=cafile)
else:
ssl_context.verify_mode = ssl.CERT_REQUIRED
parser.add_argument(
'-c', '--ca-file', metavar='PATH',
help='file of trusted certificates for SSL/TLS')
+ parser.add_argument(
+ '-e', '--cert-file', metavar='PATH',
+ help='pem file used to authenticate to the server')
parser.add_argument(
'-d', '--log-level', metavar='LEVEL', choices=LOG_LEVELS,
help='how much to log to the log file (one of %(choices)s)')
nick_needs_number=re.search('%.*d', args.nick),
password=args.password,
cafile=args.ca_file,
+ certfile=args.cert_file,
)
LOG.info("irkerd version %s" % version)
if args.immediate:
<command>irkerd</command>
<arg>-c <replaceable>ca-file</replaceable></arg>
<arg>-d <replaceable>debuglevel</replaceable></arg>
+ <arg>-e <replaceable>cert-file</replaceable></arg>
<arg>-l <replaceable>logfile</replaceable></arg>
<arg>-n <replaceable>nick</replaceable></arg>
<arg>-p <replaceable>password</replaceable></arg>
<para>If the channel part of the URL does not have one of the prefix
characters <quote>#</quote>, <quote>&</quote>, or
<quote>+</quote>, a <quote>#</quote> will be prepended to it before
-shipping - <emphasis>unless</emphasis>the channel part has the suffix
+shipping - <emphasis>unless</emphasis> the channel part has the suffix
",isnick" (which is unconditionally removed).</para>
<para>The host part of the URL may have a port-number suffix separated by a
</listitem>
</varlistentry>
<varlistentry>
+<term>-e</term>
+<listitem><para>Takes a following filename in pem format and uses it
+to authenticate to the IRC server. You must be connecting to the IRC server
+over SSL for this to function properly. This is commonly known as
+<quote>CertFP.</quote>
+</para></listitem>
+</varlistentry>
+<varlistentry>
+<term>-e</term>
+<listitem><para>Takes a following filename in pem format and uses it
+to authenticate to the IRC server. You must be connecting to the IRC server
+over SSL for this to function properly. This is commonly known as <quote>CertFP.</quote>
+</para></listitem>
+</varlistentry>
+<varlistentry>
<term>-l</term>
<listitem><para>Takes a following filename, logs traffic to that file.
Each log line consists of three |-separated fields; a numeric