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/rsa.c
          +++ new/usr/src/uts/common/crypto/io/rsa.c
↓ open down ↓ 50 lines elided ↑ open up ↑
  51   51  /*
  52   52   * Module linkage information for the kernel.
  53   53   */
  54   54  static struct modlcrypto modlcrypto = {
  55   55          &mod_cryptoops,
  56   56          "RSA Kernel SW Provider"
  57   57  };
  58   58  
  59   59  static struct modlinkage modlinkage = {
  60   60          MODREV_1,
  61      -        (void *)&modlcrypto,
  62      -        NULL
       61 +        {   (void *)&modlcrypto,
       62 +            NULL }
  63   63  };
  64   64  
  65   65  /*
  66   66   * CSPI information (entry points, provider info, etc.)
  67   67   */
  68   68  typedef enum rsa_mech_type {
  69   69          RSA_PKCS_MECH_INFO_TYPE,        /* SUN_CKM_RSA_PKCS */
  70   70          RSA_X_509_MECH_INFO_TYPE,       /* SUN_CKM_RSA_X_509 */
  71   71          MD5_RSA_PKCS_MECH_INFO_TYPE,    /* SUN_MD5_RSA_PKCS */
  72   72          SHA1_RSA_PKCS_MECH_INFO_TYPE,   /* SUN_SHA1_RSA_PKCS */
↓ open down ↓ 194 lines elided ↑ open up ↑
 267  267          rsa_verify_recover_atomic
 268  268  };
 269  269  
 270  270  static int rsa_free_context(crypto_ctx_t *);
 271  271  
 272  272  static crypto_ctx_ops_t rsa_ctx_ops = {
 273  273          NULL,
 274  274          rsa_free_context
 275  275  };
 276  276  
 277      -static crypto_ops_t rsa_crypto_ops = {
 278      -        &rsa_control_ops,
 279      -        NULL,
 280      -        &rsa_cipher_ops,
 281      -        NULL,
 282      -        &rsa_sign_ops,
 283      -        &rsa_verify_ops,
 284      -        NULL,
 285      -        NULL,
 286      -        NULL,
 287      -        NULL,
 288      -        NULL,
 289      -        NULL,
 290      -        NULL,
 291      -        &rsa_ctx_ops,
 292      -        NULL,
 293      -        NULL,
 294      -        NULL,
 295      -};
      277 +static crypto_ops_t rsa_crypto_ops = {{{{{{
      278 +                                &rsa_control_ops,
      279 +                                NULL,
      280 +                                &rsa_cipher_ops,
      281 +                                NULL,
      282 +                                &rsa_sign_ops,
      283 +                                &rsa_verify_ops,
      284 +                                NULL,
      285 +                                NULL,
      286 +                                NULL,
      287 +                                NULL,
      288 +                                NULL,
      289 +                                NULL,
      290 +                                NULL,
      291 +                                &rsa_ctx_ops }, /* cou_v1 */
      292 +                        NULL },                 /* cou_v2 */
      293 +                NULL },                         /* cou_v3 */
      294 +        NULL }                                  /* cou_v4 */
      295 +}};
 296  296  
 297      -static crypto_provider_info_t rsa_prov_info = {
      297 +static crypto_provider_info_t rsa_prov_info = {{{{
 298  298          CRYPTO_SPI_VERSION_4,
 299  299          "RSA Software Provider",
 300  300          CRYPTO_SW_PROVIDER,
 301  301          {&modlinkage},
 302  302          NULL,
 303  303          &rsa_crypto_ops,
 304  304          sizeof (rsa_mech_info_tab)/sizeof (crypto_mech_info_t),
 305  305          rsa_mech_info_tab
 306      -};
      306 +}}}};
 307  307  
 308  308  static int rsa_encrypt_common(rsa_mech_type_t, crypto_key_t *,
 309  309      crypto_data_t *, crypto_data_t *);
 310  310  static int rsa_decrypt_common(rsa_mech_type_t, crypto_key_t *,
 311  311      crypto_data_t *, crypto_data_t *);
 312  312  static int rsa_sign_common(rsa_mech_type_t, crypto_key_t *,
 313  313      crypto_data_t *, crypto_data_t *);
 314  314  static int rsa_verify_common(rsa_mech_type_t, crypto_key_t *,
 315  315      crypto_data_t *, crypto_data_t *);
 316  316  static int compare_data(crypto_data_t *, uchar_t *);
↓ open down ↓ 1238 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX