[openssl] master update

shane.lontis at oracle.com shane.lontis at oracle.com
Tue Jun 1 05:27:51 UTC 2021


The branch master has been updated
       via  9ff4b7b0c7b445bcc9b98fde9107fa9520d17f04 (commit)
       via  7f9537d57adf74eb6147bc19b5b579b95a8866e9 (commit)
       via  17b209da4925ada855259ff5b746aaa684def0f5 (commit)
       via  e2311445bbfc9e2a6ff05e467cf13475b058d0a2 (commit)
      from  d11dd381c561db5c5144e575ac6db63e07d5507b (commit)


- Log -----------------------------------------------------------------
commit 9ff4b7b0c7b445bcc9b98fde9107fa9520d17f04
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Sat May 29 12:47:19 2021 +1000

    Migration guide updates for flags and controls.
    
    Provided a section that links to the ctrl/flags mappings to parameters
    for digests and ciphers.
    
    Added "EVP_CIPHER_CTX_set_flags() ordering" to changes section.
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15496)

commit 7f9537d57adf74eb6147bc19b5b579b95a8866e9
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Sat May 29 12:41:43 2021 +1000

    Document Settable EVP_CIPHER_CTX parameter "use-bits"
    
    Added docs for EVP_CIPHER_CTX_set_flags(),
    EVP_CIPHER_CTX_clear_flags() and EVP_CIPHER_CTX_test_flags().
    
    Added section for "FLAGS" to show parameter mappings.
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15496)

commit 17b209da4925ada855259ff5b746aaa684def0f5
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Thu May 27 18:13:24 2021 +1000

    Fix param indentation in ciphercommon_hw.c
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15496)

commit e2311445bbfc9e2a6ff05e467cf13475b058d0a2
Author: Shane Lontis <shane.lontis at oracle.com>
Date:   Thu May 27 18:08:53 2021 +1000

    Fix aes cfb1 so that it can operate in bit mode.
    
    The code to handle the cipher operation was already in the provider.
    It just needed a OSSL_PARAM in order to set this into the algorithm.
    EVP_CIPHER_CTX_set_flags() has been modified to pass the OSSL_PARAM.
    
    Issue reported by Mark Powers from Acumen.
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15496)

-----------------------------------------------------------------------

Summary of changes:
 crypto/evp/evp_lib.c                               |  17 ++++
 doc/man3/EVP_EncryptInit.pod                       | 109 +++++++++++++++++++--
 doc/man7/migration_guide.pod                       |  19 ++++
 include/openssl/core_names.h                       |   1 +
 providers/implementations/ciphers/ciphercommon.c   |  11 +++
 .../implementations/ciphers/ciphercommon_hw.c      |  20 ++--
 test/acvp_test.c                                   |  49 +++++++++
 util/missingcrypto.txt                             |   3 -
 8 files changed, 210 insertions(+), 19 deletions(-)

diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c
index adae97b8f5..bc872c0e79 100644
--- a/crypto/evp/evp_lib.c
+++ b/crypto/evp/evp_lib.c
@@ -1058,14 +1058,31 @@ int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags)
     return (ctx->flags & flags);
 }
 
+static int evp_cipher_ctx_enable_use_bits(EVP_CIPHER_CTX *ctx,
+                                          unsigned int enable)
+{
+    OSSL_PARAM params[] = { OSSL_PARAM_END, OSSL_PARAM_END };
+
+    params[0] = OSSL_PARAM_construct_uint(OSSL_CIPHER_PARAM_USE_BITS, &enable);
+    return EVP_CIPHER_CTX_set_params(ctx, params);
+}
+
 void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags)
 {
+    int oldflags = ctx->flags;
+
     ctx->flags |= flags;
+    if (((oldflags ^ ctx->flags) & EVP_CIPH_FLAG_LENGTH_BITS) != 0)
+        evp_cipher_ctx_enable_use_bits(ctx, 1);
 }
 
 void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags)
 {
+    int oldflags = ctx->flags;
+
     ctx->flags &= ~flags;
+    if (((oldflags ^ ctx->flags) & EVP_CIPH_FLAG_LENGTH_BITS) != 0)
+        evp_cipher_ctx_enable_use_bits(ctx, 0);
 }
 
 int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags)
diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod
index 52b8736d07..0fc7b1e82c 100644
--- a/doc/man3/EVP_EncryptInit.pod
+++ b/doc/man3/EVP_EncryptInit.pod
@@ -66,6 +66,9 @@ EVP_CIPHER_CTX_get_app_data,
 EVP_CIPHER_CTX_set_app_data,
 EVP_CIPHER_CTX_type,
 EVP_CIPHER_CTX_flags,
+EVP_CIPHER_CTX_set_flags,
+EVP_CIPHER_CTX_clear_flags,
+EVP_CIPHER_CTX_test_flags,
 EVP_CIPHER_CTX_mode,
 EVP_CIPHER_param_to_asn1,
 EVP_CIPHER_asn1_to_param,
@@ -134,6 +137,9 @@ EVP_CIPHER_do_all_provided
  int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
  int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int cmd, int p1, void *p2);
  int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
+ void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
+ void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
+ int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
 
  const EVP_CIPHER *EVP_get_cipherbyname(const char *name);
  const EVP_CIPHER *EVP_get_cipherbynid(int nid);
@@ -381,10 +387,12 @@ must be called to free any context resources.
 
 Encrypts or decrypts a maximum I<inl> amount of bytes from I<in> and leaves the
 result in I<out>.
-If the cipher doesn't have the flag B<EVP_CIPH_FLAG_CUSTOM_CIPHER> set,
-then I<inl> must be a multiple of EVP_CIPHER_block_size().  If it isn't,
-the result is undefined.  If the cipher has that flag set, then I<inl>
-can be any size.
+
+For legacy ciphers - If the cipher doesn't have the flag
+B<EVP_CIPH_FLAG_CUSTOM_CIPHER> set, then I<inl> must be a multiple of
+EVP_CIPHER_block_size().  If it isn't, the result is undefined.  If the cipher
+has that flag set, then I<inl> can be any size.
+
 Due to the constraints of the API contract of this function it shouldn't be used
 in applications, please consider using EVP_CipherUpdate() and
 EVP_CipherFinal_ex() instead.
@@ -400,6 +408,14 @@ Return the NID of a cipher when passed an B<EVP_CIPHER> or B<EVP_CIPHER_CTX>
 structure.  The actual NID value is an internal value which may not have a
 corresponding OBJECT IDENTIFIER.
 
+=item EVP_CIPHER_CTX_set_flags(), EVP_CIPHER_CTX_clear_flags() and EVP_CIPHER_CTX_test_flags()
+
+Sets, clears and tests I<ctx> flags.  See L</FLAGS> below for more information.
+
+For provided ciphers EVP_CIPHER_CTX_set_flags() should be called only after the
+fetched cipher has been assigned to the I<ctx>. It is recommended to use
+L</PARAMETERS> instead.
+
 =item EVP_CIPHER_CTX_set_padding()
 
 Enables or disables padding. This function should be called after the context
@@ -499,7 +515,7 @@ If the cipher is a stream cipher then EVP_CIPH_STREAM_CIPHER is returned.
 
 =item EVP_CIPHER_flags()
 
-Returns any flags associated with the cipher. See EVP_CIPHER_meth_set_flags()
+Returns any flags associated with the cipher. See L</FLAGS>
 for a list of currently defined flags.
 
 =item EVP_CIPHER_param_to_asn1()
@@ -783,6 +799,15 @@ by AES SIV ciphers which disallow multiple operations by default.
 Setting "speed" to 1 allows another encrypt or decrypt operation to be
 performed. This is used for performance testing.
 
+=item "use-bits" (B<OSSL_CIPHER_PARAM_USE_BITS>) <unsigned integer>
+
+Determines if the input length I<inl> passed to EVP_EncryptUpdate(),
+EVP_DecryptUpdate() and EVP_CipherUpdate() is the number of bits or number of bytes.
+Setting "use-bits" to 1 uses bits. The default is in bytes.
+This is only used for B<CFB1> ciphers.
+
+This can be set using EVP_CIPHER_CTX_set_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS).
+
 =item "tls-version" (B<OSSL_CIPHER_PARAM_TLS_VERSION>) <integer>
 
 Sets the TLS version.
