digicert 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.hound.yml +3 -0
- data/.rspec +0 -1
- data/.rubocop.yml +629 -0
- data/.sample.env +4 -0
- data/.sample.pryrc +3 -0
- data/.travis.yml +5 -2
- data/LICENSE.txt +21 -0
- data/README.md +812 -9
- data/bin/console +2 -5
- data/bin/rspec +17 -0
- data/digicert.gemspec +7 -14
- data/lib/digicert.rb +40 -2
- data/lib/digicert/actions.rb +9 -0
- data/lib/digicert/actions/all.rb +27 -0
- data/lib/digicert/actions/base.rb +11 -0
- data/lib/digicert/actions/create.rb +25 -0
- data/lib/digicert/actions/fetch.rb +21 -0
- data/lib/digicert/actions/update.rb +25 -0
- data/lib/digicert/base.rb +35 -0
- data/lib/digicert/base_order.rb +39 -0
- data/lib/digicert/certificate.rb +43 -0
- data/lib/digicert/certificate_downloader.rb +137 -0
- data/lib/digicert/certificate_request.rb +19 -0
- data/lib/digicert/client_certificate/base.rb +17 -0
- data/lib/digicert/client_certificate/digital_signature_plus.rb +13 -0
- data/lib/digicert/client_certificate/email_security_plus.rb +13 -0
- data/lib/digicert/client_certificate/premium.rb +17 -0
- data/lib/digicert/config.rb +21 -0
- data/lib/digicert/configuration.rb +26 -0
- data/lib/digicert/container.rb +35 -0
- data/lib/digicert/container_template.rb +32 -0
- data/lib/digicert/csr_generator.rb +43 -0
- data/lib/digicert/debugger.rb +34 -0
- data/lib/digicert/domain.rb +59 -0
- data/lib/digicert/duplicate_certificate.rb +21 -0
- data/lib/digicert/duplicate_certificate_finder.rb +42 -0
- data/lib/digicert/email_validation.rb +35 -0
- data/lib/digicert/errors.rb +30 -0
- data/lib/digicert/errors/forbidden.rb +9 -0
- data/lib/digicert/errors/request_error.rb +37 -0
- data/lib/digicert/errors/server_error.rb +9 -0
- data/lib/digicert/errors/unauthorized.rb +9 -0
- data/lib/digicert/expiring_order.rb +21 -0
- data/lib/digicert/findable.rb +33 -0
- data/lib/digicert/order.rb +81 -0
- data/lib/digicert/order_cancellation.rb +25 -0
- data/lib/digicert/order_duplicator.rb +11 -0
- data/lib/digicert/order_manager.rb +39 -0
- data/lib/digicert/order_reissuer.rb +11 -0
- data/lib/digicert/organization.rb +43 -0
- data/lib/digicert/product.rb +14 -0
- data/lib/digicert/request.rb +123 -0
- data/lib/digicert/response.rb +30 -0
- data/lib/digicert/ssl_certificate/base.rb +9 -0
- data/lib/digicert/ssl_certificate/ssl_ev_plus.rb +13 -0
- data/lib/digicert/ssl_certificate/ssl_plus.rb +13 -0
- data/lib/digicert/ssl_certificate/ssl_wildcard.rb +13 -0
- data/lib/digicert/version.rb +23 -1
- data/spec/acceptance/certificate_download_spec.rb +68 -0
- data/spec/acceptance/duplicating_certificate_spec.rb +86 -0
- data/spec/acceptance/reissuing_certificate_spec.rb +104 -0
- data/spec/digicert/actions/all_spec.rb +26 -0
- data/spec/digicert/actions/create_spec.rb +47 -0
- data/spec/digicert/actions/fetch_spec.rb +28 -0
- data/spec/digicert/actions/update_spec.rb +39 -0
- data/spec/digicert/certificate_downloader_spec.rb +89 -0
- data/spec/digicert/certificate_request_spec.rb +49 -0
- data/spec/digicert/certificate_spec.rb +93 -0
- data/spec/digicert/client_certificate/digital_signature_plus_spec.rb +32 -0
- data/spec/digicert/client_certificate/email_security_plus_spec.rb +36 -0
- data/spec/digicert/client_certificate/premium_spec.rb +34 -0
- data/spec/digicert/config_spec.rb +39 -0
- data/spec/digicert/container_spec.rb +44 -0
- data/spec/digicert/container_template_spec.rb +32 -0
- data/spec/digicert/csr_generator_spec.rb +31 -0
- data/spec/digicert/domain_spec.rb +89 -0
- data/spec/digicert/duplicate_certificate_finder_spec.rb +27 -0
- data/spec/digicert/duplicate_certificate_spec.rb +15 -0
- data/spec/digicert/email_validation_spec.rb +26 -0
- data/spec/digicert/expiring_order_spec.rb +16 -0
- data/spec/digicert/findable_spec.rb +19 -0
- data/spec/digicert/order_cancellation_spec.rb +24 -0
- data/spec/digicert/order_duplicator_spec.rb +35 -0
- data/spec/digicert/order_reissuer_spec.rb +35 -0
- data/spec/digicert/order_spec.rb +134 -0
- data/spec/digicert/organization_spec.rb +61 -0
- data/spec/digicert/product_spec.rb +28 -0
- data/spec/digicert/request_spec.rb +47 -0
- data/spec/digicert/ssl_certificate/ssl_ev_plus_spec.rb +35 -0
- data/spec/digicert/ssl_certificate/ssl_plus_spec.rb +36 -0
- data/spec/digicert/ssl_certificate/ssl_wildcard_spec.rb +35 -0
- data/spec/fixtures/certificate.pem +79 -0
- data/spec/fixtures/certificate.zip +0 -0
- data/spec/fixtures/certificate_request.json +116 -0
- data/spec/fixtures/certificate_requests.json +59 -0
- data/spec/fixtures/certificate_revoked.json +13 -0
- data/spec/fixtures/container.json +15 -0
- data/spec/fixtures/container_created.json +3 -0
- data/spec/fixtures/container_template.json +15 -0
- data/spec/fixtures/container_templates.json +14 -0
- data/spec/fixtures/containers.json +14 -0
- data/spec/fixtures/domain.json +71 -0
- data/spec/fixtures/domain_created.json +3 -0
- data/spec/fixtures/domains.json +49 -0
- data/spec/fixtures/email_validations.json +17 -0
- data/spec/fixtures/empty.json +0 -0
- data/spec/fixtures/errors.json +6 -0
- data/spec/fixtures/expiring_orders.json +20 -0
- data/spec/fixtures/order.json +107 -0
- data/spec/fixtures/order_created.json +9 -0
- data/spec/fixtures/order_duplicated.json +8 -0
- data/spec/fixtures/order_duplications.json +57 -0
- data/spec/fixtures/order_reissued.json +8 -0
- data/spec/fixtures/orders.json +93 -0
- data/spec/fixtures/organization.json +35 -0
- data/spec/fixtures/organization_created.json +3 -0
- data/spec/fixtures/organizations.json +84 -0
- data/spec/fixtures/ping.json +3 -0
- data/spec/fixtures/product.json +71 -0
- data/spec/fixtures/products.json +100 -0
- data/spec/fixtures/rsa4096.key +51 -0
- data/spec/requests/certificate_duplication_spec.rb +41 -0
- data/spec/requests/certificate_generation_spec.rb +93 -0
- data/spec/requests/certificate_reissuing_spec.rb +38 -0
- data/spec/requests/container_management_spec.rb +36 -0
- data/spec/requests/domain_management_spec.rb +64 -0
- data/spec/requests/order_client_email_security_plus_spec.rb +38 -0
- data/spec/requests/order_management_spec.rb +24 -0
- data/spec/requests/order_ssl_ev_plus_spec.rb +57 -0
- data/spec/requests/order_ssl_wildcard_spec.rb +57 -0
- data/spec/requests/organization_management_spec.rb +22 -0
- data/spec/requests/product_management_spec.rb +24 -0
- data/spec/requests/request_management_spec.rb +24 -0
- data/spec/spec_helper.rb +35 -0
- data/spec/support/fake_digicert_api.rb +324 -0
- metadata +162 -5
@@ -0,0 +1,59 @@
|
|
1
|
+
{
|
2
|
+
"requests": [
|
3
|
+
{
|
4
|
+
"id": 1,
|
5
|
+
"date": "2014-08-19T18:16:07+00:00",
|
6
|
+
"type": "new_request",
|
7
|
+
"status": "pending",
|
8
|
+
"requester": {
|
9
|
+
"id": 151435,
|
10
|
+
"first_name": "Clive",
|
11
|
+
"last_name": "Collegedean",
|
12
|
+
"email": "clivecollegedean@digicert.com"
|
13
|
+
},
|
14
|
+
"processor": {
|
15
|
+
"id": 154478,
|
16
|
+
"first_name": "John",
|
17
|
+
"last_name": "Smith",
|
18
|
+
"email": "john.smith@digicert.com"
|
19
|
+
},
|
20
|
+
"order": {
|
21
|
+
"id": 542757,
|
22
|
+
"certificate": {
|
23
|
+
"common_name": "www.example.com"
|
24
|
+
},
|
25
|
+
"organization": {
|
26
|
+
"id": 123456,
|
27
|
+
"name": "DigiCert Inc"
|
28
|
+
},
|
29
|
+
"container": {
|
30
|
+
"id": 5,
|
31
|
+
"name": "College of Science"
|
32
|
+
},
|
33
|
+
"product": {
|
34
|
+
"name_id": "ssl_plus",
|
35
|
+
"name": "SSL Plus",
|
36
|
+
"type": "ssl_certificate"
|
37
|
+
}
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"id": 2,
|
42
|
+
"date": "2014-08-19T18:16:46+00:00",
|
43
|
+
"type": "new_request",
|
44
|
+
"status": "pending",
|
45
|
+
"order": {
|
46
|
+
"id": 542758,
|
47
|
+
"container": {
|
48
|
+
"id": 5,
|
49
|
+
"name": "College of Science"
|
50
|
+
},
|
51
|
+
"product": {
|
52
|
+
"name_id": "ssl_wildcard",
|
53
|
+
"name": "SSL Wildcard",
|
54
|
+
"type": "ssl_certificate"
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
]
|
59
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"id": 1,
|
3
|
+
"date": "2016-02-10T17:06:15+00:00",
|
4
|
+
"type": "revoke",
|
5
|
+
"status": "pending",
|
6
|
+
"requester": {
|
7
|
+
"id": 242140,
|
8
|
+
"first_name": "Jack",
|
9
|
+
"last_name": "White",
|
10
|
+
"email": "j.white@fakeaddy.com"
|
11
|
+
},
|
12
|
+
"comments": "Revoked via API!"
|
13
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"id": 3,
|
3
|
+
"public_id": "c3f355cae8eb30b8d77b7b282686f0c",
|
4
|
+
"name": "Heidelberg University",
|
5
|
+
"description": "Germany University of Heidelberg",
|
6
|
+
"parent_id": 2,
|
7
|
+
"template_id": 3,
|
8
|
+
"ekey": "BR549",
|
9
|
+
"has_logo": false,
|
10
|
+
"is_active": true,
|
11
|
+
"allowed_domain_names": [
|
12
|
+
"abc.xyz",
|
13
|
+
"digicert.com"
|
14
|
+
]
|
15
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
{
|
2
|
+
"id": 1,
|
3
|
+
"is_active": true,
|
4
|
+
"name": "digicert.com",
|
5
|
+
"date_created": "2013-10-17T22:27:42+00:00",
|
6
|
+
"organization": {
|
7
|
+
"id": 117483,
|
8
|
+
"status": "active",
|
9
|
+
"name": "DigiCert, Inc.",
|
10
|
+
"assumed_name": "DigiCert, Inc.",
|
11
|
+
"display_name": "DigiCert, Inc.",
|
12
|
+
"is_active": true
|
13
|
+
},
|
14
|
+
"validations": [
|
15
|
+
{
|
16
|
+
"type": "ev",
|
17
|
+
"name": "EV",
|
18
|
+
"description": "Extended Organization Validation (EV)",
|
19
|
+
"date_created": "2014-08-09T17:04:59+00:00",
|
20
|
+
"validated_until": "2015-08-09T17:04:45+00:00",
|
21
|
+
"status": "active",
|
22
|
+
"dcv_status": "complete",
|
23
|
+
"verified_users": [
|
24
|
+
{
|
25
|
+
"id": 1234,
|
26
|
+
"first_name": "Jane",
|
27
|
+
"last_name": "Doe"
|
28
|
+
}
|
29
|
+
]
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"type": "ov",
|
33
|
+
"name": "OV",
|
34
|
+
"description": "Normal Organization Validation",
|
35
|
+
"status": "pending",
|
36
|
+
"dcv_status": "pending"
|
37
|
+
}
|
38
|
+
],
|
39
|
+
"dcv": {
|
40
|
+
"method": "email",
|
41
|
+
"name_scope": "digicert.com",
|
42
|
+
"dcv_invitations": [
|
43
|
+
{
|
44
|
+
"invitation_id": 1,
|
45
|
+
"email": "postmaster@digicert.com",
|
46
|
+
"source": "base",
|
47
|
+
"date_sent": "2014-08-09T17:04:59+00:00",
|
48
|
+
"name_scope": "digicert.com"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"invitation_id": 2,
|
52
|
+
"email": "webmaster@digicert.com",
|
53
|
+
"source": "base",
|
54
|
+
"date_sent": "2014-08-09T17:04:59+00:00",
|
55
|
+
"name_scope": "digicert.com"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"invitation_id": 3,
|
59
|
+
"email": "janedoe@digicert.com",
|
60
|
+
"source": "whois",
|
61
|
+
"date_sent": "2014-08-09T17:04:59+00:00",
|
62
|
+
"name_scope": "digicert.com"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
},
|
66
|
+
"container": {
|
67
|
+
"id": 3,
|
68
|
+
"name": "Heidelberg University",
|
69
|
+
"is_active": true
|
70
|
+
}
|
71
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{
|
2
|
+
"domains": [
|
3
|
+
{
|
4
|
+
"id": 1,
|
5
|
+
"name": "digicert.com",
|
6
|
+
"date_created": "2013-10-17T22:27:42+00:00",
|
7
|
+
"organization": {
|
8
|
+
"id": 117483,
|
9
|
+
"name": "DigiCert, Inc.",
|
10
|
+
"assumed_name": "Assumed Name Example",
|
11
|
+
"display_name": "DigiCert, Inc. (Assumed Name Example)"
|
12
|
+
},
|
13
|
+
"validations": [
|
14
|
+
{
|
15
|
+
"type": "ov",
|
16
|
+
"name": "OV",
|
17
|
+
"description": "Normal Organization Validation",
|
18
|
+
"status": "pending"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"type": "ev",
|
22
|
+
"name": "EV",
|
23
|
+
"description": "Extended Organization Validation (EV)",
|
24
|
+
"status": "pending"
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"container": {
|
28
|
+
"id": 3,
|
29
|
+
"name": "Heidelberg University"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"id": 2,
|
34
|
+
"name": "testing.com",
|
35
|
+
"date_created": "2013-10-17T22:27:42+00:00",
|
36
|
+
"organization": {
|
37
|
+
"id": 117483,
|
38
|
+
"name": "DigiCert, Inc.",
|
39
|
+
"assumed_name": "Assumed Name Example",
|
40
|
+
"display_name": "DigiCert, Inc. (Assumed Name Example)"
|
41
|
+
},
|
42
|
+
"container": {
|
43
|
+
"id": 3,
|
44
|
+
"name": "Heidelberg University"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
]
|
48
|
+
}
|
49
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"delivery_options": [
|
3
|
+
"browser"
|
4
|
+
],
|
5
|
+
"emails": [
|
6
|
+
{
|
7
|
+
"email": "email@example.com",
|
8
|
+
"status": "validated",
|
9
|
+
"date_emailed": "2013-05-02"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"email": "email2@example2.com",
|
13
|
+
"status": "unvalidated",
|
14
|
+
"date_emailed": "2013-05-02"
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
"expiring_orders": [
|
3
|
+
{
|
4
|
+
"days_expiring": 90,
|
5
|
+
"order_count": 10
|
6
|
+
},
|
7
|
+
{
|
8
|
+
"days_expiring": 60,
|
9
|
+
"order_count": 13
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"days_expiring": 30,
|
13
|
+
"order_count": 3
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"days_expiring": -7,
|
17
|
+
"order_count": 1
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
{
|
2
|
+
"id": 123456789,
|
3
|
+
"certificate": {
|
4
|
+
"id": 112358,
|
5
|
+
"thumbprint": "7D236B54D19D5EACF0881FAF24D51DFE5D23E945",
|
6
|
+
"serial_number": "0669D46CAE79EF684A69777490602485",
|
7
|
+
"common_name": "digicert.com",
|
8
|
+
"dns_names": [
|
9
|
+
"digicert.com"
|
10
|
+
],
|
11
|
+
"date_created": "2014-08-19T18:16:07+00:00",
|
12
|
+
"valid_from": "2014-08-19",
|
13
|
+
"valid_till": "2015-08-19",
|
14
|
+
"csr": "------ [CSR HERE] ------",
|
15
|
+
"organization": {
|
16
|
+
"id": 117483
|
17
|
+
},
|
18
|
+
"organization_units": [
|
19
|
+
"Digicert"
|
20
|
+
],
|
21
|
+
"server_platform": {
|
22
|
+
"id": 45,
|
23
|
+
"name": "nginx",
|
24
|
+
"install_url": "https:\/\/www.digicert.com\/ssl-certificate-installation-nginx.htm",
|
25
|
+
"csr_url": "https:\/\/www.digicert.com\/csr-creation-nginx.htm"
|
26
|
+
},
|
27
|
+
"signature_hash": "sha256",
|
28
|
+
"key_size": 2048,
|
29
|
+
"ca_cert": {
|
30
|
+
"id": "f7slk4shv9s2wr3",
|
31
|
+
"name": "DCert Private CA"
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"status": "approved",
|
35
|
+
"is_renewal": true,
|
36
|
+
"is_renewed": false,
|
37
|
+
"renewed_order_id": 0,
|
38
|
+
"business_unit": "Some Unit",
|
39
|
+
"date_created": "2014-08-19T18:16:07+00:00",
|
40
|
+
"organization": {
|
41
|
+
"name": "DigiCert, Inc.",
|
42
|
+
"display_name": "DigiCert, Inc.",
|
43
|
+
"is_active": true,
|
44
|
+
"city": "Lindon",
|
45
|
+
"state": "Utah",
|
46
|
+
"country": "us"
|
47
|
+
},
|
48
|
+
"disable_renewal_notifications": false,
|
49
|
+
"container": {
|
50
|
+
"id": 5,
|
51
|
+
"name": "College of Science"
|
52
|
+
},
|
53
|
+
"product": {
|
54
|
+
"name_id": "ssl_plus",
|
55
|
+
"name": "SSL Plus",
|
56
|
+
"type": "ssl_certificate",
|
57
|
+
"validation_type": "ov",
|
58
|
+
"validation_name": "OV",
|
59
|
+
"validation_description": "Normal Organization Validation"
|
60
|
+
},
|
61
|
+
"organization_contact": {
|
62
|
+
"first_name": "Some",
|
63
|
+
"last_name": "Guy",
|
64
|
+
"email": "someguy@digicert.com",
|
65
|
+
"telephone": "8015551212"
|
66
|
+
},
|
67
|
+
"technical_contact": {
|
68
|
+
"first_name": "Some",
|
69
|
+
"last_name": "Guy",
|
70
|
+
"email": "someguy@digicert.com",
|
71
|
+
"telephone": "8015551212"
|
72
|
+
},
|
73
|
+
"user": {
|
74
|
+
"id": 153208,
|
75
|
+
"first_name": "Clive",
|
76
|
+
"last_name": "Collegedean",
|
77
|
+
"email": "clivecollegedean@digicert.com"
|
78
|
+
},
|
79
|
+
"requests": [
|
80
|
+
{
|
81
|
+
"id": 1,
|
82
|
+
"date": "2015-01-01T18:20:00+00:00",
|
83
|
+
"type": "new_request",
|
84
|
+
"status": "approved",
|
85
|
+
"comments": "Form autofill"
|
86
|
+
}
|
87
|
+
],
|
88
|
+
"receipt_id": 123892,
|
89
|
+
"cs_provisioning_method": "none",
|
90
|
+
"send_minus_90": true,
|
91
|
+
"send_minus_60": true,
|
92
|
+
"send_minus_30": true,
|
93
|
+
"send_minus_7": true,
|
94
|
+
"send_minus_3": true,
|
95
|
+
"send_plus_7": true,
|
96
|
+
"public_id": "MZv8RhHDVl9R3Ieko3iMX89wvYT3bYPA",
|
97
|
+
"allow_duplicates": false,
|
98
|
+
"user_assignments": [
|
99
|
+
{
|
100
|
+
"id": 153208,
|
101
|
+
"first_name": "Clive",
|
102
|
+
"last_name": "Collegedean",
|
103
|
+
"email": "clivecollegedean@digicert.com"
|
104
|
+
}
|
105
|
+
],
|
106
|
+
"payment_method": "balance"
|
107
|
+
}
|