Both UN and HN must be present in SILC public key.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 08:51:43 +0000 (08:51 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 08:51:43 +0000 (08:51 +0000)
lib/silccrypt/silcpk.c

index 9b11852de30515006ce90cb5804c933e8f5eef5c..e4a000788c79f71fdae9da4e7516470d498d612f 100644 (file)
@@ -124,7 +124,7 @@ SilcBool silc_pkcs_silc_decode_identifier(const char *identifier,
   int len;
 
   /* Protocol says that at least UN and HN must be provided as identifier */
-  if (!strstr(identifier, "UN=") && !strstr(identifier, "HN=")) {
+  if (!strstr(identifier, "UN=") || !strstr(identifier, "HN=")) {
     SILC_LOG_DEBUG(("The public does not have the required UN= and HN= "
                    "identifiers"));
     return FALSE;