ipsec-tools-0.6.7.100-do_not_use_addr_as_truthval.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. diff -rup ipsec-tools-0.6.6.oorig/src/racoon/eaytest.c ipsec-tools-0.6.6/src/racoon/eaytest.c
  2. --- ipsec-tools-0.6.6.oorig/src/racoon/eaytest.c 2005-06-29 00:38:02.000000000 +0200
  3. +++ ipsec-tools-0.6.6/src/racoon/eaytest.c 2006-10-11 16:01:45.000000000 +0200
  4. @@ -311,7 +311,7 @@ certtest(ac, av)
  5. printf("exact match: succeed.\n");
  6. - if (dnstr_w1) {
  7. + if (*dnstr_w1) {
  8. asn1dn = eay_str2asn1dn(dnstr_w1, strlen(dnstr_w1));
  9. if (asn1dn == NULL || asn1dn->l == asn1dn0.l)
  10. errx(1, "asn1dn length wrong for wildcard 1\n");
  11. @@ -321,7 +321,7 @@ certtest(ac, av)
  12. printf("wildcard 1 match: succeed.\n");
  13. }
  14. - if (dnstr_w1) {
  15. + if (*dnstr_w1) {
  16. asn1dn = eay_str2asn1dn(dnstr_w2, strlen(dnstr_w2));
  17. if (asn1dn == NULL || asn1dn->l == asn1dn0.l)
  18. errx(1, "asn1dn length wrong for wildcard 2\n");
  19. diff -rup ipsec-tools-0.6.6.oorig/src/racoon/var.h ipsec-tools-0.6.6/src/racoon/var.h
  20. --- ipsec-tools-0.6.6.oorig/src/racoon/var.h 2004-11-20 17:16:59.000000000 +0100
  21. +++ ipsec-tools-0.6.6/src/racoon/var.h 2006-10-11 16:00:15.000000000 +0200
  22. @@ -76,9 +76,9 @@
  23. do { \
  24. if (getnameinfo((x), sysdep_sa_len(x), (y), sizeof(y), (z), sizeof(z), \
  25. NIFLAGS) != 0) { \
  26. - if (y) \
  27. + if (*y) \
  28. strncpy((y), "(invalid)", sizeof(y)); \
  29. - if (z) \
  30. + if (*z) \
  31. strncpy((z), "(invalid)", sizeof(z)); \
  32. } \
  33. } while (0);
  34. @@ -87,7 +87,7 @@ do { \
  35. do { \
  36. if (getnameinfo((x), sysdep_sa_len(x), (y), sizeof(y), NULL, 0, \
  37. NIFLAGS) != 0) { \
  38. - if (y) \
  39. + if (*y) \
  40. strncpy((y), "(invalid)", sizeof(y)); \
  41. } \
  42. } while (0);