Fix typo.
[libradsec.git] / dtls.c
diff --git a/dtls.c b/dtls.c
index 959f73f..0965ea8 100644 (file)
--- a/dtls.c
+++ b/dtls.c
@@ -1,6 +1,5 @@
-/* Copyright (c) 2006-2010, UNINETT AS.
- * Copyright (c) 2010, UNINETT AS, NORDUnet A/S.
- * Copyright (c) 2010-2012, NORDUnet A/S. */
+/* Copyright (c) 2007-2009, UNINETT AS
+ * Copyright (c) 2012, NORDUnet A/S */
 /* See LICENSE for licensing information. */
 
 #include <signal.h>
@@ -351,6 +350,7 @@ void *dtlsservernew(void *arg) {
     X509 *cert = NULL;
     SSL_CTX *ctx = NULL;
     uint8_t delay = 60;
+    struct tls *accepted_tls = NULL;
 
     debug(DBG_DBG, "dtlsservernew: starting");
     conf = find_clconf(handle, (struct sockaddr *)&params->addr, NULL);
@@ -364,10 +364,11 @@ void *dtlsservernew(void *arg) {
        cert = verifytlscert(ssl);
         if (!cert)
             goto exit;
+        accepted_tls = conf->tlsconf;
     }
 
     while (conf) {
-       if (verifyconfcert(cert, conf)) {
+       if (accepted_tls == conf->tlsconf && verifyconfcert(cert, conf)) {
            X509_free(cert);
            client = addclient(conf, 1);
            if (client) {