9fd6981
diff --git a/auth2-hostbased.c b/auth2-hostbased.c
9fd6981
index 2ab222ed6..4e9437912 100644
9fd6981
--- a/auth2-hostbased.c
9fd6981
+++ b/auth2-hostbased.c
9fd6981
@@ -118,6 +118,10 @@ userauth_hostbased(struct ssh *ssh, const char *method)
9fd6981
 		    "(null)" : key->cert->signature_type);
9fd6981
 		goto done;
9fd6981
 	}
9fd6981
+	if ((r = sshkey_check_rsa_length(key, options.rsa_min_size)) != 0) {
9fd6981
+		logit("refusing %s key", sshkey_type(key));
9fd6981
+		goto done;
9fd6981
+	}
9fd6981
 
9fd6981
 	if (!authctxt->valid || authctxt->user == NULL) {
9fd6981
 		debug2_f("disabled because of invalid user");
9fd6981
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
9fd6981
index daa756a01..68e7dea1f 100644
9fd6981
--- a/auth2-pubkey.c
9fd6981
+++ b/auth2-pubkey.c
9fd6981
@@ -172,6 +172,10 @@ userauth_pubkey(struct ssh *ssh, const char *method)
9fd6981
 		    "(null)" : key->cert->signature_type);
9fd6981
 		goto done;
9fd6981
 	}
9fd6981
+	if ((r = sshkey_check_rsa_length(key, options.rsa_min_size)) != 0) {
9fd6981
+		logit("refusing %s key", sshkey_type(key));
9fd6981
+		goto done;
9fd6981
+	}
9fd6981
 	key_s = format_key(key);
9fd6981
 	if (sshkey_is_cert(key))
9fd6981
 		ca_s = format_key(key->cert->signature_key);
9fd6981
diff --git a/readconf.c b/readconf.c
9fd6981
index 5b5afa8e3..5e17abd41 100644
9fd6981
--- a/readconf.c
9fd6981
+++ b/readconf.c
9fd6981
@@ -160,7 +160,7 @@ typedef enum {
9fd6981
 	oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys,
9fd6981
 	oFingerprintHash, oUpdateHostkeys, oHostbasedAcceptedAlgorithms,
9fd6981
 	oPubkeyAcceptedAlgorithms, oCASignatureAlgorithms, oProxyJump,
9fd6981
-	oSecurityKeyProvider, oKnownHostsCommand,
9fd6981
+	oSecurityKeyProvider, oKnownHostsCommand, oRSAMinSize,
9fd6981
 	oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported
9fd6981
 } OpCodes;
9fd6981
 
9fd6981
@@ -306,6 +306,7 @@ static struct {
9fd6981
 	{ "proxyjump", oProxyJump },
9fd6981
 	{ "securitykeyprovider", oSecurityKeyProvider },
9fd6981
 	{ "knownhostscommand", oKnownHostsCommand },
9fd6981
+	{ "rsaminsize", oRSAMinSize },
9fd6981
 
9fd6981
 	{ NULL, oBadOption }
9fd6981
 };
9fd6981
@@ -2162,6 +2163,10 @@ process_config_line_depth(Options *options, struct passwd *pw, const char *host,
9fd6981
 			*charptr = xstrdup(arg);
9fd6981
 		break;
9fd6981
 
9fd6981
+	case oRSAMinSize:
9fd6981
+		intptr = &options->rsa_min_size;
9fd6981
+		goto parse_int;
9fd6981
+
9fd6981
 	case oDeprecated:
9fd6981
 		debug("%s line %d: Deprecated option \"%s\"",
9fd6981
 		    filename, linenum, keyword);
9fd6981
@@ -2409,6 +2414,7 @@ initialize_options(Options * options)
9fd6981
 	options->hostbased_accepted_algos = NULL;
9fd6981
 	options->pubkey_accepted_algos = NULL;
9fd6981
 	options->known_hosts_command = NULL;
9fd6981
+	options->rsa_min_size = -1;
9fd6981
 }
9fd6981
 
