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