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