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

Diff for /src/usr.bin/openssl/x509.c between version 1.26 and 1.27

version 1.26, 2021/11/26 16:23:27 version 1.27, 2021/12/12 20:28:02
Line 1053 
Line 1053 
                                         goto end;                                          goto end;
                                 }                                  }
                                 BIO_printf(STDout, "Modulus=");                                  BIO_printf(STDout, "Modulus=");
                                 if (pkey->type == EVP_PKEY_RSA)                                  if (EVP_PKEY_id(pkey) == EVP_PKEY_RSA) {
                                         BN_print(STDout, pkey->pkey.rsa->n);                                          RSA *rsa = EVP_PKEY_get0_RSA(pkey);
                                 else if (pkey->type == EVP_PKEY_DSA)                                          const BIGNUM *n = NULL;
                                         BN_print(STDout,  
                                             pkey->pkey.dsa->pub_key);                                          RSA_get0_key(rsa, &n, NULL, NULL);
                                 else                                          BN_print(STDout, n);
                                   } else if (EVP_PKEY_id(pkey) == EVP_PKEY_DSA) {
                                           DSA *dsa = EVP_PKEY_get0_DSA(pkey);
                                           const BIGNUM *pub_key = NULL;
   
                                           DSA_get0_key(dsa, &pub_key, NULL);
   
                                           BN_print(STDout, pub_key);
                                   } else
                                         BIO_printf(STDout,                                          BIO_printf(STDout,
                                             "Wrong Algorithm type");                                              "Wrong Algorithm type");
                                 BIO_printf(STDout, "\n");                                  BIO_printf(STDout, "\n");

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27