Displaying 6 results from an estimated 6 matches for "sshkey_type_plain".
2024 Nov 23
2
[PATCH] sshsig: check hashalg before selecting the RSA signature algorithm
...t; diff --git a/sshsig.c b/sshsig.c
> index 470b286a3..033b43353 100644
> --- a/sshsig.c
> +++ b/sshsig.c
> @@ -190,8 +190,14 @@ sshsig_wrap_sign(struct sshkey *key, const char *hashalg,
> }
>
> /* If using RSA keys then default to a good signature algorithm */
> - if (sshkey_type_plain(key->type) == KEY_RSA)
> - sign_alg = RSA_SIGN_ALG;
> + if (sshkey_type_plain(key->type) == KEY_RSA){
> + if (hashalg == NULL)
> + sign_alg = RSA_SIGN_ALG;
> + else if (strcmp(hashalg, "sha256") == 0)
> + sign_alg = "rsa-sha2-256";
> + else if...
2024 Apr 11
1
[PATCH] sshsig: check hashalg before selecting the RSA signature algorithm
...changed, 8 insertions(+), 2 deletions(-)
diff --git a/sshsig.c b/sshsig.c
index 470b286a3..033b43353 100644
--- a/sshsig.c
+++ b/sshsig.c
@@ -190,8 +190,14 @@ sshsig_wrap_sign(struct sshkey *key, const char *hashalg,
}
/* If using RSA keys then default to a good signature algorithm */
- if (sshkey_type_plain(key->type) == KEY_RSA)
- sign_alg = RSA_SIGN_ALG;
+ if (sshkey_type_plain(key->type) == KEY_RSA){
+ if (hashalg == NULL)
+ sign_alg = RSA_SIGN_ALG;
+ else if (strcmp(hashalg, "sha256") == 0)
+ sign_alg = "rsa-sha2-256";
+ else if (strcmp(hashalg, "sha512"...
2024 Nov 26
1
[PATCH] sshsig: check hashalg before selecting the RSA signature algorithm
...> index 470b286a3..033b43353 100644
> > --- a/sshsig.c
> > +++ b/sshsig.c
> > @@ -190,8 +190,14 @@ sshsig_wrap_sign(struct sshkey *key, const char *hashalg,
> > }
> >
> > /* If using RSA keys then default to a good signature algorithm */
> > - if (sshkey_type_plain(key->type) == KEY_RSA)
> > - sign_alg = RSA_SIGN_ALG;
> > + if (sshkey_type_plain(key->type) == KEY_RSA){
> > + if (hashalg == NULL)
> > + sign_alg = RSA_SIGN_ALG;
> > + else if (strcmp(hashalg, "sha256") == 0)
> > + sign_alg = "rsa-sh...
2024 Nov 26
1
[PATCH] sshsig: check hashalg before selecting the RSA signature algorithm
...0644
> > > --- a/sshsig.c
> > > +++ b/sshsig.c
> > > @@ -190,8 +190,14 @@ sshsig_wrap_sign(struct sshkey *key, const char *hashalg,
> > > }
> > >
> > > /* If using RSA keys then default to a good signature algorithm */
> > > - if (sshkey_type_plain(key->type) == KEY_RSA)
> > > - sign_alg = RSA_SIGN_ALG;
> > > + if (sshkey_type_plain(key->type) == KEY_RSA){
> > > + if (hashalg == NULL)
> > > + sign_alg = RSA_SIGN_ALG;
> > > + else if (strcmp(hashalg, "sha256") == 0)
> > &g...
2024 Nov 23
1
[PATCH] sshsig: check hashalg before selecting the RSA signature algorithm
...hsig.c
>> index 470b286a3..033b43353 100644
>> --- a/sshsig.c
>> +++ b/sshsig.c
>> @@ -190,8 +190,14 @@ sshsig_wrap_sign(struct sshkey *key, const char *hashalg,
>> }
>>
>> /* If using RSA keys then default to a good signature algorithm */
>> - if (sshkey_type_plain(key->type) == KEY_RSA)
>> - sign_alg = RSA_SIGN_ALG;
>> + if (sshkey_type_plain(key->type) == KEY_RSA){
>> + if (hashalg == NULL)
>> + sign_alg = RSA_SIGN_ALG;
>> + else if (strcmp(hashalg, "sha256") == 0)
>> + sign_alg = "rsa-sha2-256...
2015 Jul 26
2
[PATCH] ssh-agent: Add support to load additional certificates
...EY_get0_private_key(k->ecdsa))
+ return 1;
+ break;
+#endif /* WITH_OPENSSL */
+ case KEY_ED25519:
+ case KEY_ED25519_CERT:
+ if (k->ed25519_sk)
+ return 1;
+ break;
+ case KEY_UNSPEC:
+ break;
+ }
+
+ return 0;
+}
+
/* Return the cert-less equivalent to a certified key type */
int
sshkey_type_plain(int type)
diff -u -r -p openssh-6.9p1/sshkey.h openssh.cert_shadow/sshkey.h
--- openssh-6.9p1/sshkey.h 2015-07-01 04:35:31.000000000 +0200
+++ openssh.cert_shadow/sshkey.h 2015-07-26 11:15:33.344024398 +0200
@@ -135,6 +135,7 @@ int sshkey_generate(int type, u_int bi
int sshkey_from_private(con...