Check for invalid public and private keys.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 14 Feb 2001 14:44:13 +0000 (14:44 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 14 Feb 2001 14:44:13 +0000 (14:44 +0000)
lib/silcske/silcske.c

index 952a5bd8380990e59a13408d372bd7ad94e86b10..bc84849fdea90740a5597a0b0029f48380c07492 100644 (file)
@@ -615,6 +615,11 @@ SilcSKEStatus silc_ske_responder_finish(SilcSKE ske,
 
   SILC_LOG_DEBUG(("Start"));
 
+  if (!public_key || !private_key) {
+    status = SILC_SKE_STATUS_ERROR;
+    goto err;
+  }
+
   SILC_LOG_DEBUG(("Computing KEY = e ^ x mod p"));
 
   /* Compute the shared secret key */