9fd6981
 /*
9fd6981
@@ -2598,6 +2604,8 @@ fill_default_options(Options * options)
9fd6981
 	if (options->sk_provider == NULL)
9fd6981
 		options->sk_provider = xstrdup("$SSH_SK_PROVIDER");
9fd6981
 #endif
9fd6981
+	if (options->rsa_min_size == -1)
9fd6981
+		options->rsa_min_size = SSH_RSA_MINIMUM_MODULUS_SIZE;
9fd6981
 
9fd6981
 	/* Expand KEX name lists */
9fd6981
 	all_cipher = cipher_alg_list(',', 0);
9fd6981
@@ -3287,6 +3295,7 @@ dump_client_config(Options *o, const char *host)
9fd6981
 	dump_cfg_int(oNumberOfPasswordPrompts, o->number_of_password_prompts);
9fd6981
 	dump_cfg_int(oServerAliveCountMax, o->server_alive_count_max);
9fd6981
 	dump_cfg_int(oServerAliveInterval, o->server_alive_interval);
9fd6981
+	dump_cfg_int(oRSAMinSize, o->rsa_min_size);
9fd6981
 
9fd6981
 	/* String options */
9fd6981
 	dump_cfg_string(oBindAddress, o->bind_address);
9fd6981
diff --git a/readconf.h b/readconf.h
9fd6981
index f647bd42a..29db353ab 100644
9fd6981
--- a/readconf.h
9fd6981
+++ b/readconf.h
9fd6981
@@ -176,6 +176,8 @@ typedef struct {
9fd6981
 
9fd6981
 	char   *known_hosts_command;
9fd6981
 
9fd6981
+	int	rsa_min_size;	/* minimum size of RSA keys */
9fd6981
+
9fd6981
 	char	*ignored_unknown; /* Pattern list of unknown tokens to ignore */
9fd6981
 }       Options;
9fd6981
 
9fd6981
diff --git a/servconf.c b/servconf.c
9fd6981
index f7317a5cb..362ff5b67 100644
9fd6981
--- a/servconf.c
9fd6981
+++ b/servconf.c
9fd6981
@@ -177,6 +177,7 @@ initialize_server_options(ServerOptions *options)
9fd6981
 	options->fingerprint_hash = -1;
9fd6981
 	options->disable_forwarding = -1;
9fd6981
 	options->expose_userauth_info = -1;
9fd6981
+	options->rsa_min_size = -1;
9fd6981
 }
9fd6981
 
9fd6981
 /* Returns 1 if a string option is unset or set to "none" or 0 otherwise. */
9fd6981
@@ -416,6 +417,8 @@ fill_default_server_options(ServerOptions *options)
9fd6981
 		options->expose_userauth_info = 0;
9fd6981
 	if (options->sk_provider == NULL)
9fd6981
 		options->sk_provider = xstrdup("internal");
9fd6981
+	if (options->rsa_min_size == -1)
9fd6981
+		options->rsa_min_size = SSH_RSA_MINIMUM_MODULUS_SIZE;
9fd6981
 
9fd6981
 	assemble_algorithms(options);
9fd6981
 
9fd6981
@@ -489,6 +492,7 @@ typedef enum {
9fd6981
 	sStreamLocalBindMask, sStreamLocalBindUnlink,
9fd6981
 	sAllowStreamLocalForwarding, sFingerprintHash, sDisableForwarding,
9fd6981
 	sExposeAuthInfo, sRDomain, sPubkeyAuthOptions, sSecurityKeyProvider,
9fd6981
+	sRSAMinSize,
9fd6981
 	sDeprecated, sIgnore, sUnsupported
9fd6981
 } ServerOpCodes;
9fd6981
 
9fd6981
@@ -632,6 +636,7 @@ static struct {
9fd6981
 	{ "rdomain", sRDomain, SSHCFG_ALL },
9fd6981
 	{ "casignaturealgorithms", sCASignatureAlgorithms, SSHCFG_ALL },
9fd6981
 	{ "securitykeyprovider", sSecurityKeyProvider, SSHCFG_GLOBAL },
9fd6981
+	{ "rsaminsize", sRSAMinSize, SSHCFG_ALL },
9fd6981
 	{ NULL, sBadOption, 0 }
9fd6981
 };
9fd6981
 
