Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

curl: ca-bundle handling

  • Loading branch information...
commit 83474d57b8e46fb98dc0e9ca8a6ba3ffb02dbfed 1 parent 8f27792
@mpapis mpapis authored
Showing with 38 additions and 1 deletion.
  1. +1 −1  curl/map
  2. +37 −0 curl/shell/functions
View
2  curl/map
@@ -1,2 +1,2 @@
-
+generate/certs=curl_generate_cert()
setup=setup
View
37 curl/shell/functions
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+curl_preconfigure()
+{
+ package configure flags "--with-ca-bundle=${install_path}/lib/ca-bundle.crt"
+}
+
+curl_postinstall()
+{
+ curl_generate_cert silent
+}
+
+curl_generate_cert()
+{
+ if [[ -z "${source_path}" ]]
+ then __sm.package.init
+ fi
+
+ if [[ -d ${source_path}/${package_dir}/lib ]]
+ then
+ (
+ builtin cd "${source_path}/${package_dir}/lib"
+ pwd
+ ls -l | less
+ if ./mk-ca-bundle.pl
+ then
+ install ca-bundle.crt ${install_path}/lib/ca-bundle.crt
+ [[ "$1" == "silent" ]] || __sm.log.log "Certificates updated." >&2
+ else
+ [[ "$1" == "silent" ]] || __sm.log.error "Can not update certificates." >&2
+ fi
+ ) >/dev/null
+ else
+ __sm.log.error "Please install curl first."
+ return 1
+ fi
+}
Please sign in to comment.
Something went wrong with that request. Please try again.