lightmelody

view src/SSL.gs @ 739:37088291364e

Lm.SSL now produces compatible API get_use_starttls() is a method, not a property, to avoid namespace conflict with the method use_starttls. One or both of these will need to be deprecated to clean this up.
author Arc Riley <arcriley@gmail.com>
date Thu, 16 Oct 2014 10:33:22 +0000
parents 29758354bda7
children 139cf216a934
line source
1 /*
2 * LightMelody - Lightweight XMPP/Jingle Client Library
3 * Copyright (C) 2012,2013,2014 Copyleft Games Group
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program; if not, see http://www.gnu.org/licenses
17 *
18 */
20 [indent=4]
23 class Lm.SSL : Object
25 delegate Function (ssl : SSL, status : Status) : Response
28 enum Response
29 CONTINUE
30 STOP
33 enum Status
34 NO_CERT_FOUND
35 UNTRUSTED_CERT
36 CERT_EXPIRED
37 CERT_NOT_ACTIVATED
38 CERT_HOSTNAME_MISMATCH
39 CERT_FINGERPRINT_MISMATCH
40 GENERIC_ERROR
43 construct (expected_fingerprint : string, ssl_function : Function)
44 _fingerprint = ""
45 _require_starttls = true
48 //////////////////////////////////////////////////////////////////////////
49 // Methods
51 def get_use_starttls ( ) : bool
52 return true
55 def is_supported ( ) : bool
56 return true
59 def use_starttls (use_starttls : bool, require : bool)
60 return
63 //////////////////////////////////////////////////////////////////////////
64 // Properties
66 prop readonly fingerprint : string
69 prop readonly require_starttls : bool