lightmelody

changeset 730:29758354bda7 objectify

Added SSL.gs and CertificateStatus.gs. Lm.SSL is nowhere near done yet
author Arc Riley <arcriley@gmail.com>
date Sat, 11 Oct 2014 08:28:47 +0000
parents 3f4525825638
children f22a8105d820
files src/CertificateStatus.gs src/SSL.gs
diffstat 2 files changed, 76 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/CertificateStatus.gs	Sat Oct 11 08:28:47 2014 +0000
     1.3 @@ -0,0 +1,28 @@
     1.4 +/*
     1.5 + *  LightMelody - Lightweight XMPP/Jingle Client Library
     1.6 + *  Copyright (C) 2012,2013,2014 Copyleft Games Group
     1.7 + *
     1.8 + *  This program is free software; you can redistribute it and/or modify
     1.9 + *  it under the terms of the GNU Affero General Public License as published
    1.10 + *  by the Free Software Foundation, either version 3 of the License, or
    1.11 + *  (at your option) any later version.
    1.12 + *
    1.13 + *  This program is distributed in the hope that it will be useful,
    1.14 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.16 + *  GNU Affero General Public License for more details.
    1.17 + *
    1.18 + *  You should have received a copy of the GNU Affero General Public License
    1.19 + *  along with this program; if not, see http://www.gnu.org/licenses
    1.20 + *
    1.21 + */
    1.22 +
    1.23 +[indent=4]
    1.24 +
    1.25 +
    1.26 +[CCode (cprefix = "LM_CERT_")]
    1.27 +enum Lm.CertificateStatus
    1.28 +    INVALID
    1.29 +    ISSUER_NOT_FOUND
    1.30 +    REVOKED
    1.31 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/SSL.gs	Sat Oct 11 08:28:47 2014 +0000
     2.3 @@ -0,0 +1,48 @@
     2.4 +/*
     2.5 + *  LightMelody - Lightweight XMPP/Jingle Client Library
     2.6 + *  Copyright (C) 2012,2013,2014 Copyleft Games Group
     2.7 + *
     2.8 + *  This program is free software; you can redistribute it and/or modify
     2.9 + *  it under the terms of the GNU Affero General Public License as published
    2.10 + *  by the Free Software Foundation, either version 3 of the License, or
    2.11 + *  (at your option) any later version.
    2.12 + *
    2.13 + *  This program is distributed in the hope that it will be useful,
    2.14 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.15 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.16 + *  GNU Affero General Public License for more details.
    2.17 + *
    2.18 + *  You should have received a copy of the GNU Affero General Public License
    2.19 + *  along with this program; if not, see http://www.gnu.org/licenses
    2.20 + *
    2.21 + */
    2.22 +
    2.23 +[indent=4]
    2.24 +
    2.25 +
    2.26 +class Lm.SSL : Object
    2.27 +
    2.28 +    enum Response
    2.29 +        CONTINUE
    2.30 +        STOP
    2.31 +
    2.32 +
    2.33 +    enum Status
    2.34 +        NO_CERT_FOUND
    2.35 +        UNTRUSTED_CERT
    2.36 +        CERT_EXPIRED
    2.37 +        CERT_NOT_ACTIVATED
    2.38 +        CERT_HOSTNAME_MISMATCH
    2.39 +        CERT_FINGERPRINT_MISMATCH
    2.40 +        GENERIC_ERROR
    2.41 +
    2.42 +    /*
    2.43 +    construct (expected_fingerprint : string, ssl_function : SSLFunction)
    2.44 +
    2.45 +    public unowned string get_fingerprint ();
    2.46 +    public bool get_require_starttls ();
    2.47 +    public bool get_use_starttls ();
    2.48 +    public static bool is_supported ();
    2.49 +    public void use_starttls (bool use_starttls, bool require);
    2.50 +    */
    2.51 +