9fd6981
@@ -2377,6 +2382,10 @@ process_server_config_line_depth(ServerOptions *options, char *line,
9fd6981
 			*charptr = xstrdup(arg);
9fd6981
 		break;
9fd6981
 
9fd6981
+	case sRSAMinSize:
9fd6981
+		intptr = &options->rsa_min_size;
9fd6981
+		goto parse_int;
9fd6981
+
9fd6981
 	case sDeprecated:
9fd6981
 	case sIgnore:
9fd6981
 	case sUnsupported:
9fd6981
@@ -2549,6 +2558,7 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
9fd6981
 	M_CP_INTOPT(rekey_limit);
9fd6981
 	M_CP_INTOPT(rekey_interval);
9fd6981
 	M_CP_INTOPT(log_level);
9fd6981
+	M_CP_INTOPT(rsa_min_size);
9fd6981
 
9fd6981
 	/*
9fd6981
 	 * The bind_mask is a mode_t that may be unsigned, so we can't use
9fd6981
@@ -2810,6 +2820,7 @@ dump_config(ServerOptions *o)
9fd6981
 	dump_cfg_int(sMaxSessions, o->max_sessions);
9fd6981
 	dump_cfg_int(sClientAliveInterval, o->client_alive_interval);
9fd6981
 	dump_cfg_int(sClientAliveCountMax, o->client_alive_count_max);
9fd6981
+	dump_cfg_int(sRSAMinSize, o->rsa_min_size);
9fd6981
 	dump_cfg_oct(sStreamLocalBindMask, o->fwd_opts.streamlocal_bind_mask);
9fd6981
 
9fd6981
 	/* formatted integer arguments */
9fd6981
diff --git a/servconf.h b/servconf.h
9fd6981
index 115db1e79..2e3486906 100644
9fd6981
--- a/servconf.h
9fd6981
+++ b/servconf.h
9fd6981
@@ -227,6 +227,7 @@ typedef struct {
9fd6981
 	int	expose_userauth_info;
9fd6981
 	u_int64_t timing_secret;
9fd6981
 	char   *sk_provider;
9fd6981
+	int	rsa_min_size;	/* minimum size of RSA keys */
9fd6981
 }       ServerOptions;
9fd6981
 
9fd6981
 /* Information about the incoming connection as used by Match */
9fd6981
diff --git a/ssh.c b/ssh.c
9fd6981
index a926cc007..cd13fb879 100644
9fd6981
--- a/ssh.c
9fd6981
+++ b/ssh.c
9fd6981
@@ -500,14 +500,22 @@ resolve_canonicalize(char **hostp, int port)
9fd6981
 }
9fd6981
 
9fd6981
 /*
9fd6981
- * Check the result of hostkey loading, ignoring some errors and
9fd6981
- * fatal()ing for others.
9fd6981
+ * Check the result of hostkey loading, ignoring some errors and either
9fd6981
+ * discarding the key or fatal()ing for others.
9fd6981
  */
9fd6981
 static void
9fd6981
-check_load(int r, const char *path, const char *message)
9fd6981
+check_load(int r, struct sshkey **k, const char *path, const char *message)
9fd6981
 {
9fd6981
 	switch (r) {
9fd6981
 	case 0:
9fd6981
+		/* Check RSA keys size and discard if undersized */
9fd6981
+		if (k != NULL && *k != NULL &&
9fd6981
+		    (r = sshkey_check_rsa_length(*k,
9fd6981
+		    options.rsa_min_size)) != 0) {
9fd6981
+			error_r(r, "load %s \"%s\"", message, path);
9fd6981
+			free(*k);
9fd6981
+			*k = NULL;
9fd6981
+		}
9fd6981
 		break;
9fd6981
 	case SSH_ERR_INTERNAL_ERROR:
9fd6981
 	case SSH_ERR_ALLOC_FAIL:
9fd6981
@@ -1557,12 +1565,13 @@ main(int ac, char **av)
9fd6981
 	if ((o) >= sensitive_data.nkeys) \
9fd6981
 		fatal_f("pubkey out of array bounds"); \
9fd6981
 	check_load(sshkey_load_public(p, &(sensitive_data.keys[o]), NULL), \
9fd6981
-	    p, "pubkey"); \
9fd6981
+	    &(sensitive_data.keys[o]), p, "pubkey"); \
9fd6981
 } while (0)
9fd6981
 #define L_CERT(p,o) do { \
9fd6981
 	if ((o) >= sensitive_data.nkeys) \
