xref: /freebsd/crypto/openssl/util/perl/TLSProxy/Alert.pm (revision db33c6f3ae9d1231087710068ee4ea5398aacca7)
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
8use strict;
9
10package TLSProxy::Alert;
11
12sub 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
31sub server
32{
33    my $self = shift;
34    return $self->{server};
35}
36sub encrypted
37{
38    my $self = shift;
39    return $self->{encrypted};
40}
41sub level
42{
43    my $self = shift;
44    return $self->{level};
45}
46sub description
47{
48    my $self = shift;
49    return $self->{description};
50}
511;
52