View | Details | Raw Unified | Return to bug 179989 | Differences between
and this patch

Collapse All | Expand All

(-)src/config.h.in (-2 / +2 lines)
Lines 54-61 Link Here
54
/* Define to 1 if you have the `cam' library (-lcam). */
54
/* Define to 1 if you have the `cam' library (-lcam). */
55
#undef HAVE_LIBCAM
55
#undef HAVE_LIBCAM
56
56
57
/* Define to 1 if you have the `crypto' library (-lcrypto). */
57
/* Define to 1 if you have the `md' library (-lmd). */
58
#undef HAVE_LIBCRYPTO
58
#undef HAVE_LIBMD
59
59
60
/* Define to 1 if you have the `pthread' library (-lpthread). */
60
/* Define to 1 if you have the `pthread' library (-lpthread). */
61
#undef HAVE_LIBPTHREAD
61
#undef HAVE_LIBPTHREAD
(-)src/istgt_md5.c (-13 / +8 lines)
Lines 33-39 Link Here
33
#include <stdint.h>
33
#include <stdint.h>
34
34
35
#include <stddef.h>
35
#include <stddef.h>
36
#include <openssl/md5.h>
36
#include <sys/types.h>
37
#include <md5.h>
37
38
38
#include "istgt.h"
39
#include "istgt.h"
39
#include "istgt_md5.h"
40
#include "istgt_md5.h"
Lines 41-74 Link Here
41
int
42
int
42
istgt_md5init(ISTGT_MD5CTX *md5ctx)
43
istgt_md5init(ISTGT_MD5CTX *md5ctx)
43
{
44
{
44
	int rc;
45
46
	if (md5ctx == NULL)
45
	if (md5ctx == NULL)
47
		return -1;
46
		return -1;
48
	rc = MD5_Init(&md5ctx->md5ctx);
47
	MD5Init(&md5ctx->md5ctx);
49
	return rc;
48
	return 1;
50
}
49
}
51
50
52
int
51
int
53
istgt_md5final(void *md5, ISTGT_MD5CTX *md5ctx)
52
istgt_md5final(void *md5, ISTGT_MD5CTX *md5ctx)
54
{
53
{
55
	int rc;
56
57
	if (md5ctx == NULL || md5 == NULL)
54
	if (md5ctx == NULL || md5 == NULL)
58
		return -1;
55
		return -1;
59
	rc = MD5_Final(md5, &md5ctx->md5ctx);
56
	MD5Final(md5, &md5ctx->md5ctx);
60
	return rc;
57
	return 1;
61
}
58
}
62
59
63
int
60
int
64
istgt_md5update(ISTGT_MD5CTX *md5ctx, const void *data, size_t len)
61
istgt_md5update(ISTGT_MD5CTX *md5ctx, const void *data, size_t len)
65
{
62
{
66
	int rc;
67
68
	if (md5ctx == NULL)
63
	if (md5ctx == NULL)
69
		return -1;
64
		return -1;
70
	if (data == NULL || len <= 0)
65
	if (data == NULL || len <= 0)
71
		return 0;
66
		return 0;
72
	rc = MD5_Update(&md5ctx->md5ctx, data, len);
67
	MD5Update(&md5ctx->md5ctx, data, len);
73
	return rc;
68
	return 1;
74
}
69
}
(-)src/istgt_md5.h (-1 / +2 lines)
Lines 30-36 Link Here
30
30
31
#include <stddef.h>
31
#include <stddef.h>
32
32
33
#include <openssl/md5.h>
33
#include <sys/types.h>
34
#include <md5.h>
34
35
35
#define ISTGT_MD5DIGEST_LEN MD5_DIGEST_LENGTH
36
#define ISTGT_MD5DIGEST_LEN MD5_DIGEST_LENGTH
36
37
(-)configure (-13 / +13 lines)
Lines 3472-3484 Link Here
3472
3472
3473
fi
3473
fi
3474
3474
3475
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5_Update in -lcrypto" >&5
3475
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MD5Update in -lmd" >&5
3476
$as_echo_n "checking for MD5_Update in -lcrypto... " >&6; }
3476
$as_echo_n "checking for MD5Update in -lmd... " >&6; }
3477
if ${ac_cv_lib_crypto_MD5_Update+:} false; then :
3477
if ${ac_cv_lib_crypto_MD5Update+:} false; then :
3478
  $as_echo_n "(cached) " >&6
3478
  $as_echo_n "(cached) " >&6
3479
else
3479
else
3480
  ac_check_lib_save_LIBS=$LIBS
3480
  ac_check_lib_save_LIBS=$LIBS
3481
LIBS="-lcrypto  $LIBS"
3481
LIBS="-lmd $LIBS"
3482
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3482
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3483
/* end confdefs.h.  */
3483
/* end confdefs.h.  */
3484
3484
Lines 3488-3519 Link Here
3488
#ifdef __cplusplus
3488
#ifdef __cplusplus
3489
extern "C"
3489
extern "C"
3490
#endif
3490
#endif
3491
char MD5_Update ();
3491
char MD5Update ();
3492
int
3492
int
3493
main ()
3493
main ()
3494
{
3494
{
3495
return MD5_Update ();
3495
return MD5Update ();
3496
  ;
3496
  ;
3497
  return 0;
3497
  return 0;
3498
}
3498
}
3499
_ACEOF
3499
_ACEOF
3500
if ac_fn_c_try_link "$LINENO"; then :
3500
if ac_fn_c_try_link "$LINENO"; then :
3501
  ac_cv_lib_crypto_MD5_Update=yes
3501
  ac_cv_lib_crypto_MD5Update=yes
3502
else
3502
else
3503
  ac_cv_lib_crypto_MD5_Update=no
3503
  ac_cv_lib_crypto_MD5Update=no
3504
fi
3504
fi
3505
rm -f core conftest.err conftest.$ac_objext \
3505
rm -f core conftest.err conftest.$ac_objext \
3506
    conftest$ac_exeext conftest.$ac_ext
3506
    conftest$ac_exeext conftest.$ac_ext
3507
LIBS=$ac_check_lib_save_LIBS
3507
LIBS=$ac_check_lib_save_LIBS
3508
fi
3508
fi
3509
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5_Update" >&5
3509
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_MD5Update" >&5
3510
$as_echo "$ac_cv_lib_crypto_MD5_Update" >&6; }
3510
$as_echo "$ac_cv_lib_crypto_MD5Update" >&6; }
3511
if test "x$ac_cv_lib_crypto_MD5_Update" = xyes; then :
3511
if test "x$ac_cv_lib_crypto_MD5Update" = xyes; then :
3512
  cat >>confdefs.h <<_ACEOF
3512
  cat >>confdefs.h <<_ACEOF
3513
#define HAVE_LIBCRYPTO 1
3513
#define HAVE_LIBMD 1
3514
_ACEOF
3514
_ACEOF
3515
3515
3516
  LIBS="-lcrypto $LIBS"
3516
  LIBS="-lmd $LIBS"
3517
3517
3518
fi
3518
fi

Return to bug 179989