9fd6981
 		fatal_f("cert out of array bounds"); \
9fd6981
-	check_load(sshkey_load_cert(p, &(sensitive_data.keys[o])), p, "cert"); \
9fd6981
+	check_load(sshkey_load_cert(p, &(sensitive_data.keys[o])), \
9fd6981
+	    &(sensitive_data.keys[o]), p, "cert"); \
9fd6981
 } while (0)
9fd6981
 
9fd6981
 		if (options.hostbased_authentication == 1) {
9fd6981
@@ -2244,7 +2253,7 @@ load_public_identity_files(const struct ssh_conn_info *cinfo)
9fd6981
 		filename = default_client_percent_dollar_expand(cp, cinfo);
9fd6981
 		free(cp);
9fd6981
 		check_load(sshkey_load_public(filename, &public, NULL),
9fd6981
-		    filename, "pubkey");
9fd6981
+		    &public, filename, "pubkey");
9fd6981
 		debug("identity file %s type %d", filename,
9fd6981
 		    public ? public->type : -1);
9fd6981
 		free(options.identity_files[i]);
9fd6981
@@ -2263,7 +2272,7 @@ load_public_identity_files(const struct ssh_conn_info *cinfo)
9fd6981
 			continue;
9fd6981
 		xasprintf(&cp, "%s-cert", filename);
9fd6981
 		check_load(sshkey_load_public(cp, &public, NULL),
9fd6981
-		    filename, "pubkey");
9fd6981
+		    &public, filename, "pubkey");
9fd6981
 		debug("identity file %s type %d", cp,
9fd6981
 		    public ? public->type : -1);
9fd6981
 		if (public == NULL) {
9fd6981
@@ -2294,7 +2303,7 @@ load_public_identity_files(const struct ssh_conn_info *cinfo)
9fd6981
 		free(cp);
9fd6981
 
9fd6981
 		check_load(sshkey_load_public(filename, &public, NULL),
9fd6981
-		    filename, "certificate");
9fd6981
+		    &public, filename, "certificate");
9fd6981
 		debug("certificate file %s type %d", filename,
9fd6981
 		    public ? public->type : -1);
9fd6981
 		free(options.certificate_files[i]);
9fd6981
diff --git a/sshconnect2.c b/sshconnect2.c
9fd6981
index 67f8e0309..d050c1656 100644
9fd6981
--- a/sshconnect2.c
9fd6981
+++ b/sshconnect2.c
9fd6981
@@ -91,6 +91,10 @@ static const struct ssh_conn_info *xxx_conn_info;
9fd6981
 static int
9fd6981
 verify_host_key_callback(struct sshkey *hostkey, struct ssh *ssh)
