krb5 commit: Fix OpenSSL conditionals for two files

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/6b1bc3801b57ece62d00a491bbd0819abd162dd2
commit 6b1bc3801b57ece62d00a491bbd0819abd162dd2
Author: Isaac Boukris <[email protected]>
Date:   Sun Dec 5 16:08:41 2021 -0500

    Fix OpenSSL conditionals for two files
    
    Commit 7e8c41afc54db2ca75de5a1e2e440b034be8887b mistakenly left
    two files.  Fix them.
    
    [[email protected]: keep crypto_int.h include unconditional; wrote
    commit message]

 src/lib/crypto/openssl/des/des_keys.c          |    5 ++++-
 src/lib/crypto/openssl/enc_provider/camellia.c |    5 +++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/lib/crypto/openssl/des/des_keys.c b/src/lib/crypto/openssl/des/des_keys.c
index 0a4a517..83f1cbf 100644
--- a/src/lib/crypto/openssl/des/des_keys.c
+++ b/src/lib/crypto/openssl/des/des_keys.c
@@ -25,12 +25,15 @@
  */
 
 #include "crypto_int.h"
-#include <openssl/des.h>
 
 #ifdef K5_OPENSSL_DES_KEY_PARITY
+
+#include <openssl/des.h>
+
 void
 k5_des_fixup_key_parity(unsigned char *keybits)
 {
     DES_set_odd_parity((DES_cblock *)keybits);
 }
+
 #endif
diff --git a/src/lib/crypto/openssl/enc_provider/camellia.c b/src/lib/crypto/openssl/enc_provider/camellia.c
index 81f4772..01920e6 100644
--- a/src/lib/crypto/openssl/enc_provider/camellia.c
+++ b/src/lib/crypto/openssl/enc_provider/camellia.c
@@ -25,6 +25,9 @@
  */
 
 #include "crypto_int.h"
+
+#ifdef K5_OPENSSL_CAMELLIA
+
 #include <openssl/evp.h>
 #include <openssl/camellia.h>
 #if OPENSSL_VERSION_NUMBER >= 0x30000000L
@@ -33,8 +36,6 @@
 #include <openssl/modes.h>
 #endif
 
-#ifdef K5_OPENSSL_CAMELLIA
-
 static krb5_error_code
 cbc_enc(krb5_key key, const krb5_data *ivec, krb5_crypto_iov *data,
         size_t num_data);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.