Print this page
fixup .text where possible
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/crypto/io/sha2_mod.c
          +++ new/usr/src/uts/common/crypto/io/sha2_mod.c
↓ open down ↓ 47 lines elided ↑ open up ↑
  48   48          &mod_miscops,
  49   49          "SHA2 Message-Digest Algorithm"
  50   50  };
  51   51  
  52   52  static struct modlcrypto modlcrypto = {
  53   53          &mod_cryptoops,
  54   54          "SHA2 Kernel SW Provider"
  55   55  };
  56   56  
  57   57  static struct modlinkage modlinkage = {
  58      -        MODREV_1, &modlmisc, &modlcrypto, NULL
       58 +        MODREV_1, { &modlmisc, &modlcrypto, NULL }
  59   59  };
  60   60  
  61   61  /*
  62   62   * Macros to access the SHA2 or SHA2-HMAC contexts from a context passed
  63   63   * by KCF to one of the entry points.
  64   64   */
  65   65  
  66   66  #define PROV_SHA2_CTX(ctx)      ((sha2_ctx_t *)(ctx)->cc_provider_private)
  67   67  #define PROV_SHA2_HMAC_CTX(ctx) ((sha2_hmac_ctx_t *)(ctx)->cc_provider_private)
  68   68  
↓ open down ↓ 114 lines elided ↑ open up ↑
 183  183      crypto_mechanism_t *, crypto_key_t *, crypto_spi_ctx_template_t *,
 184  184      size_t *, crypto_req_handle_t);
 185  185  static int sha2_free_context(crypto_ctx_t *);
 186  186  
 187  187  static crypto_ctx_ops_t sha2_ctx_ops = {
 188  188          sha2_create_ctx_template,
 189  189          sha2_free_context
 190  190  };
 191  191  
 192  192  static crypto_ops_t sha2_crypto_ops = {
 193      -        &sha2_control_ops,
 194      -        &sha2_digest_ops,
 195      -        NULL,
 196      -        &sha2_mac_ops,
 197      -        NULL,
 198      -        NULL,
 199      -        NULL,
 200      -        NULL,
 201      -        NULL,
 202      -        NULL,
 203      -        NULL,
 204      -        NULL,
 205      -        NULL,
 206      -        &sha2_ctx_ops,
 207      -        NULL,
 208      -        NULL,
 209      -        NULL,
      193 +        .co_control_ops = &sha2_control_ops,
      194 +        .co_digest_ops = &sha2_digest_ops,
      195 +        .co_mac_ops = &sha2_mac_ops,
      196 +        .co_ctx_ops = &sha2_ctx_ops
 210  197  };
 211  198  
 212      -static crypto_provider_info_t sha2_prov_info = {
      199 +static crypto_provider_info_t sha2_prov_info = {{{{
 213  200          CRYPTO_SPI_VERSION_4,
 214  201          "SHA2 Software Provider",
 215  202          CRYPTO_SW_PROVIDER,
 216  203          {&modlinkage},
 217  204          NULL,
 218  205          &sha2_crypto_ops,
 219  206          sizeof (sha2_mech_info_tab)/sizeof (crypto_mech_info_t),
 220  207          sha2_mech_info_tab
 221      -};
      208 +}}}};
 222  209  
 223  210  static crypto_kcf_provider_handle_t sha2_prov_handle = NULL;
 224  211  
 225  212  int
 226  213  _init()
 227  214  {
 228  215          int ret;
 229  216  
 230  217          if ((ret = mod_install(&modlinkage)) != 0)
 231  218                  return (ret);
↓ open down ↓ 1381 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX