[BACK]Return to sshkey.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sshkey.c between version 1.141 and 1.142

version 1.141, 2023/12/20 00:06:25 version 1.142, 2024/01/11 01:45:36
Line 108 
Line 108 
 extern const struct sshkey_impl sshkey_rsa_sha256_cert_impl;  extern const struct sshkey_impl sshkey_rsa_sha256_cert_impl;
 extern const struct sshkey_impl sshkey_rsa_sha512_impl;  extern const struct sshkey_impl sshkey_rsa_sha512_impl;
 extern const struct sshkey_impl sshkey_rsa_sha512_cert_impl;  extern const struct sshkey_impl sshkey_rsa_sha512_cert_impl;
   # ifdef WITH_DSA
 extern const struct sshkey_impl sshkey_dss_impl;  extern const struct sshkey_impl sshkey_dss_impl;
 extern const struct sshkey_impl sshkey_dsa_cert_impl;  extern const struct sshkey_impl sshkey_dsa_cert_impl;
   # endif
 #endif /* WITH_OPENSSL */  #endif /* WITH_OPENSSL */
 #ifdef WITH_XMSS  #ifdef WITH_XMSS
 extern const struct sshkey_impl sshkey_xmss_impl;  extern const struct sshkey_impl sshkey_xmss_impl;
Line 131 
Line 133 
         &sshkey_ecdsa_sk_impl,          &sshkey_ecdsa_sk_impl,
         &sshkey_ecdsa_sk_cert_impl,          &sshkey_ecdsa_sk_cert_impl,
         &sshkey_ecdsa_sk_webauthn_impl,          &sshkey_ecdsa_sk_webauthn_impl,
   # ifdef WITH_DSA
         &sshkey_dss_impl,          &sshkey_dss_impl,
         &sshkey_dsa_cert_impl,          &sshkey_dsa_cert_impl,
   # endif
         &sshkey_rsa_impl,          &sshkey_rsa_impl,
         &sshkey_rsa_cert_impl,          &sshkey_rsa_cert_impl,
         &sshkey_rsa_sha256_impl,          &sshkey_rsa_sha256_impl,
Line 3197 
Line 3201 
                 goto out;                  goto out;
   
         switch (key->type) {          switch (key->type) {
   #ifdef WITH_DSA
         case KEY_DSA:          case KEY_DSA:
                 if (format == SSHKEY_PRIVATE_PEM) {                  if (format == SSHKEY_PRIVATE_PEM) {
                         success = PEM_write_bio_DSAPrivateKey(bio, key->dsa,                          success = PEM_write_bio_DSAPrivateKey(bio, key->dsa,
Line 3205 
Line 3210 
                         success = EVP_PKEY_set1_DSA(pkey, key->dsa);                          success = EVP_PKEY_set1_DSA(pkey, key->dsa);
                 }                  }
                 break;                  break;
   #endif
         case KEY_ECDSA:          case KEY_ECDSA:
                 if (format == SSHKEY_PRIVATE_PEM) {                  if (format == SSHKEY_PRIVATE_PEM) {
                         success = PEM_write_bio_ECPrivateKey(bio, key->ecdsa,                          success = PEM_write_bio_ECPrivateKey(bio, key->ecdsa,
Line 3411 
Line 3417 
                 }                  }
                 if ((r = sshkey_check_rsa_length(prv, 0)) != 0)                  if ((r = sshkey_check_rsa_length(prv, 0)) != 0)
                         goto out;                          goto out;
   #ifdef WITH_DSA
         } else if (EVP_PKEY_base_id(pk) == EVP_PKEY_DSA &&          } else if (EVP_PKEY_base_id(pk) == EVP_PKEY_DSA &&
             (type == KEY_UNSPEC || type == KEY_DSA)) {              (type == KEY_UNSPEC || type == KEY_DSA)) {
                 if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) {                  if ((prv = sshkey_new(KEY_UNSPEC)) == NULL) {
Line 3421 
Line 3428 
                 prv->type = KEY_DSA;                  prv->type = KEY_DSA;
 #ifdef DEBUG_PK  #ifdef DEBUG_PK
                 DSA_print_fp(stderr, prv->dsa, 8);                  DSA_print_fp(stderr, prv->dsa, 8);
   #endif
 #endif  #endif
         } else if (EVP_PKEY_base_id(pk) == EVP_PKEY_EC &&          } else if (EVP_PKEY_base_id(pk) == EVP_PKEY_EC &&
             (type == KEY_UNSPEC || type == KEY_ECDSA)) {              (type == KEY_UNSPEC || type == KEY_ECDSA)) {

Legend:
Removed from v.1.141  
changed lines
  Added in v.1.142