Added comments, added subject param to silc_ssh_generate_key.
[crypto.git] / lib / silcssh / silcssh.c
index 0e4f606b05e04a17457701e840a6d2f2a5911c45..818a0fa2893e96302114f3b50ae8bb1d2d9bd10d 100644 (file)
@@ -174,6 +174,7 @@ SilcHashTable silc_ssh_parse_headers(SilcBuffer key)
 
 SilcBool silc_ssh_generate_key(const char *algorithm,
                               int bits_len, SilcRng rng,
+                              const char *subject,
                               SilcPublicKey *ret_public_key,
                               SilcPrivateKey *ret_private_key)
 {
@@ -249,6 +250,9 @@ SilcBool silc_ssh_generate_key(const char *algorithm,
     return FALSE;
   }
 
+  if (subject)
+    silc_ssh_public_key_add_field(pubkey, "Subject", strdup(subject));
+
   return TRUE;
 }