curb 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of curb might be problematic. Click here for more details.

Files changed (3) hide show
  1. data/ext/curb.h +3 -3
  2. data/ext/curb_easy.c +27 -0
  3. metadata +2 -2
data/ext/curb.h CHANGED
@@ -20,11 +20,11 @@
20
20
  #include "curb_macros.h"
21
21
 
22
22
  // These should be managed from the Rake 'release' task.
23
- #define CURB_VERSION "0.6.8"
24
- #define CURB_VER_NUM 680
23
+ #define CURB_VERSION "0.6.9"
24
+ #define CURB_VER_NUM 690
25
25
  #define CURB_VER_MAJ 0
26
26
  #define CURB_VER_MIN 6
27
- #define CURB_VER_MIC 8
27
+ #define CURB_VER_MIC 9
28
28
  #define CURB_VER_PATCH 0
29
29
 
30
30
 
@@ -504,6 +504,28 @@ static VALUE ruby_curl_easy_cert_get(VALUE self) {
504
504
  CURB_OBJECT_HGETTER(ruby_curl_easy, cert);
505
505
  }
506
506
 
507
+ /*
508
+ * call-seq:
509
+ * easy.cert_key = "cert_key.file" => ""
510
+ *
511
+ * Set a cert key to use for this Curl::Easy instance. This file
512
+ * will be used to validate SSL certificates.
513
+ *
514
+ */
515
+ static VALUE ruby_curl_easy_cert_key_set(VALUE self, VALUE cert_key) {
516
+ CURB_OBJECT_HSETTER(ruby_curl_easy, cert_key);
517
+ }
518
+
519
+ /*
520
+ * call-seq:
521
+ * easy.cert_key => "cert_key.file"
522
+ *
523
+ * Obtain the cert key file to use for this Curl::Easy instance.
524
+ */
525
+ static VALUE ruby_curl_easy_cert_key_get(VALUE self) {
526
+ CURB_OBJECT_HGETTER(ruby_curl_easy, cert_key);
527
+ }
528
+
507
529
  /*
508
530
  * call-seq:
509
531
  * easy.cacert = "cacert.file" => ""
@@ -1749,6 +1771,9 @@ VALUE ruby_curl_easy_setup( ruby_curl_easy *rbce ) {
1749
1771
  if (!rb_easy_nil("certpassword")) {
1750
1772
  curl_easy_setopt(curl, CURLOPT_SSLCERTPASSWD, rb_easy_get_str("certpassword"));
1751
1773
  }
1774
+ if (!rb_easy_nil("cert_key")) {
1775
+ curl_easy_setopt(curl, CURLOPT_SSLKEY, rb_easy_get_str("cert_key"));
1776
+ }
1752
1777
  }
1753
1778
  if (!rb_easy_nil("cacert")) {
1754
1779
  #ifdef HAVE_CURL_CONFIG_CA
@@ -2889,6 +2914,8 @@ void init_curb_easy() {
2889
2914
  rb_define_method(cCurlEasy, "cookiejar", ruby_curl_easy_cookiejar_get, 0);
2890
2915
  rb_define_method(cCurlEasy, "cert=", ruby_curl_easy_cert_set, 1);
2891
2916
  rb_define_method(cCurlEasy, "cert", ruby_curl_easy_cert_get, 0);
2917
+ rb_define_method(cCurlEasy, "cert_key=", ruby_curl_easy_cert_key_set, 1);
2918
+ rb_define_method(cCurlEasy, "cert_key", ruby_curl_easy_cert_key_get, 0);
2892
2919
  rb_define_method(cCurlEasy, "cacert=", ruby_curl_easy_cacert_set, 1);
2893
2920
  rb_define_method(cCurlEasy, "cacert", ruby_curl_easy_cacert_get, 0);
2894
2921
  rb_define_method(cCurlEasy, "certpassword=", ruby_curl_easy_certpassword_set, 1);
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 8
9
- version: 0.6.8
8
+ - 9
9
+ version: 0.6.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ross Bamford