Browse Source

Fix PBES and OMAC flag scopes

pbes_properties and omac_state are gatekept by LTC_PBES and LTC_OMAC
respectively. Therefore they should only be used within those scopes.
Bjørn Højmose Grevenkop-Castenskiold 5 months ago
parent
commit
0672c6182f
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/headers/tomcrypt_private.h

+ 3 - 2
src/headers/tomcrypt_private.h

@@ -108,12 +108,12 @@ typedef struct
    /* only used for RC2 */
    /* only used for RC2 */
    unsigned long key_bits;
    unsigned long key_bits;
 } pbes_arg;
 } pbes_arg;
-#endif
 
 
 typedef struct {
 typedef struct {
    const pbes_properties *data;
    const pbes_properties *data;
    const char *oid;
    const char *oid;
 } oid_to_pbes;
 } oid_to_pbes;
+#endif
 
 
 /*
 /*
  * Internal functions
  * Internal functions
@@ -179,8 +179,9 @@ int func_name (hash_state * md, const unsigned char *in, unsigned long inlen)
 int ocb3_int_ntz(unsigned long x);
 int ocb3_int_ntz(unsigned long x);
 void ocb3_int_xor_blocks(unsigned char *out, const unsigned char *block_a, const unsigned char *block_b, unsigned long block_len);
 void ocb3_int_xor_blocks(unsigned char *out, const unsigned char *block_a, const unsigned char *block_b, unsigned long block_len);
 
 
+#ifdef LTC_OMAC
 int omac_vprocess(omac_state *omac, const unsigned char *in,  unsigned long inlen, va_list args);
 int omac_vprocess(omac_state *omac, const unsigned char *in,  unsigned long inlen, va_list args);
-
+#endif
 /* tomcrypt_math.h */
 /* tomcrypt_math.h */
 
 
 #if !defined(DESC_DEF_ONLY)
 #if !defined(DESC_DEF_ONLY)