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.

67 lines
1.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../ca-certificates/ca-certificates.conf
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. oval=""
  15. target=${root}/etc/ssl/certs/ca-bundle.crt
  16. do_append ()
  17. {
  18. while [ 1 ]; do
  19. shift
  20. if [ -z $1 ]; then break; fi
  21. oval="$oval\0$1"
  22. done
  23. }
  24. ca_convert()
  25. {
  26. local incert=0
  27. local count=0
  28. echo -n > ${target}
  29. while read -r LINE; do
  30. if [ "${LINE}" = "CKA_VALUE MULTILINE_OCTAL" ]
  31. then
  32. # certificate start
  33. incert=1
  34. oval=""
  35. elif [ "${LINE}" = "END" -a $incert -eq 1 ]
  36. then
  37. # certificate end
  38. echo -e -n "$oval" | openssl x509 -text -inform DER -fingerprint >> ${target}
  39. echo -n "."
  40. count=$(($count + 1))
  41. incert=0
  42. elif [ $incert -eq 1 ]
  43. then
  44. # certificate data
  45. IFS="\\"
  46. do_append $LINE
  47. fi
  48. done < certdata.txt
  49. echo -e "\nDone. $count CA's converted."
  50. }
  51. ca_pm()
  52. {
  53. mkdir -p $root/etc/ssl
  54. tar -v $taropt `match_source_file -p ca-certificates`
  55. ca_convert
  56. cd $root/etc/ssl && ln -sf certs/ca-bundle.crt cert.pem
  57. }
  58. chownsrcdir=0
  59. runconf=0
  60. mainfunction=ca_pm