Alert.pm 952 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. use strict;
  8. package TLSProxy::Alert;
  9. sub new
  10. {
  11. my $class = shift;
  12. my ($server,
  13. $encrypted,
  14. $level,
  15. $description) = @_;
  16. my $self = {
  17. server => $server,
  18. encrypted => $encrypted,
  19. level => $level,
  20. description => $description
  21. };
  22. return bless $self, $class;
  23. }
  24. #Read only accessors
  25. sub server
  26. {
  27. my $self = shift;
  28. return $self->{server};
  29. }
  30. sub encrypted
  31. {
  32. my $self = shift;
  33. return $self->{encrypted};
  34. }
  35. sub level
  36. {
  37. my $self = shift;
  38. return $self->{level};
  39. }
  40. sub description
  41. {
  42. my $self = shift;
  43. return $self->{description};
  44. }
  45. 1;