Home | History | Annotate | Line # | Download | only in TLSProxy
      1  1.1  christos # Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
      2  1.1  christos #
      3  1.1  christos # Licensed under the Apache License 2.0 (the "License").  You may not use
      4  1.1  christos # this file except in compliance with the License.  You can obtain a copy
      5  1.1  christos # in the file LICENSE in the source distribution or at
      6  1.1  christos # https://www.openssl.org/source/license.html
      7  1.1  christos 
      8  1.1  christos use strict;
      9  1.1  christos 
     10  1.1  christos package TLSProxy::Alert;
     11  1.1  christos 
     12  1.1  christos sub new
     13  1.1  christos {
     14  1.1  christos     my $class = shift;
     15  1.1  christos     my ($server,
     16  1.1  christos         $encrypted,
     17  1.1  christos         $level,
     18  1.1  christos         $description) = @_;
     19  1.1  christos 
     20  1.1  christos     my $self = {
     21  1.1  christos         server => $server,
     22  1.1  christos         encrypted => $encrypted,
     23  1.1  christos         level => $level,
     24  1.1  christos         description => $description
     25  1.1  christos     };
     26  1.1  christos 
     27  1.1  christos     return bless $self, $class;
     28  1.1  christos }
     29  1.1  christos 
     30  1.1  christos #Read only accessors
     31  1.1  christos sub server
     32  1.1  christos {
     33  1.1  christos     my $self = shift;
     34  1.1  christos     return $self->{server};
     35  1.1  christos }
     36  1.1  christos sub encrypted
     37  1.1  christos {
     38  1.1  christos     my $self = shift;
     39  1.1  christos     return $self->{encrypted};
     40  1.1  christos }
     41  1.1  christos sub level
     42  1.1  christos {
     43  1.1  christos     my $self = shift;
     44  1.1  christos     return $self->{level};
     45  1.1  christos }
     46  1.1  christos sub description
     47  1.1  christos {
     48  1.1  christos     my $self = shift;
     49  1.1  christos     return $self->{description};
     50  1.1  christos }
     51  1.1  christos 1;
     52