@@ -990,6 +1015,78 @@ followed by EVP_CIPHER_CTX_get_params() with a key of
 
 =back
 
+=head1 FLAGS
+
+EVP_CIPHER_CTX_set_flags(), EVP_CIPHER_CTX_clear_flags() and EVP_CIPHER_CTX_test_flags().
+can be used to manipulate and test these B<EVP_CIPHER_CTX> flags:
+
+=over 4
+
+=item EVP_CIPH_NO_PADDING
+
+Used by EVP_CIPHER_CTX_set_padding().
+
+See also L</Gettable and Settable EVP_CIPHER_CTX parameters> "padding"
+
+=item EVP_CIPH_FLAG_LENGTH_BITS
+
+See L</Settable EVP_CIPHER_CTX parameters> "use-bits".
+
+=item EVP_CIPHER_CTX_FLAG_WRAP_ALLOW
+
+Used for Legacy purposes only. This flag needed to be set to indicate the
+cipher handled wrapping.
+
+=back
+
+EVP_CIPHER_flags() uses the following flags that
+have mappings to L</Gettable EVP_CIPHER parameters>:
+
+=over 4
+
+=item EVP_CIPH_FLAG_AEAD_CIPHER
+
+See L</Gettable EVP_CIPHER parameters> "aead".
+
+=item EVP_CIPH_CUSTOM_IV
+
+See L</Gettable EVP_CIPHER parameters> "custom-iv".
+
+=item EVP_CIPH_FLAG_CTS
+
+See L</Gettable EVP_CIPHER parameters> "cts".
+
+=item EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK;
+
+See L</Gettable EVP_CIPHER parameters> "tls-multi".
+
+=back
+
+EVP_CIPHER_flags() uses the following flags for legacy purposes only:
+
+=over 4
+
+=item EVP_CIPH_VARIABLE_LENGTH
+
+=item EVP_CIPH_FLAG_CUSTOM_CIPHER
+
+=item EVP_CIPH_ALWAYS_CALL_INIT
+
+=item EVP_CIPH_CTRL_INIT
+
+=item EVP_CIPH_CUSTOM_KEY_LENGTH
+
+=item EVP_CIPH_RAND_KEY
+
+=item EVP_CIPH_CUSTOM_COPY
+
+=item EVP_CIPH_FLAG_DEFAULT_ASN1
+
+See L<EVP_CIPHER_meth_set_flags(3)> for further information related to the above
+flags.
+
+=back
+
 =head1 RETURN VALUES
 
 EVP_CIPHER_fetch() returns a pointer to a B<EVP_CIPHER> for success
@@ -1010,7 +1107,7 @@ EVP_CipherInit_ex2() and EVP_CipherUpdate() return 1 for success and 0 for failu
 EVP_CipherFinal_ex() returns 0 for a decryption failure or 1 for success.
 
 EVP_Cipher() returns the amount of encrypted / decrypted bytes, or -1
-on failure, if the flag B<EVP_CIPH_FLAG_CUSTOM_CIPHER> is set for the
+on failure if the flag B<EVP_CIPH_FLAG_CUSTOM_CIPHER> is set for the
 cipher.  EVP_Cipher() returns 1 on success or 0 on failure, if the flag
 B<EVP_CIPH_FLAG_CUSTOM_CIPHER> is not set for the cipher.
 
diff --git a/doc/man7/migration_guide.pod b/doc/man7/migration_guide.pod
index 89ef74f0a1..b230eb7839 100644
--- a/doc/man7/migration_guide.pod
+++ b/doc/man7/migration_guide.pod
@@ -423,6 +423,12 @@ Previously (in 1.1.1) these conflicting parameters were allowed, but will now
 result in errors. See L<EVP_PKEY-DH(7)> for further details. This affects the
 behaviour of L<openssl-genpkey(1)> for DH parameter generation.
 
+=head4 EVP_CIPHER_CTX_set_flags() ordering change
+
+If using a cipher from a provider the B<EVP_CIPH_FLAG_LENGTH_BITS> flag can only
+be set B<after> the cipher has been assigned to the cipher context.
+See L<EVP_EncryptInit(3)/FLAGS> for more information.
+
 =head2 Installation and Compilation
 
 Please refer to the INSTALL.md file in the top of the distribution for