9fd6981
 {
9fd6981
+	int r;
9fd6981
+
9fd6981
+	if ((r = sshkey_check_rsa_length(hostkey, options.rsa_min_size)) != 0)
9fd6981
+		fatal_r(r, "Bad server host key");
9fd6981
 	if (verify_host_key(xxx_host, xxx_hostaddr, hostkey,
9fd6981
 	    xxx_conn_info) == -1)
9fd6981
 		fatal("Host key verification failed.");
9fd6981
@@ -1747,6 +1751,12 @@ pubkey_prepare(struct ssh *ssh, Authctxt *authctxt)
9fd6981
		close(agent_fd);
9fd6981
	} else {
9fd6981
 		for (j = 0; j < idlist->nkeys; j++) {
9fd6981
+			if ((r = sshkey_check_rsa_length(idlist->keys[j],
9fd6981
+			    options.rsa_min_size)) != 0) {
9fd6981
+				debug_fr(r, "ignoring %s agent key",
9fd6981
+				    sshkey_ssh_name(idlist->keys[j]));
9fd6981
+				continue;
9fd6981
+			}
9fd6981
 			found = 0;
9fd6981
 			TAILQ_FOREACH(id, &files, next) {
9fd6981
 				/*
9fd6981
diff --git a/sshd.c b/sshd.c
9fd6981
index d26eb86ae..5f36905a1 100644
9fd6981
--- a/sshd.c
9fd6981
+++ b/sshd.c
9fd6981
@@ -1746,6 +1746,13 @@ main(int ac, char **av)
9fd6981
 				fatal_r(r, "Could not demote key: \"%s\"",
9fd6981
 				    options.host_key_files[i]);
9fd6981
 		}
9fd6981
+		if (pubkey != NULL && (r = sshkey_check_rsa_length(pubkey,
9fd6981
+		    options.rsa_min_size)) != 0) {
9fd6981
+			error_fr(r, "Host key %s", options.host_key_files[i]);
9fd6981
+			sshkey_free(pubkey);
9fd6981
+			sshkey_free(key);
9fd6981
+			continue;
9fd6981
+		}
9fd6981
 		sensitive_data.host_keys[i] = key;
9fd6981
 		sensitive_data.host_pubkeys[i] = pubkey;
9fd6981
 
9fd6981
diff --git a/sshkey.c b/sshkey.c
9fd6981
index 47864e6d8..8bad6bd99 100644
9fd6981
--- a/sshkey.c
9fd6981
+++ b/sshkey.c
9fd6981
@@ -2319,18 +2319,24 @@ cert_parse(struct sshbuf *b, struct sshkey *key, struct sshbuf *certbuf)
9fd6981
 	return ret;
9fd6981
 }
9fd6981
 
9fd6981
-#ifdef WITH_OPENSSL
9fd6981
-static int
9fd6981
-check_rsa_length(const RSA *rsa)
9fd6981
+int
9fd6981
+sshkey_check_rsa_length(const struct sshkey *k, int min_size)
9fd6981
 {
9fd6981
+#ifdef WITH_OPENSSL
9fd6981
 	const BIGNUM *rsa_n;
9fd6981
+	int nbits;
9fd6981
 
9fd6981
-	RSA_get0_key(rsa, &rsa_n, NULL, NULL);
9fd6981
-	if (BN_num_bits(rsa_n) < SSH_RSA_MINIMUM_MODULUS_SIZE)
9fd6981
+	if (k == NULL || k->rsa == NULL ||
9fd6981
+	    (k->type != KEY_RSA && k->type != KEY_RSA_CERT))
9fd6981
+		return 0;
9fd6981
+	RSA_get0_key(k->rsa, &rsa_n, NULL, NULL);
9fd6981
+	nbits = BN_num_bits(rsa_n);
9fd6981
+	if (nbits < SSH_RSA_MINIMUM_MODULUS_SIZE ||
9fd6981
+	    (min_size > 0 && nbits < min_size))
9fd6981
 		return SSH_ERR_KEY_LENGTH;
9fd6981
+#endif /* WITH_OPENSSL */
9fd6981
 	return 0;
9fd6981
 }
9fd6981
-#endif
9fd6981
 
9fd6981
 static int
9fd6981
 sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
9fd6981
@@ -2391,7 +2397,7 @@ sshkey_from_blob_internal(struct sshbuf *b, struct sshkey **keyp,
9fd6981
 			goto out;
9fd6981
 		}
9fd6981
 		rsa_n = rsa_e = NULL; /* transferred */
9fd6981
-		if ((ret = check_rsa_length(key->rsa)) != 0)
9fd6981
+		if ((ret = sshkey_check_rsa_length(key, 0)) != 0)
9fd6981
 			goto out;
9fd6981
 #ifdef DEBUG_PK
9fd6981
 		RSA_print_fp(stderr, key->rsa, 8);
9fd6981
@@ -3580,7 +3586,7 @@ sshkey_private_deserialize(struct sshbuf *buf, struct sshkey **kp)
9fd6981
 			goto out;
9fd6981
 		}
9fd6981
 		rsa_p = rsa_q = NULL; /* transferred */
9fd6981
-		if ((r = check_rsa_length(k->rsa)) != 0)
9fd6981
+		if ((r = sshkey_check_rsa_length(k, 0)) != 0)
9fd6981
 			goto out;
9fd6981
 		if ((r = ssh_rsa_complete_crt_parameters(k, rsa_iqmp)) != 0)
9fd6981
 			goto out;
9fd6981
@@ -4566,7 +4572,7 @@ sshkey_parse_private_pem_fileblob(struct sshbuf *blob, int type,
9fd6981
 			r = SSH_ERR_LIBCRYPTO_ERROR;
9fd6981
 			goto out;
9fd6981
 		}
9fd6981
-		if ((r = check_rsa_length(prv->rsa)) != 0)
9fd6981
+		if ((r = sshkey_check_rsa_length(prv, 0)) != 0)
9fd6981
 			goto out;
9fd6981
 	} else if (EVP_PKEY_base_id(pk) == EVP_PKEY_DSA &&
9fd6981
 	    (type == KEY_UNSPEC || type == KEY_DSA)) {
9fd6981
diff --git a/sshkey.h b/sshkey.h
9fd6981
index 125cadb64..52e879456 100644
9fd6981
--- a/sshkey.h
9fd6981
+++ b/sshkey.h
9fd6981
@@ -267,6 +267,7 @@ int	sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type,
9fd6981
 int	sshkey_parse_pubkey_from_private_fileblob_type(struct sshbuf *blob,
9fd6981
     int type, struct sshkey **pubkeyp);
9fd6981
 
9fd6981
+int sshkey_check_rsa_length(const struct sshkey *, int);
9fd6981
 /* XXX should be internal, but used by ssh-keygen */
9fd6981
 int ssh_rsa_complete_crt_parameters(struct sshkey *, const BIGNUM *);
9fd6981
 
9fd6981
diff --git a/ssh.1 b/ssh.1
9fd6981
index b4956aec..b1a40ebd 100644
9fd6981
--- a/ssh.1
9fd6981
+++ b/ssh.1
9fd6981
@@ -554,6 +554,7 @@ For full details of the options listed below, and their possible values, see
9fd6981
 .It LogLevel
9fd6981
 .It MACs
9fd6981
 .It Match
9fd6981
+.It RSAMinSize
9fd6981
 .It NoHostAuthenticationForLocalhost
9fd6981
 .It NumberOfPasswordPrompts
9fd6981
 .It PasswordAuthentication
9fd6981
diff --git a/ssh_config.5 b/ssh_config.5
9fd6981
index 24a46460..68771e4b 100644
9fd6981
--- a/ssh_config.5
9fd6981
+++ b/ssh_config.5
9fd6981
@@ -1322,6 +1322,10 @@ The argument to this keyword must be
9fd6981
 or
9fd6981
 .Cm no
9fd6981
 (the default).
9fd6981
+.It Cm RSAMinSize
9fd6981
+Provides a minimal bits requirement for RSA keys when used for signature and
9fd6981
+verification but not for the key generation. The default value is 1024 and
9fd6981
+can't be reduced.
9fd6981
 .It Cm NumberOfPasswordPrompts
9fd6981
 Specifies the number of password prompts before giving up.
9fd6981
 The argument to this keyword must be an integer.
9fd6981
diff --git a/sshd_config.5 b/sshd_config.5
9fd6981
index 867a747d..e08811ca 100644
9fd6981
--- a/sshd_config.5
9fd6981
+++ b/sshd_config.5
9fd6981
@@ -1266,6 +1266,10 @@ will refuse connection attempts with a probability of rate/100 (30%)
9fd6981
 if there are currently start (10) unauthenticated connections.
9fd6981
 The probability increases linearly and all connection attempts
9fd6981
 are refused if the number of unauthenticated connections reaches full (60).
9fd6981
+.It Cm RSAMinSize
9fd6981
+Provides a minimal bits requirement for RSA keys when used for signature and
9fd6981
+verification but not for the key generation. The default value is 1024 and
9fd6981
+can't be reduced.
9fd6981
 .It Cm ModuliFile
9fd6981
 Specifies the
9fd6981
 .Xr moduli 5
9fd6981
diff --git a/sshkey.h b/sshkey.h
9fd6981
index 094815e0..2bb8cb90 100644
9fd6981
--- a/sshkey.h
9fd6981
+++ b/sshkey.h
9fd6981
@@ -286,6 +286,8 @@ int	 sshkey_private_serialize_maxsign(struct sshkey *key,
9fd6981
 
9fd6981
 void	 sshkey_sig_details_free(struct sshkey_sig_details *);
9fd6981
 
9fd6981
+int ssh_set_rsa_min_bits(int minbits);
9fd6981
+
9fd6981
 #ifdef SSHKEY_INTERNAL
9fd6981
 int ssh_rsa_sign(const struct sshkey *key,
9fd6981
     u_char **sigp, size_t *lenp, const u_char *data, size_t datalen,