mote_sms 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mote_sms/ssl_certs/ThawtePrimaryRootCA.pem +85 -0
- data/lib/mote_sms/ssl_certs/ThawteSSLCA.pem +97 -0
- data/lib/mote_sms/ssl_certs/bulk.mobile-gw.com.pem +100 -0
- data/lib/mote_sms/transports/mobile_technics_transport.rb +87 -45
- data/lib/mote_sms/version.rb +1 -1
- data/mote_sms.gemspec +2 -2
- metadata +9 -9
- data/.travis.yml +0 -6
- data/LICENSE +0 -22
- data/lib/mote_sms/transports/.gitkeep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35332460b3c61ba9bcc80fb01c104518116c9e0b
|
4
|
+
data.tar.gz: b0bb6d940c1320b4a89141c7e9f6b12c70441d2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9856b21780535dccf0d689369368a4516d521145cd7d8b250a26ed2e896f0126e597ab7519fff06ff5c11da232329b5dc98658f9a1b675bbecd28da3c3851ae5
|
7
|
+
data.tar.gz: 8223f7936e35f05db53ea4629a30b5fac51ace25f1d00d5ddc4719edb2ed05d1cf2ffcd69ef9c59e53249bb4e4f27b6d990aa351bbd9ce00c99e68ce3d3cd6c2
|
@@ -0,0 +1,85 @@
|
|
1
|
+
This CA certificate is for verifying HTTPS connection to;
|
2
|
+
- https://bulk.mobile-gw.com:9012/
|
3
|
+
|
4
|
+
Certificate:
|
5
|
+
Data:
|
6
|
+
Version: 3 (0x2)
|
7
|
+
Serial Number:
|
8
|
+
34:4e:d5:57:20:d5:ed:ec:49:f4:2f:ce:37:db:2b:6d
|
9
|
+
Signature Algorithm: sha1WithRSAEncryption
|
10
|
+
Issuer: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2006 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA
|
11
|
+
Validity
|
12
|
+
Not Before: Nov 17 00:00:00 2006 GMT
|
13
|
+
Not After : Jul 16 23:59:59 2036 GMT
|
14
|
+
Subject: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2006 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA
|
15
|
+
Subject Public Key Info:
|
16
|
+
Public Key Algorithm: rsaEncryption
|
17
|
+
RSA Public Key: (2048 bit)
|
18
|
+
Modulus (2048 bit):
|
19
|
+
00:ac:a0:f0:fb:80:59:d4:9c:c7:a4:cf:9d:a1:59:
|
20
|
+
73:09:10:45:0c:0d:2c:6e:68:f1:6c:5b:48:68:49:
|
21
|
+
59:37:fc:0b:33:19:c2:77:7f:cc:10:2d:95:34:1c:
|
22
|
+
e6:eb:4d:09:a7:1c:d2:b8:c9:97:36:02:b7:89:d4:
|
23
|
+
24:5f:06:c0:cc:44:94:94:8d:02:62:6f:eb:5a:dd:
|
24
|
+
11:8d:28:9a:5c:84:90:10:7a:0d:bd:74:66:2f:6a:
|
25
|
+
38:a0:e2:d5:54:44:eb:1d:07:9f:07:ba:6f:ee:e9:
|
26
|
+
fd:4e:0b:29:f5:3e:84:a0:01:f1:9c:ab:f8:1c:7e:
|
27
|
+
89:a4:e8:a1:d8:71:65:0d:a3:51:7b:ee:bc:d2:22:
|
28
|
+
60:0d:b9:5b:9d:df:ba:fc:51:5b:0b:af:98:b2:e9:
|
29
|
+
2e:e9:04:e8:62:87:de:2b:c8:d7:4e:c1:4c:64:1e:
|
30
|
+
dd:cf:87:58:ba:4a:4f:ca:68:07:1d:1c:9d:4a:c6:
|
31
|
+
d5:2f:91:cc:7c:71:72:1c:c5:c0:67:eb:32:fd:c9:
|
32
|
+
92:5c:94:da:85:c0:9b:bf:53:7d:2b:09:f4:8c:9d:
|
33
|
+
91:1f:97:6a:52:cb:de:09:36:a4:77:d8:7b:87:50:
|
34
|
+
44:d5:3e:6e:29:69:fb:39:49:26:1e:09:a5:80:7b:
|
35
|
+
40:2d:eb:e8:27:85:c9:fe:61:fd:7e:e6:7c:97:1d:
|
36
|
+
d5:9d
|
37
|
+
Exponent: 65537 (0x10001)
|
38
|
+
X509v3 extensions:
|
39
|
+
X509v3 Basic Constraints: critical
|
40
|
+
CA:TRUE
|
41
|
+
X509v3 Key Usage: critical
|
42
|
+
Certificate Sign, CRL Sign
|
43
|
+
X509v3 Subject Key Identifier:
|
44
|
+
7B:5B:45:CF:AF:CE:CB:7A:FD:31:92:1A:6A:B6:F3:46:EB:57:48:50
|
45
|
+
Signature Algorithm: sha1WithRSAEncryption
|
46
|
+
79:11:c0:4b:b3:91:b6:fc:f0:e9:67:d4:0d:6e:45:be:55:e8:
|
47
|
+
93:d2:ce:03:3f:ed:da:25:b0:1d:57:cb:1e:3a:76:a0:4c:ec:
|
48
|
+
50:76:e8:64:72:0c:a4:a9:f1:b8:8b:d6:d6:87:84:bb:32:e5:
|
49
|
+
41:11:c0:77:d9:b3:60:9d:eb:1b:d5:d1:6e:44:44:a9:a6:01:
|
50
|
+
ec:55:62:1d:77:b8:5c:8e:48:49:7c:9c:3b:57:11:ac:ad:73:
|
51
|
+
37:8e:2f:78:5c:90:68:47:d9:60:60:e6:fc:07:3d:22:20:17:
|
52
|
+
c4:f7:16:e9:c4:d8:72:f9:c8:73:7c:df:16:2f:15:a9:3e:fd:
|
53
|
+
6a:27:b6:a1:eb:5a:ba:98:1f:d5:e3:4d:64:0a:9d:13:c8:61:
|
54
|
+
ba:f5:39:1c:87:ba:b8:bd:7b:22:7f:f6:fe:ac:40:79:e5:ac:
|
55
|
+
10:6f:3d:8f:1b:79:76:8b:c4:37:b3:21:18:84:e5:36:00:eb:
|
56
|
+
63:20:99:b9:e9:fe:33:04:bb:41:c8:c1:02:f9:44:63:20:9e:
|
57
|
+
81:ce:42:d3:d6:3f:2c:76:d3:63:9c:59:dd:8f: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fomk
|
74
|
+
6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6
|
75
|
+
Sk/KaAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94J
|
76
|
+
NqR32HuHUETVPm4pafs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBA
|
77
|
+
MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP
|
78
|
+
r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU
|
79
|
+
DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz
|
80
|
+
YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
|
81
|
+
xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2
|
82
|
+
/qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/
|
83
|
+
LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7
|
84
|
+
jVaMaA==
|
85
|
+
-----END CERTIFICATE-----
|
@@ -0,0 +1,97 @@
|
|
1
|
+
This CA certificate is for verifying HTTPS connection to;
|
2
|
+
- https://bulk.mobile-gw.com:9012/
|
3
|
+
|
4
|
+
Certificate:
|
5
|
+
Data:
|
6
|
+
Version: 3 (0x2)
|
7
|
+
Serial Number:
|
8
|
+
4d:5f:2c:34:08:b2:4c:20:cd:6d:50:7e:24:4d:c9:ec
|
9
|
+
Signature Algorithm: sha1WithRSAEncryption
|
10
|
+
Issuer: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2006 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA
|
11
|
+
Validity
|
12
|
+
Not Before: Feb 8 00:00:00 2010 GMT
|
13
|
+
Not After : Feb 7 23:59:59 2020 GMT
|
14
|
+
Subject: C=US, O=Thawte, Inc., CN=Thawte SSL CA
|
15
|
+
Subject Public Key Info:
|
16
|
+
Public Key Algorithm: rsaEncryption
|
17
|
+
RSA Public Key: (2048 bit)
|
18
|
+
Modulus (2048 bit):
|
19
|
+
00:99:e4:85:5b:76:49:7d:2f:05:d8:c5:ac:c8:c8:
|
20
|
+
a9:d3:dc:98:e6:d7:34:a6:2f:0c:f2:22:26:d8:a3:
|
21
|
+
c9:14:4c:8f:05:a4:45:e8:14:0c:58:90:05:1a:b7:
|
22
|
+
c5:c1:06:a5:80:af:bb:1d:49:6b:52:34:88:c3:59:
|
23
|
+
e7:ef:6b:c4:27:41:8c:2b:66:1d:d0:e0:a3:97:98:
|
24
|
+
19:34:4b:41:d5:98:d5:c7:05:ad:a2:e4:d7:ed:0c:
|
25
|
+
ad:4f:c1:b5:b0:21:fd:3e:50:53:b2:c4:90:d0:d4:
|
26
|
+
30:67:6c:9a:f1:0e:74:c4:c2:dc:8a:e8:97:ff:c9:
|
27
|
+
92:ae:01:8a:56:0a:98:32:b0:00:23:ec:90:1a:60:
|
28
|
+
c3:ed:bb:3a:cb:0f:63:9f:0d:44:c9:52:e1:25:96:
|
29
|
+
bf:ed:50:95:89:7f:56:14:b1:b7:61:1d:1c:07:8c:
|
30
|
+
3a:2c:f7:ff:80:de:39:45:d5:af:1a:d1:78:d8:c7:
|
31
|
+
71:6a:a3:19:a7:32:50:21:e9:f2:0e:a1:c6:13:03:
|
32
|
+
44:48:d1:66:a8:52:57:d7:11:b4:93:8b:e5:99:9f:
|
33
|
+
5d:e7:78:51:e5:4d:f6:b7:59:b4:76:b5:09:37:4d:
|
34
|
+
06:38:13:7a:1c:08:98:5c:c4:48:4a:cb:52:a0:a9:
|
35
|
+
f8:b1:9d:8e:7b:79:b0:20:2f:3c:96:a8:11:62:47:
|
36
|
+
bb:11
|
37
|
+
Exponent: 65537 (0x10001)
|
38
|
+
X509v3 extensions:
|
39
|
+
Authority Information Access:
|
40
|
+
OCSP - URI:http://ocsp.thawte.com
|
41
|
+
|
42
|
+
X509v3 Basic Constraints: critical
|
43
|
+
CA:TRUE, pathlen:0
|
44
|
+
X509v3 CRL Distribution Points:
|
45
|
+
URI:http://crl.thawte.com/ThawtePCA.crl
|
46
|
+
|
47
|
+
X509v3 Key Usage: critical
|
48
|
+
Certificate Sign, CRL Sign
|
49
|
+
X509v3 Subject Alternative Name:
|
50
|
+
DirName:/CN=VeriSignMPKI-2-9
|
51
|
+
X509v3 Subject Key Identifier:
|
52
|
+
A7:A2:83:BB:34:45:40:3D:FC:D5:30:4F:12:B9:3E:A1:01:9F:F6:DB
|
53
|
+
X509v3 Authority Key Identifier:
|
54
|
+
keyid:7B:5B:45:CF:AF:CE:CB:7A:FD:31:92:1A:6A:B6:F3:46:EB:57:48:50
|
55
|
+
|
56
|
+
Signature Algorithm: sha1WithRSAEncryption
|
57
|
+
80:22:80:e0:6c:c8:95:16:d7:57:26:87:f3:72:34:db:c6:72:
|
58
|
+
56:27:3e:d3:96:f6:2e:25:91:a5:3e:33:97:a7:4b:e5:2f:fb:
|
59
|
+
25:7d:2f:07:61:fa:6f:83:74:4c:4c:53:72:20:a4:7a:cf:51:
|
60
|
+
51:56:81:88:b0:6d:1f:36:2c:c8:2b:b1:88:99:c1:fe:44:ab:
|
61
|
+
48:51:7c:d8:f2:44:64:2a:d8:71:a7:fb:1a:2f:f9:19:8d:34:
|
62
|
+
b2:23:bf:c4:4c:55:1d:8e:44:e8:aa:5d:9a:dd:9f:fd:03:c7:
|
63
|
+
ba:24:43:8d:2d:47:44:db:f6:d8:98:c8:b2:f9:da:ef:ed:29:
|
64
|
+
5c:69:12:fa:d1:23:96:0f:bf:9c:0d:f2:79:45:53:37:9a:56:
|
65
|
+
2f:e8:57:10:70:f6:ee:89:0c:49:89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-----
|
@@ -0,0 +1,100 @@
|
|
1
|
+
Certificate:
|
2
|
+
Data:
|
3
|
+
Version: 3 (0x2)
|
4
|
+
Serial Number:
|
5
|
+
17:63:f8:3c:dc:e2:4f:e4:7a:e5:28:20:ae:4c:d2:cb
|
6
|
+
Signature Algorithm: sha1WithRSAEncryption
|
7
|
+
Issuer: C=US, O=Thawte, Inc., CN=Thawte SSL CA
|
8
|
+
Validity
|
9
|
+
Not Before: Mar 20 00:00:00 2013 GMT
|
10
|
+
Not After : Mar 20 23:59:59 2014 GMT
|
11
|
+
Subject: C=CH, ST=Biel, L=Biel, O=NTH AG, OU=Connectivity, CN=bulk.mobile-gw.com
|
12
|
+
Subject Public Key Info:
|
13
|
+
Public Key Algorithm: rsaEncryption
|
14
|
+
RSA Public Key: (2048 bit)
|
15
|
+
Modulus (2048 bit):
|
16
|
+
00:cb:82:e0:e0:b6:1b:5f:40:a7:94:9e:63:32:4c:
|
17
|
+
9f:75:35:40:6d:e5:fb:9e:2c:3a:d3:72:24:38:fc:
|
18
|
+
dc:f3:66:7a:fe:6e:ee:03:61:bd:f7:0e:e1:92:06:
|
19
|
+
8f:1c:df:f8:e5:a7:52:00:aa:f7:dd:b6:8d:b6:6b:
|
20
|
+
bd:79:45:ea:ad:7b:02:b6:5d:47:25:40:10:1a:8e:
|
21
|
+
0f:ca:35:4c:05:ee:50:09:4a:87:ea:1f:57:89:9f:
|
22
|
+
75:3b:64:41:ab:c3:3f:7a:11:16:e3:24:8e:16:43:
|
23
|
+
a6:b2:a3:12:75:9f:ba:f1:e2:49:86:2f:8b:f4:3d:
|
24
|
+
a4:ec:a4:75:91:61:40:46:d0:11:43:d1:d5:86:92:
|
25
|
+
6f:37:fa:91:bf:3d:7c:94:4b:1e:c1:f5:f4:98:d9:
|
26
|
+
43:78:95:a6:40:c9:79:c8:e4:b7:c6:d3:37:51:ff:
|
27
|
+
2e:31:ff:ec:91:6d:71:7b:70:31:90:0c:b1:f5:c0:
|
28
|
+
92:be:dd:fc:89:17:1d:32:ca:a4:20:66:5f:82:96:
|
29
|
+
31:38:11:14:02:c1:db:38:12:84:75:f9:ad:0f:bc:
|
30
|
+
20:4c:80:92:c3:a1:a8:96:2e:73:6c:22:b2:2f:1c:
|
31
|
+
84:8f:a4:7c:c4:84:c1:4a:94:9b:48:cd:83:6b:9c:
|
32
|
+
6f:0b:fe:f9:21:95:37:08:0c:37:86:e3:55:85:ea:
|
33
|
+
cd:ed
|
34
|
+
Exponent: 65537 (0x10001)
|
35
|
+
X509v3 extensions:
|
36
|
+
X509v3 Subject Alternative Name:
|
37
|
+
DNS:bulk.mobile-gw.com
|
38
|
+
X509v3 Basic Constraints:
|
39
|
+
CA:FALSE
|
40
|
+
X509v3 Certificate Policies:
|
41
|
+
Policy: 2.16.840.1.113733.1.7.54
|
42
|
+
CPS: https://www.thawte.com/cps/
|
43
|
+
|
44
|
+
X509v3 Key Usage: critical
|
45
|
+
Digital Signature, Key Encipherment
|
46
|
+
X509v3 Authority Key Identifier:
|
47
|
+
keyid:A7:A2:83:BB:34:45:40:3D:FC:D5:30:4F:12:B9:3E:A1:01:9F:F6:DB
|
48
|
+
|
49
|
+
X509v3 CRL Distribution Points:
|
50
|
+
URI:http://svr-ov-crl.thawte.com/ThawteOV.crl
|
51
|
+
|
52
|
+
X509v3 Extended Key Usage:
|
53
|
+
TLS Web Server Authentication, TLS Web Client Authentication
|
54
|
+
Authority Information Access:
|
55
|
+
OCSP - URI:http://ocsp.thawte.com
|
56
|
+
CA Issuers - URI:http://svr-ov-aia.thawte.com/ThawteOV.cer
|
57
|
+
|
58
|
+
Signature Algorithm: sha1WithRSAEncryption
|
59
|
+
57:3c:1d:19:56:93:35:66:79:dc:c2:33:41:a9:ba:cd:91:f1:
|
60
|
+
44:04:f5:6c:cf:42:a2:f3:7f:01:6f:4e:82:7d:50:85:a1:b6:
|
61
|
+
fa:8a:a0:63:8c:44:c7:c4:57:14:f8:bc:3a:37:21:ba:dc:50:
|
62
|
+
31:80:a2:11:02:47:5d:55:23:24:f4:66:7d:4f:6c:04:38:c3:
|
63
|
+
d9:63:ce:b9:1a:1e:c5:78:c5:31:f6:0d:f5:f9:00:e0:db:ba:
|
64
|
+
75:0f:b0:72:b3:18:ad:e3:73:76:cd:b5:fa:cf:38:bc:d9:a1:
|
65
|
+
ee:01:9b:81:5a:12:b5:b4:c4:9b:d1:fa:9c:bb:aa:0d:8f:17:
|
66
|
+
18:d3:5a:23:f7:3d:1d:da:af:2c:ea:9a:ab:3b:56:2a:5a:3b:
|
67
|
+
73:2b:c5:b1:ff:b9:fb:b6:c6:ea:e0:0a:96:35:b0:88:7f:49:
|
68
|
+
e7:18:c0:51:0e:ff:c9:b1:8f:9f:65:8b:c2:3d:a3:f0:05:cc:
|
69
|
+
00:bb:cd:d4:c2:fa:25:ec:27:2f:3c:c0:03:f6:e2:42:16:fd:
|
70
|
+
9d:5b:c2:ab:26:15:7a:9f:5b:27:32:09:93:5b:95:5e:1b:c8:
|
71
|
+
0a:39:4f:7b:6b:cf:60:2b:16:be:bc:76:ed:0a:91:96:d3:71:
|
72
|
+
71:8c:2f:15:6b:6b:83:5b:ed:17:c2:0a:44:ed:e4:a4:4d:45:
|
73
|
+
9b:e5:0e:e8
|
74
|
+
-----BEGIN CERTIFICATE-----
|
75
|
+
MIIEoTCCA4mgAwIBAgIQF2P4PNziT+R65SggrkzSyzANBgkqhkiG9w0BAQUFADA8
|
76
|
+
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U
|
77
|
+
aGF3dGUgU1NMIENBMB4XDTEzMDMyMDAwMDAwMFoXDTE0MDMyMDIzNTk1OVowcDEL
|
78
|
+
MAkGA1UEBhMCQ0gxDTALBgNVBAgTBEJpZWwxDTALBgNVBAcUBEJpZWwxDzANBgNV
|
79
|
+
BAoUBk5USCBBRzEVMBMGA1UECxQMQ29ubmVjdGl2aXR5MRswGQYDVQQDFBJidWxr
|
80
|
+
Lm1vYmlsZ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M9CovN/
|
95
|
+
AW9Ogn1QhaG2+oqgY4xEx8RXFPi8OjchutxQMYCiEQJHXVUjJPRmfU9sBDjD2WPO
|
96
|
+
uRoexXjFMfYN9fkA4Nu6dQ+wcrMYreNzds21+s84vNmh7gGbgVoStbTEm9H6nLuq
|
97
|
+
DY8XGNNaI/c9HdqvLOqaqztWKlo7cyvFsf+5+7bG6uAKljWwiH9J5xjAUQ7/ybGP
|
98
|
+
n2WLwj2j8AXMALvN1ML6JewnLzzAA/biQhb9nVvCqyYVep9bJzIJk1uVXhvICjlP
|
99
|
+
e2vPYCsWvrx27QqRltNxcYwvFWtrg1vtF8IKRO3kpE1Fm+UO6A==
|
100
|
+
-----END CERTIFICATE-----
|
@@ -20,14 +20,36 @@ module MoteSMS
|
|
20
20
|
# Maximum recipients allowed by API
|
21
21
|
MAX_RECIPIENT = 100
|
22
22
|
|
23
|
+
# Path to certificates
|
24
|
+
CERTS_PATH = File.expand_path File.join(File.dirname(__FILE__), '..', 'ssl_certs')
|
25
|
+
|
23
26
|
# Custom exception subclass.
|
24
27
|
ServiceError = Class.new(::Exception)
|
25
28
|
|
26
|
-
#
|
27
|
-
|
29
|
+
# Readable attributes
|
30
|
+
attr_reader :endpoint, :username, :password, :options
|
28
31
|
|
29
|
-
#
|
30
|
-
|
32
|
+
# Internal: The default certificate store, adds all *CA.pem files
|
33
|
+
# from mote_sms/ssl_certs directory.
|
34
|
+
#
|
35
|
+
# Returns a OpenSSL::X509::Store
|
36
|
+
def self.default_cert_store
|
37
|
+
@cert_store ||= OpenSSL::X509::Store.new.tap do |store|
|
38
|
+
Dir["#{CERTS_PATH}/*CA.pem"].each { |c| store.add_file c }
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
# Internal: Load a X509::Certificate based on the hostname, used to handle
|
43
|
+
# server certificate fingerprinting.
|
44
|
+
#
|
45
|
+
# host - The String with the hostname
|
46
|
+
#
|
47
|
+
# Returns OpenSSL::X509::Certificate or nil if no certificate for this host
|
48
|
+
# is found
|
49
|
+
def self.fingerprint_cert(host)
|
50
|
+
cert = "#{CERTS_PATH}/#{host}.pem"
|
51
|
+
OpenSSL::X509::Certificate.new(File.read(cert)) if File.exists?(cert)
|
52
|
+
end
|
31
53
|
|
32
54
|
# Public: Global default parameters for sending messages, Procs/lambdas
|
33
55
|
# are evaluated on #deliver. Ensure to use only symbols as keys. Contains
|
@@ -40,7 +62,12 @@ module MoteSMS
|
|
40
62
|
# Returns Hash with options.
|
41
63
|
def self.defaults
|
42
64
|
@@options ||= {
|
43
|
-
allow_adaption: true
|
65
|
+
allow_adaption: true,
|
66
|
+
ssl: ->(http) {
|
67
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
68
|
+
http.verify_depth = 9
|
69
|
+
http.cert_store = self.default_cert_store
|
70
|
+
}
|
44
71
|
}
|
45
72
|
end
|
46
73
|
|
@@ -65,16 +92,17 @@ module MoteSMS
|
|
65
92
|
# Public: Create a new instance using specified endpoint, username
|
66
93
|
# and password.
|
67
94
|
#
|
68
|
-
# endpoint - The String with the URL (with protocol et all) to nth gateway.
|
69
95
|
# username - The String with username.
|
70
96
|
# password - The String with password.
|
71
|
-
# options - The Hash with additional
|
97
|
+
# options - The Hash with additional URL params passed to mobile techics endpoint
|
98
|
+
# :endpoint - The String with the URL, defaults to https://mygateway.nth.ch
|
99
|
+
# :ssl - SSL client options
|
72
100
|
#
|
73
101
|
# Returns a new instance.
|
74
102
|
def initialize(endpoint, username, password, options = nil)
|
75
|
-
|
76
|
-
|
77
|
-
|
103
|
+
@endpoint = URI.parse(endpoint)
|
104
|
+
@username = username
|
105
|
+
@password = password
|
78
106
|
@options = options || {}
|
79
107
|
end
|
80
108
|
|
@@ -85,28 +113,28 @@ module MoteSMS
|
|
85
113
|
#
|
86
114
|
# Returns Array with sender ids.
|
87
115
|
def deliver(message, options = {})
|
88
|
-
raise ArgumentError, "
|
116
|
+
raise ArgumentError, "too many recipients, max. is #{MAX_RECIPIENT} (current: #{message.to.length})" if message.to.length > MAX_RECIPIENT
|
89
117
|
|
90
118
|
# Prepare request
|
91
|
-
|
92
|
-
http = http_client
|
93
|
-
request = http_request
|
119
|
+
options = prepare_options options
|
120
|
+
http = http_client options
|
121
|
+
request = http_request post_params(message, options)
|
94
122
|
|
95
|
-
# Log
|
96
|
-
self.class.logger.debug "curl -X#{request.method}
|
123
|
+
# Log as `curl` request
|
124
|
+
self.class.logger.debug "curl -X#{request.method} '#{endpoint}' -d '#{request.body}'"
|
97
125
|
|
98
126
|
# Perform request
|
99
|
-
resp = http.request
|
127
|
+
resp = http.request(request)
|
100
128
|
|
101
129
|
# Handle errors
|
102
|
-
raise ServiceError, "
|
103
|
-
raise ServiceError, "
|
130
|
+
raise ServiceError, "endpoint did respond with #{resp.code}" unless resp.code.to_i == 200
|
131
|
+
raise ServiceError, "unable to deliver message to all recipients (CAUSE: #{resp.body.strip})" unless resp.body.split("\n").all? { |l| l =~ /Result_code: 00/ }
|
104
132
|
|
105
133
|
# extract Nth-SmsIds
|
106
134
|
resp['X-Nth-SmsId'].split(',')
|
107
135
|
end
|
108
136
|
|
109
|
-
|
137
|
+
private
|
110
138
|
|
111
139
|
# Internal: Prepare request including body, headers etc.
|
112
140
|
#
|
@@ -114,48 +142,52 @@ module MoteSMS
|
|
114
142
|
# params - The Array with the attributes.
|
115
143
|
#
|
116
144
|
# Returns Net::HTTP::Post instance.
|
117
|
-
def http_request(
|
118
|
-
Net::HTTP::Post.new(
|
145
|
+
def http_request(params)
|
146
|
+
Net::HTTP::Post.new(endpoint.request_uri).tap do |request|
|
119
147
|
request.body = URI.encode_www_form params
|
120
148
|
request.content_type = 'application/x-www-form-urlencoded; charset=utf-8'
|
121
149
|
end
|
122
150
|
end
|
123
151
|
|
124
152
|
# Internal: Build new Net::HTTP instance, enables SSL if requested.
|
125
|
-
# FIXME: Add ability to change verify_mode, so e.g. certificates can be
|
126
|
-
# verified!
|
127
153
|
#
|
128
|
-
#
|
154
|
+
# options - The Hash with all options
|
129
155
|
#
|
130
156
|
# Returns Net::HTTP client instance.
|
131
|
-
def http_client(
|
132
|
-
Net::HTTP.new(
|
133
|
-
|
134
|
-
|
157
|
+
def http_client(options)
|
158
|
+
Net::HTTP.new(endpoint.host, endpoint.port).tap do |http|
|
159
|
+
if endpoint.instance_of?(URI::HTTPS)
|
160
|
+
cert = self.class.fingerprint_cert(endpoint.host)
|
135
161
|
http.use_ssl = true
|
136
|
-
http.
|
162
|
+
http.verify_callback = ->(ok, store) { verify_fingerprint(cert.serial, ok, store) } if cert
|
163
|
+
options[:ssl].call(http) if options[:ssl].respond_to?(:call)
|
137
164
|
end
|
138
165
|
end
|
139
166
|
end
|
140
167
|
|
141
|
-
#
|
142
|
-
#
|
168
|
+
# Public: Verify SSL server certifcate when a certificate is available in
|
169
|
+
# mote_sms/ssl_certs/{host}.pem. Implemented to return false if first
|
170
|
+
# certificate in chain does not match the expected serial.
|
143
171
|
#
|
144
|
-
#
|
172
|
+
# serial - The expected server certificates serial
|
173
|
+
# ok - The Boolean forwarded by verify_callback
|
174
|
+
# store - The OpenSSL::X509::Store instance with the chain
|
145
175
|
#
|
146
|
-
# Returns
|
147
|
-
def
|
148
|
-
|
176
|
+
# Returns Boolean
|
177
|
+
def verify_fingerprint(serial, ok, store)
|
178
|
+
return false unless store.chain.first.serial == serial
|
179
|
+
ok
|
149
180
|
end
|
150
181
|
|
151
|
-
# Internal:
|
152
|
-
#
|
182
|
+
# Internal: Merge defaults from class and instance with options
|
183
|
+
# supplied to #deliver. Removes `:http` options, because those
|
184
|
+
# are only for the HTTP client to set ssl verify mode et all.
|
153
185
|
#
|
154
|
-
#
|
186
|
+
# options - The Hash to merge with #defaults and #options.
|
155
187
|
#
|
156
|
-
# Returns
|
157
|
-
def
|
158
|
-
|
188
|
+
# Returns Hash.
|
189
|
+
def prepare_options(options)
|
190
|
+
options = self.class.defaults.merge(self.options).merge(options)
|
159
191
|
end
|
160
192
|
|
161
193
|
# Internal: Prepare parameters for sending POST to endpoint, merges defaults,
|
@@ -166,7 +198,7 @@ module MoteSMS
|
|
166
198
|
#
|
167
199
|
# Returns Array with params.
|
168
200
|
def post_params(message, options)
|
169
|
-
params =
|
201
|
+
params = options.reject { |key, v| key == :ssl }
|
170
202
|
params.merge! username: self.username,
|
171
203
|
password: self.password,
|
172
204
|
origin: message.from ? message.from.to_number : params[:origin],
|
@@ -178,8 +210,18 @@ module MoteSMS
|
|
178
210
|
value = value.call(message) if value.respond_to?(:call)
|
179
211
|
value = value ? 1 : 0 if param == :allow_adaption
|
180
212
|
|
181
|
-
[param.to_s, value.to_s]
|
182
|
-
end
|
213
|
+
[param.to_s, value.to_s] if value
|
214
|
+
end.compact
|
215
|
+
end
|
216
|
+
|
217
|
+
# Internal: Convert NumberList instance to ; separated string with international
|
218
|
+
# relative formatted numbers. Formatting is done using phony.
|
219
|
+
#
|
220
|
+
# number_list - The NumberList instance.
|
221
|
+
#
|
222
|
+
# Returns String with numbers separated by ;.
|
223
|
+
def prepare_numbers(number_list)
|
224
|
+
number_list.normalized_numbers.map { |n| Phony.formatted(n, format: :international_relative, spaces: '') }.join(';')
|
183
225
|
end
|
184
226
|
end
|
185
227
|
end
|
data/lib/mote_sms/version.rb
CHANGED
data/mote_sms.gemspec
CHANGED
@@ -11,8 +11,8 @@ Gem::Specification.new do |gem|
|
|
11
11
|
with this SMS provider.}
|
12
12
|
gem.homepage = 'https://at-point.ch/opensource'
|
13
13
|
|
14
|
-
gem.files =
|
15
|
-
gem.executables = gem.files.grep(%r{^bin/})
|
14
|
+
gem.files = %w{.gitignore Gemfile Rakefile README.md mote_sms.gemspec} + Dir['**/*.{rb,pem}']
|
15
|
+
gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
16
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
17
17
|
gem.require_paths = %w{lib}
|
18
18
|
gem.version = MoteSMS::VERSION
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mote_sms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Westermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phony
|
@@ -91,22 +91,19 @@ extensions: []
|
|
91
91
|
extra_rdoc_files: []
|
92
92
|
files:
|
93
93
|
- .gitignore
|
94
|
-
- .travis.yml
|
95
94
|
- Gemfile
|
96
|
-
- LICENSE
|
97
|
-
- README.md
|
98
95
|
- Rakefile
|
99
|
-
-
|
96
|
+
- README.md
|
97
|
+
- mote_sms.gemspec
|
100
98
|
- lib/mote_sms/message.rb
|
101
99
|
- lib/mote_sms/number.rb
|
102
100
|
- lib/mote_sms/number_list.rb
|
103
|
-
- lib/mote_sms/transports.rb
|
104
|
-
- lib/mote_sms/transports/.gitkeep
|
105
101
|
- lib/mote_sms/transports/action_mailer_transport.rb
|
106
102
|
- lib/mote_sms/transports/mobile_technics_transport.rb
|
107
103
|
- lib/mote_sms/transports/test_transport.rb
|
104
|
+
- lib/mote_sms/transports.rb
|
108
105
|
- lib/mote_sms/version.rb
|
109
|
-
- mote_sms.
|
106
|
+
- lib/mote_sms.rb
|
110
107
|
- spec/mote_sms/message_spec.rb
|
111
108
|
- spec/mote_sms/number_list_spec.rb
|
112
109
|
- spec/mote_sms/number_spec.rb
|
@@ -115,6 +112,9 @@ files:
|
|
115
112
|
- spec/mote_sms/transports/test_transport_spec.rb
|
116
113
|
- spec/mote_sms_spec.rb
|
117
114
|
- spec/spec_helper.rb
|
115
|
+
- lib/mote_sms/ssl_certs/bulk.mobile-gw.com.pem
|
116
|
+
- lib/mote_sms/ssl_certs/ThawtePrimaryRootCA.pem
|
117
|
+
- lib/mote_sms/ssl_certs/ThawteSSLCA.pem
|
118
118
|
homepage: https://at-point.ch/opensource
|
119
119
|
licenses: []
|
120
120
|
metadata: {}
|
data/.travis.yml
DELETED
data/LICENSE
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 at-point ag, Lukas Westermann, http://at-point.ch/
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
File without changes
|