@@ -869,6 +875,19 @@ See also L<crypto(7)/OPENSSL PROVIDERS>.
 Implicit and Explicit Fetching is described in detail here
 L<crypto(7)/ALGORITHM FETCHING>.
 
+=head3 Mapping EVP controls and flags to provider B<OSSL_PARAM> parameters
+
+The existing functions for controls (such as L<EVP_CIPHER_CTX_ctrl(3)>) and
+manipulating flags (such as L<EVP_MD_CTX_set_flags(3)>)internally use
+B<OSSL_PARAMS> to pass information to/from provider objects.
+See L<OSSL_PARAM(3)> for additional information related to parameters.
+
+For ciphers see L<EVP_EncryptInit(3)/CONTROLS>, L<EVP_EncryptInit(3)/FLAGS> and
+L<EVP_EncryptInit(3)/PARAMETERS>.
+
+For digests see L<EVP_DigestInit(3)/CONTROLS>, L<EVP_DigestInit(3)/FLAGS> and
+L<EVP_DigestInit(3)/PARAMETERS>.
+
 =head3 Deprecation of Low Level Functions
 
 A significant number of APIs have been deprecated in OpenSSL 3.0.
diff --git a/include/openssl/core_names.h b/include/openssl/core_names.h
index e4601a51ab..5ecde3c994 100644
--- a/include/openssl/core_names.h
+++ b/include/openssl/core_names.h
@@ -65,6 +65,7 @@ extern "C" {
 
 /* cipher parameters */
 #define OSSL_CIPHER_PARAM_PADDING              "padding"      /* uint */
+#define OSSL_CIPHER_PARAM_USE_BITS             "use-bits"     /* uint */
 #define OSSL_CIPHER_PARAM_TLS_VERSION          "tls-version"  /* uint */
 #define OSSL_CIPHER_PARAM_TLS_MAC              "tls-mac"      /* octet_ptr */
 #define OSSL_CIPHER_PARAM_TLS_MAC_SIZE         "tls-mac-size" /* size_t */
diff --git a/providers/implementations/ciphers/ciphercommon.c b/providers/implementations/ciphers/ciphercommon.c
index f84f7a36c2..3c8ea8c03c 100644
--- a/providers/implementations/ciphers/ciphercommon.c
+++ b/providers/implementations/ciphers/ciphercommon.c
@@ -95,6 +95,7 @@ CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_START(ossl_cipher_generic)
 CIPHER_DEFAULT_GETTABLE_CTX_PARAMS_END(ossl_cipher_generic)
 
 CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_START(ossl_cipher_generic)
+OSSL_PARAM_uint(OSSL_CIPHER_PARAM_USE_BITS, NULL),
 OSSL_PARAM_uint(OSSL_CIPHER_PARAM_TLS_VERSION, NULL),
 OSSL_PARAM_size_t(OSSL_CIPHER_PARAM_TLS_MAC_SIZE, NULL),
 CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(ossl_cipher_generic)
@@ -598,6 +599,16 @@ int ossl_cipher_generic_set_ctx_params(void *vctx, const OSSL_PARAM params[])
         }
         ctx->pad = pad ? 1 : 0;
     }
+    p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_USE_BITS);
+    if (p != NULL) {
+        unsigned int bits;
+
+        if (!OSSL_PARAM_get_uint(p, &bits)) {
+            ERR_raise(ERR_LIB_PROV, PROV_R_FAILED_TO_GET_PARAMETER);
+            return 0;
+        }
+        ctx->use_bits = bits ? 1 : 0;
+    }
     p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_TLS_VERSION);
     if (p != NULL) {
         if (!OSSL_PARAM_get_uint(p, &ctx->tlsversion)) {
diff --git a/providers/implementations/ciphers/ciphercommon_hw.c b/providers/implementations/ciphers/ciphercommon_hw.c
index 8452338da7..e73416a1c5 100644
--- a/providers/implementations/ciphers/ciphercommon_hw.c
+++ b/providers/implementations/ciphers/ciphercommon_hw.c
@@ -14,7 +14,7 @@
  * Used if there is no special hardware implementations.
  */
 int ossl_cipher_hw_generic_cbc(PROV_CIPHER_CTX *dat, unsigned char *out,
-                          const unsigned char *in, size_t len)
+                               const unsigned char *in, size_t len)
 {
     if (dat->stream.cbc)
         (*dat->stream.cbc) (in, out, len, dat->ks, dat->iv, dat->enc);
@@ -27,7 +27,7 @@ int ossl_cipher_hw_generic_cbc(PROV_CIPHER_CTX *dat, unsigned char *out,
 }
 
 int ossl_cipher_hw_generic_ecb(PROV_CIPHER_CTX *dat, unsigned char *out,
-                          const unsigned char *in, size_t len)
+                               const unsigned char *in, size_t len)
 {
     size_t i, bl = dat->blocksize;
 
@@ -46,7 +46,7 @@ int ossl_cipher_hw_generic_ecb(PROV_CIPHER_CTX *dat, unsigned char *out,
 }
 
 int ossl_cipher_hw_generic_ofb128(PROV_CIPHER_CTX *dat, unsigned char *out,
-                             const unsigned char *in, size_t len)
+                                  const unsigned char *in, size_t len)
 {
     int num = dat->num;
 
@@ -69,7 +69,7 @@ int ossl_cipher_hw_generic_cfb128(PROV_CIPHER_CTX *dat, unsigned char *out,
 }
 
 int ossl_cipher_hw_generic_cfb8(PROV_CIPHER_CTX *dat, unsigned char *out,
-                           const unsigned char *in, size_t len)
+                                const unsigned char *in, size_t len)
 {
     int num = dat->num;
 
@@ -81,7 +81,7 @@ int ossl_cipher_hw_generic_cfb8(PROV_CIPHER_CTX *dat, unsigned char *out,
 }
 
 int ossl_cipher_hw_generic_cfb1(PROV_CIPHER_CTX *dat, unsigned char *out,
-                           const unsigned char *in, size_t len)
+                                const unsigned char *in, size_t len)
 {
     int num = dat->num;
 
@@ -109,7 +109,7 @@ int ossl_cipher_hw_generic_cfb1(PROV_CIPHER_CTX *dat, unsigned char *out,
 }
 
 int ossl_cipher_hw_generic_ctr(PROV_CIPHER_CTX *dat, unsigned char *out,
-                          const unsigned char *in, size_t len)
+                               const unsigned char *in, size_t len)
 {
     unsigned int num = dat->num;
 
@@ -130,7 +130,7 @@ int ossl_cipher_hw_generic_ctr(PROV_CIPHER_CTX *dat, unsigned char *out,
  */
 
 int ossl_cipher_hw_chunked_cbc(PROV_CIPHER_CTX *ctx, unsigned char *out,
-                          const unsigned char *in, size_t inl)
+                               const unsigned char *in, size_t inl)
 {
     while (inl >= MAXCHUNK) {
         ossl_cipher_hw_generic_cbc(ctx, out, in, MAXCHUNK);
@@ -144,7 +144,7 @@ int ossl_cipher_hw_chunked_cbc(PROV_CIPHER_CTX *ctx, unsigned char *out,
 }
 
 int ossl_cipher_hw_chunked_cfb8(PROV_CIPHER_CTX *ctx, unsigned char *out,
-                           const unsigned char *in, size_t inl)
+                                const unsigned char *in, size_t inl)
 {
     size_t chunk = MAXCHUNK;
 
@@ -162,7 +162,7 @@ int ossl_cipher_hw_chunked_cfb8(PROV_CIPHER_CTX *ctx, unsigned char *out,
 }
 
 int ossl_cipher_hw_chunked_cfb128(PROV_CIPHER_CTX *ctx, unsigned char *out,
-                             const unsigned char *in, size_t inl)
+                                  const unsigned char *in, size_t inl)
 {
     size_t chunk = MAXCHUNK;
 
@@ -180,7 +180,7 @@ int ossl_cipher_hw_chunked_cfb128(PROV_CIPHER_CTX *ctx, unsigned char *out,
 }
 
 int ossl_cipher_hw_chunked_ofb128(PROV_CIPHER_CTX *ctx, unsigned char *out,
-                             const unsigned char *in, size_t inl)
+                                  const unsigned char *in, size_t inl)
 {
     while (inl >= MAXCHUNK) {
         ossl_cipher_hw_generic_ofb128(ctx, out, in, MAXCHUNK);
diff --git a/test/acvp_test.c b/test/acvp_test.c
index 339c2fb965..84009193c2 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -1387,6 +1387,54 @@ err:
     return res;
 }
 
+static int aes_cfb1_bits_test(void)
+{
+    int ret = 0;
+    EVP_CIPHER *cipher = NULL;
+    EVP_CIPHER_CTX *ctx = NULL;
+    unsigned char out[16] = { 0 };
+    int outlen;
+    const OSSL_PARAM *params, *p;
+
+    static const unsigned char key[] = {
+        0x12, 0x22, 0x58, 0x2F, 0x1C, 0x1A, 0x8A, 0x88,
+        0x30, 0xFC, 0x18, 0xB7, 0x24, 0x89, 0x7F, 0xC0
+    };
+    static const unsigned char iv[] = {
+        0x05, 0x28, 0xB5, 0x2B, 0x58, 0x27, 0x63, 0x5C,
+        0x81, 0x86, 0xD3, 0x63, 0x60, 0xB0, 0xAA, 0x2B
+    };
+    static const unsigned char pt[] = {
+        0xB4
+    };
+    static const unsigned char expected[] = {
+        0x6C
+    };
+
+    if (!TEST_ptr(cipher = EVP_CIPHER_fetch(libctx, "AES-128-CFB1", "fips=yes")))
+        goto err;
+    if (!TEST_ptr(ctx = EVP_CIPHER_CTX_new()))
+        goto err;
+    if (!TEST_int_gt(EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, 1), 0))
+        goto err;
+    if (!TEST_ptr(params = EVP_CIPHER_CTX_settable_params(ctx))
+        || !TEST_ptr(p = OSSL_PARAM_locate_const(params,
+                                                 OSSL_CIPHER_PARAM_USE_BITS)))
+        goto err;
+    EVP_CIPHER_CTX_set_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS);
+    if (!TEST_int_gt(EVP_CipherUpdate(ctx, out, &outlen, pt, 7), 0))
+        goto err;
+    if (!TEST_int_eq(outlen, 7))
+        goto err;
+    if (!TEST_mem_eq(out, (outlen + 7) / 8, expected, sizeof(expected)))
+        goto err;
+    ret = 1;
+err:
+    EVP_CIPHER_free(cipher);
+    EVP_CIPHER_CTX_free(ctx);
+    return ret;
+}
+
 int setup_tests(void)
 {
     char *config_file = NULL;
@@ -1411,6 +1459,7 @@ int setup_tests(void)
 
     OSSL_SELF_TEST_set_callback(libctx, self_test_events, &self_test_args);
 
+    ADD_TEST(aes_cfb1_bits_test);
     ADD_ALL_TESTS(cipher_enc_dec_test, OSSL_NELEM(cipher_enc_data));
     ADD_ALL_TESTS(aes_ccm_enc_dec_test, OSSL_NELEM(aes_ccm_enc_data));
     ADD_ALL_TESTS(aes_gcm_enc_dec_test, OSSL_NELEM(aes_gcm_enc_data));
diff --git a/util/missingcrypto.txt b/util/missingcrypto.txt
index 00083c834d..04eace5da7 100644
--- a/util/missingcrypto.txt
+++ b/util/missingcrypto.txt
@@ -630,14 +630,11 @@ ERR_load_strings_const(3)
 ERR_set_error_data(3)
 ERR_unload_strings(3)
 EVP_CIPHER_CTX_buf_noconst(3)
-EVP_CIPHER_CTX_clear_flags(3)
 EVP_CIPHER_CTX_copy(3)
 EVP_CIPHER_CTX_encrypting(3)
 EVP_CIPHER_CTX_num(3)
 EVP_CIPHER_CTX_rand_key(3)
-EVP_CIPHER_CTX_set_flags(3)
 EVP_CIPHER_CTX_set_num(3)
-EVP_CIPHER_CTX_test_flags(3)
 EVP_CIPHER_do_all(3)
 EVP_CIPHER_do_all_sorted(3)
 EVP_CIPHER_get_asn1_iv(3)


More information about the openssl-commits mailing list