Print this page
fixup .text where possible
additional style updates in crypto
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/crypto/io/arcfour.c
          +++ new/usr/src/uts/common/crypto/io/arcfour.c
↓ open down ↓ 42 lines elided ↑ open up ↑
  43   43  /*
  44   44   * Module linkage information for the kernel.
  45   45   */
  46   46  static struct modlcrypto modlcrypto = {
  47   47          &mod_cryptoops,
  48   48          "RC4 Kernel SW Provider"
  49   49  };
  50   50  
  51   51  static struct modlinkage modlinkage = {
  52   52          MODREV_1,
  53      -        (void *)&modlcrypto,
  54      -        NULL
       53 +        {   (void *)&modlcrypto,
       54 +            NULL }
  55   55  };
  56   56  
  57   57  /*
  58   58   * CSPI information (entry points, provider info, etc.)
  59   59   */
  60   60  
  61   61  #define RC4_MECH_INFO_TYPE      0
  62   62  /*
  63   63   * Mechanism info structure passed to KCF during registration.
  64   64   */
↓ open down ↓ 42 lines elided ↑ open up ↑
 107  107  };
 108  108  
 109  109  static int rc4_free_context(crypto_ctx_t *);
 110  110  
 111  111  static crypto_ctx_ops_t rc4_ctx_ops = {
 112  112          NULL,
 113  113          rc4_free_context
 114  114  };
 115  115  
 116  116  static crypto_ops_t rc4_crypto_ops = {
 117      -        &rc4_control_ops,
 118      -        NULL,
 119      -        &rc4_cipher_ops,
 120      -        NULL,
 121      -        NULL,
 122      -        NULL,
 123      -        NULL,
 124      -        NULL,
 125      -        NULL,
 126      -        NULL,
 127      -        NULL,
 128      -        NULL,
 129      -        NULL,
 130      -        &rc4_ctx_ops
      117 +        .co_control_ops = &rc4_control_ops,
      118 +        .co_digest_ops = NULL,
      119 +        .co_cipher_ops = &rc4_cipher_ops,
      120 +        .co_mac_ops = NULL,
      121 +        .co_sign_ops = NULL,
      122 +        .co_verify_ops = NULL,
      123 +        .co_dual_ops = NULL,
      124 +        .co_dual_cipher_mac_ops = NULL,
      125 +        .co_random_ops = NULL,
      126 +        .co_session_ops = NULL,
      127 +        .co_object_ops = NULL,
      128 +        .co_key_ops = NULL,
      129 +        .co_provider_ops = NULL,
      130 +        .co_ctx_ops = &rc4_ctx_ops
 131  131  };
 132  132  
 133      -static crypto_provider_info_t rc4_prov_info = {
      133 +static crypto_provider_info_t rc4_prov_info = {{{{
 134  134          CRYPTO_SPI_VERSION_1,
 135  135          "RC4 Software Provider",
 136  136          CRYPTO_SW_PROVIDER,
 137  137          {&modlinkage},
 138  138          NULL,
 139  139          &rc4_crypto_ops,
 140  140          sizeof (rc4_mech_info_tab)/sizeof (crypto_mech_info_t),
 141  141          rc4_mech_info_tab
 142      -};
      142 +}}}};
 143  143  
 144  144  static crypto_kcf_provider_handle_t rc4_prov_handle = NULL;
 145  145  
 146  146  static mblk_t *advance_position(mblk_t *, off_t, uchar_t **);
 147  147  static int crypto_arcfour_crypt(ARCFour_key *, uchar_t *, crypto_data_t *,
 148  148      int);
 149  149  
 150  150  int
 151  151  _init(void)
 152  152  {
↓ open down ↓ 508 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX