1*b0d17251Schristos# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. 213d40330Schristos# 3*b0d17251Schristos# Licensed under the Apache License 2.0 (the "License"). You may not use 413d40330Schristos# this file except in compliance with the License. You can obtain a copy 513d40330Schristos# in the file LICENSE in the source distribution or at 613d40330Schristos# https://www.openssl.org/source/license.html 713d40330Schristos 813d40330Schristosuse strict; 913d40330Schristos 1013d40330Schristospackage TLSProxy::Alert; 1113d40330Schristos 1213d40330Schristossub new 1313d40330Schristos{ 1413d40330Schristos my $class = shift; 1513d40330Schristos my ($server, 1613d40330Schristos $encrypted, 1713d40330Schristos $level, 1813d40330Schristos $description) = @_; 1913d40330Schristos 2013d40330Schristos my $self = { 2113d40330Schristos server => $server, 2213d40330Schristos encrypted => $encrypted, 2313d40330Schristos level => $level, 2413d40330Schristos description => $description 2513d40330Schristos }; 2613d40330Schristos 2713d40330Schristos return bless $self, $class; 2813d40330Schristos} 2913d40330Schristos 3013d40330Schristos#Read only accessors 3113d40330Schristossub server 3213d40330Schristos{ 3313d40330Schristos my $self = shift; 3413d40330Schristos return $self->{server}; 3513d40330Schristos} 3613d40330Schristossub encrypted 3713d40330Schristos{ 3813d40330Schristos my $self = shift; 3913d40330Schristos return $self->{encrypted}; 4013d40330Schristos} 4113d40330Schristossub level 4213d40330Schristos{ 4313d40330Schristos my $self = shift; 4413d40330Schristos return $self->{level}; 4513d40330Schristos} 4613d40330Schristossub description 4713d40330Schristos{ 4813d40330Schristos my $self = shift; 4913d40330Schristos return $self->{description}; 5013d40330Schristos} 5113d40330Schristos1; 52