mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 12:03:44 +08:00
If HAVE_LIBCRYPTO isn't defined, define a stub signature_verify().
That cleans up its callers.
This commit is contained in:
parent
c995065620
commit
7b1cba646d
@ -2667,13 +2667,9 @@ isis_print(netdissect_options *ndo,
|
||||
if (tlv_len != ISIS_SUBTLV_AUTH_MD5_LEN+1)
|
||||
ND_PRINT((ndo, ", (invalid subTLV) "));
|
||||
|
||||
#ifdef HAVE_LIBCRYPTO
|
||||
sigcheck = signature_verify(ndo, optr, length, tptr + 1,
|
||||
isis_clear_checksum_lifetime,
|
||||
header_lsp);
|
||||
#else
|
||||
sigcheck = CANT_CHECK_SIGNATURE;
|
||||
#endif
|
||||
ND_PRINT((ndo, " (%s)", tok2str(signature_check_values, "Unknown", sigcheck)));
|
||||
|
||||
break;
|
||||
|
22
print-rsvp.c
22
print-rsvp.c
@ -654,21 +654,9 @@ rsvp_clear_checksum(void *header)
|
||||
|
||||
static int
|
||||
rsvp_obj_print(netdissect_options *ndo,
|
||||
const u_char *pptr
|
||||
#ifndef HAVE_LIBCRYPTO
|
||||
_U_
|
||||
#endif
|
||||
, u_int plen
|
||||
#ifndef HAVE_LIBCRYPTO
|
||||
_U_
|
||||
#endif
|
||||
, const u_char *tptr,
|
||||
const char *ident, u_int tlen,
|
||||
const struct rsvp_common_header *rsvp_com_header
|
||||
#ifndef HAVE_LIBCRYPTO
|
||||
_U_
|
||||
#endif
|
||||
)
|
||||
const u_char *pptr, u_int plen, const u_char *tptr,
|
||||
const char *ident, u_int tlen,
|
||||
const struct rsvp_common_header *rsvp_com_header)
|
||||
{
|
||||
const struct rsvp_object_header *rsvp_obj_header;
|
||||
const u_char *obj_tptr;
|
||||
@ -1682,14 +1670,10 @@ _U_
|
||||
EXTRACT_32BITS(obj_ptr.rsvp_obj_integrity->digest+8),
|
||||
EXTRACT_32BITS(obj_ptr.rsvp_obj_integrity->digest + 12)));
|
||||
|
||||
#ifdef HAVE_LIBCRYPTO
|
||||
sigcheck = signature_verify(ndo, pptr, plen,
|
||||
obj_ptr.rsvp_obj_integrity->digest,
|
||||
rsvp_clear_checksum,
|
||||
rsvp_com_header);
|
||||
#else
|
||||
sigcheck = CANT_CHECK_SIGNATURE;
|
||||
#endif
|
||||
ND_PRINT((ndo, " (%s)", tok2str(signature_check_values, "Unknown", sigcheck)));
|
||||
|
||||
obj_tlen+=sizeof(struct rsvp_obj_integrity_t);
|
||||
|
10
signature.c
10
signature.c
@ -109,9 +109,7 @@ signature_compute_hmac_md5(const uint8_t *text, int text_len, unsigned char *key
|
||||
MD5_Final(digest, &context); /* finish up 2nd pass */
|
||||
}
|
||||
USES_APPLE_RST
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBCRYPTO
|
||||
/*
|
||||
* Verify a cryptographic signature of the packet.
|
||||
* Currently only MD5 is supported.
|
||||
@ -198,6 +196,14 @@ signature_verify(netdissect_options *ndo, const u_char *pptr, u_int plen,
|
||||
return (SIGNATURE_INVALID);
|
||||
}
|
||||
}
|
||||
#else
|
||||
int
|
||||
signature_verify(netdissect_options *ndo _U_, const u_char *pptr _U_,
|
||||
u_int plen _U_, const u_char *sig_ptr _U_,
|
||||
void (*clear_rtn)(void *) _U_, const void *clear_arg _U_)
|
||||
{
|
||||
return (CANT_CHECK_SIGNATURE);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user