Print this page
9697 Add digest tests to crypto test framework

Split Close
Expand all
Collapse all
          --- old/usr/src/test/crypto-tests/tests/common/cryptotest.h
          +++ new/usr/src/test/crypto-tests/tests/common/cryptotest.h
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
       14 + * Copyright 2018, Joyent, Inc.
  14   15   */
  15   16  
  16   17  #ifndef _CRYPTOTEST_H
  17   18  #define _CRYPTOTEST_H
  18   19  
  19   20  #ifdef __cplusplus
  20   21  extern "C" {
  21   22  #endif
  22   23  
  23   24  #include <sys/crypto/ioctl.h>
↓ open down ↓ 46 lines elided ↑ open up ↑
  70   71  int encrypt_single(crypto_op_t *op);
  71   72  int encrypt_update(crypto_op_t *op, int offset, size_t *encrlen);
  72   73  int encrypt_final(crypto_op_t *op, size_t encrlen);
  73   74  
  74   75  /* CRYPTO_DECRYPT */
  75   76  int decrypt_init(crypto_op_t *op);
  76   77  int decrypt_single(crypto_op_t *op);
  77   78  int decrypt_update(crypto_op_t *op, int offset, size_t *encrlen);
  78   79  int decrypt_final(crypto_op_t *op, size_t encrlen);
  79   80  
       81 +/* CRYPTO_DIGEST */
       82 +int digest_init(crypto_op_t *op);
       83 +int digest_single(crypto_op_t *op);
       84 +int digest_update(crypto_op_t *op, int);
       85 +int digest_final(crypto_op_t *op);
       86 +
  80   87  /* wrappers */
  81   88  int test_mac_single(cryptotest_t *args);
  82   89  int test_mac(cryptotest_t *args);
  83   90  
  84   91  int test_encrypt_single(cryptotest_t *args);
  85   92  int test_encrypt(cryptotest_t *args);
  86   93  
  87   94  int test_decrypt_single(cryptotest_t *args);
  88   95  int test_decrypt(cryptotest_t *args);
  89   96  
       97 +int test_digest_single(cryptotest_t *args);
       98 +int test_digest(cryptotest_t *args);
       99 +
  90  100  extern test_fg_t cryptotest_decr_fg;
  91  101  extern test_fg_t cryptotest_encr_fg;
  92  102  extern test_fg_t cryptotest_mac_fg;
      103 +extern test_fg_t cryptotest_digest_fg;
  93  104  
  94  105  #define MAC_FG (&cryptotest_mac_fg)
  95  106  #define ENCR_FG (&cryptotest_encr_fg)
  96  107  #define DECR_FG (&cryptotest_decr_fg)
      108 +#define DIGEST_FG (&cryptotest_digest_fg)
  97  109  
  98  110  #ifdef __cplusplus
  99  111  }
 100  112  #endif
 101  113  
 102  114  #endif /* _CRYPTOTEST_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX