Print this page
4853 illumos-gate is not lint-clean when built with openssl 1.0 (fix openssl 0.9.8 lint)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/p12split.c
          +++ new/usr/src/cmd/cmd-inet/usr.lib/wanboot/p12split/p12split.c
↓ open down ↓ 252 lines elided ↑ open up ↑
 253  253  
 254  254                          (void) sunw_print_times(stdout, PRNT_BOTH, NULL,
 255  255                              xcert_in);
 256  256                  }
 257  257  
 258  258                  if (ta_in != NULL) {
 259  259                          X509 *x;
 260  260                          int i;
 261  261  
 262  262                          for (i = 0; i < sk_X509_num(ta_in); i++) {
      263 +                                /* LINTED */
 263  264                                  x = sk_X509_value(ta_in, i);
 264  265                                  (void) printf(
 265  266                                      gettext("\nTrust Anchor cert %d:\n"), i);
 266  267  
 267  268                                  /*
 268  269                                   * sunw_subject_attrs() returns a pointer to
 269  270                                   * memory allocated on our behalf. We get the
 270  271                                   * same behavior from sunw_issuer_attrs().
 271  272                                   */
 272  273                                  bufp = sunw_subject_attrs(x, NULL, 0);
↓ open down ↓ 93 lines elided ↑ open up ↑
 366  367                          (void) fprintf(stderr, gettext("  Removing cert\n"));
 367  368                          X509_free(*c_in);
 368  369                          *c_in = NULL;
 369  370                  }
 370  371          }
 371  372  
 372  373          if (ta_in == NULL)
 373  374                  return;
 374  375  
 375  376          for (i = 0; i < sk_X509_num(ta_in); ) {
      377 +                /* LINTED */
 376  378                  curr = sk_X509_value(ta_in, i);
 377  379                  ret = time_check_print(curr);
 378  380                  if ((ret != CHK_TIME_OK && ret != CHK_TIME_IS_BEFORE) &&
 379  381                      del_expired) {
 380  382                          (void) fprintf(stderr, gettext("  Removing cert\n"));
      383 +                        /* LINTED */
 381  384                          curr = sk_X509_delete(ta_in, i);
 382  385                          X509_free(curr);
 383  386                          continue;
 384  387                  }
 385  388                  i++;
 386  389          }
 387  390  }
 388  391  
 389  392  static time_errs_t
 390  393  time_check_print(X509 *cert)
↓ open down ↓ 183 lines elided ↑ open up ↑
 574  577          (void) fclose(fp);
 575  578          if (p12 != NULL)
 576  579                  PKCS12_free(p12);
 577  580          /*
 578  581           * Put the cert and pkey off of the stack so that they won't
 579  582           * be freed two times.  (If they get left in the stack then
 580  583           * they will be freed with the stack.)
 581  584           */
 582  585          if (clist != NULL) {
 583  586                  if (cert != NULL && sk_X509_num(clist) == 1) {
      587 +                        /* LINTED */
 584  588                          (void) sk_X509_delete(clist, 0);
 585  589                  }
 586  590                  sk_X509_pop_free(clist, X509_free);
 587  591          }
 588  592          if (klist != NULL) {
 589  593                  if (pkey != NULL && sk_EVP_PKEY_num(klist) == 1) {
      594 +                        /* LINTED */
 590  595                          (void) sk_EVP_PKEY_delete(klist, 0);
 591  596                  }
 592  597                  sk_EVP_PKEY_pop_free(klist, sunw_evp_pkey_free);
 593  598          }
 594  599  
 595  600          return (ret);
 596  601  }
 597  602  
 598  603  static void
 599  604  usage(void)
↓ open down ↓ 51 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX