OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.8 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../libdomainkeys/libdomainkeys-dknewkey.patch
  5. # Copyright (C) 2009 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- ../libdomainkeys-0.66/dknewkey 2005-04-08 22:35:58.000000000 +0300
  17. +++ ./dknewkey 2005-06-25 19:45:11.000000000 +0300
  18. @@ -1,13 +1,18 @@
  19. #!/bin/sh
  20. BITS=384
  21. +if [ -z "$1" ]; then
  22. + echo >&2 "Usage: dknewkey keyfile [bits]"
  23. + exit 1
  24. +fi
  25. +tmpfile=$(mktemp ${TMPDIR:-/tmp}/dknewkeyXXXXXX) || exit 1
  26. if test -n "$2"; then BITS=$2; fi
  27. openssl genrsa -out $1 $BITS 2>/dev/null
  28. -openssl rsa -in $1 -out /tmp/dknewkey.$$ -pubout -outform PEM 2>/dev/null
  29. -if test -f /usr/local/bin/tinydns-data; then
  30. - printf "'%s._domainkey.example.com:k=rsa; p=%s\n" `basename $1` `grep -v ^-- /tmp/dknewkey.$$ | tr -d '\n'`
  31. +openssl rsa -in $1 -out $tmpfile -pubout -outform PEM 2>/dev/null
  32. +if test -f /usr/bin/tinydns-data; then
  33. + printf "'%s._domainkey.example.com:k=rsa; p=%s\n" `basename -- $1` `grep -v ^-- $tmpfile | tr -d '\n'`
  34. else
  35. - printf "%s._domainkey\tIN\tTXT\t\"k=rsa; p=%s\"\n" `basename $1` `grep -v ^-- /tmp/dknewkey.$$ | tr -d '\n'`
  36. + printf "%s._domainkey\tIN\tTXT\t\"k=rsa; p=%s\"\n" `basename -- $1` `grep -v ^-- $tmpfile | tr -d '\n'`
  37. fi
  38. -rm -f /tmp/dknewkey.$$
  39. +rm -f $tmpfile