Adam Tkac | 35e6d4c | 2010-04-23 14:12:18 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2004 Red Hat Inc. |
| 3 | * Copyright (C) 2010 TigerVNC Team |
| 4 | * |
| 5 | * This is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This software is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this software; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
| 18 | * USA. |
| 19 | */ |
| 20 | |
| 21 | #ifdef HAVE_CONFIG_H |
| 22 | #include <config.h> |
| 23 | #endif |
| 24 | |
| 25 | #include <rdr/TLSException.h> |
| 26 | |
| 27 | #include <string.h> |
| 28 | #include <stdio.h> |
| 29 | #ifdef HAVE_GNUTLS |
| 30 | #include <gnutls/gnutls.h> |
| 31 | #endif |
| 32 | |
| 33 | using namespace rdr; |
| 34 | |
| 35 | #ifdef HAVE_GNUTLS |
| 36 | TLSException::TLSException(const char* s, int err_) |
Pierre Ossman | a7bbe9c | 2015-03-03 16:17:51 +0100 | [diff] [blame] | 37 | : Exception("%s: %s (%d)", s, gnutls_strerror(err), err), err(err_) |
Adam Tkac | 35e6d4c | 2010-04-23 14:12:18 +0000 | [diff] [blame] | 38 | { |
Adam Tkac | 35e6d4c | 2010-04-23 14:12:18 +0000 | [diff] [blame] | 39 | } |
| 40 | #endif /* HAVE_GNUTLS */ |
| 41 | |