Skip to content

Commit 4014c3d

Browse files
author
Madeny Diawara
committed
a_user_can_generate_root_certificate_key
1 parent 6ab6502 commit 4014c3d

39 files changed

Lines changed: 2731 additions & 0 deletions

.circleci/config.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# PHP CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-php/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
docker:
9+
# specify the version you desire here
10+
# - image: circleci/php:7.1.5-browsers
11+
- image: circleci/php:7.1-browsers
12+
13+
# Specify service dependencies here if necessary
14+
# CircleCI maintains a library of pre-built images
15+
# documented at https://circleci.com/docs/2.0/circleci-images/
16+
# - image: circleci/mysql:9.4
17+
18+
working_directory: ~/repo
19+
20+
steps:
21+
- checkout
22+
- run: sudo composer self-update
23+
24+
# Download and cache dependencies
25+
- restore_cache:
26+
keys:
27+
- v1-dependencies-{{ checksum "composer.json" }}
28+
# fallback to using the latest cache if no exact match is found
29+
- v1-dependencies-
30+
31+
- run: composer install -n --prefer-dist
32+
33+
34+
- save_cache:
35+
paths:
36+
- ./vendor
37+
key: v1-dependencies-{{ checksum "composer.json" }}
38+
39+
# run tests!
40+
- run: php lh create --a
41+
- run: ./vendor/bin/phpunit

.env

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# .env
2+
#Subject information
3+
R="[req]"
4+
D="default_bits = 2048"
5+
P="prompt = no"
6+
DM="default_md = sha256"
7+
DN="distinguished_name = dn"
8+
D2="[dn]"
9+
COUNTRY=C=LH
10+
STATE="ST=LC"
11+
LOCALITY=L="Local Citry"
12+
ORGANIZATION=O=LOCALHTTPS
13+
ORGANIZATION_UNIT=OU="localhttps"
14+
EMAILADDRESS=emailAddress=local@https.local
15+
COMMONNAME=CN=com.local.https
16+

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/vendor/
2+
/deply/
3+
/.readme
4+
/goundo.md.conf
5+
/issuer.conf
6+
/rootCA.key
7+
/rootCa.pem
8+
/rootCA.srl
9+
/server.csr
10+
/server.key
11+
/v3.ext

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: php
2+
3+
sudo: required
4+
addons:
5+
apt:
6+
packages:
7+
- nginx
8+
php:
9+
- 7.1
10+
- 7.2
11+
- nightly
12+
env:
13+
global:
14+
- COMPOSER_NO_INTERACTION=1
15+
16+
matrix:
17+
allow_failures:
18+
- php: nightly
19+
install:
20+
- composer install --prefer-dist --no-suggest
21+
22+
# before_script:
23+
# - composer self-update
24+
# - composer install --no-interaction
25+
26+
script:
27+
- ./vendor/bin/phpunit

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Eeasycert for local development.
2+
* Create a working https on your local develoment environment with just simple command.
3+
4+
[![Build Status](https://travis-ci.com/madeny/Eeasycert.svg?token=RmC2K1VgxXSGWfCGmK5e&branch=master)](https://travis-ci.com/madeny/Eeasycert)[![CircleCI](https://circleci.com/gh/CircleCI-Public/circleci-demo-php-laravel.svg?style=svg)](https://circleci.com/gh/madeny/Eeasycert)
5+
6+
<!-- https://circleci.com/gh/madeny/Eeasycert -->
7+

cert/cnf/openssl.cnf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[req]
2+
default_bits = 2048
3+
prompt = no
4+
default_md = sha256
5+
distinguished_name = dn
6+
[dn]
7+
C=LH
8+
ST=LC
9+
L=Local Citry
10+
O=LOCALHTTPS
11+
OU=localhttps
12+
emailAddress=local@https.local
13+
CN=com.local.https

cert/cnf/v3.ext

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
authorityKeyIdentifier=keyid,issuer
2+
basicConstraints=CA:FALSE
3+
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
4+
subjectAltName = @alt_names
5+
[alt_names]
6+
DNS.1 = lhttps.md
7+
DNS.2 = www.lhttps.md

cert/config/default.conf

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
server {
2+
3+
if ($host = goundo.md) {
4+
return 301 https://$host$request_uri;
5+
} # managed by EeasyCert
6+
7+
8+
if ($host = www.goundo.md) {
9+
return 301 https://$host$request_uri;
10+
} # managed by EasyCert
11+
12+
listen 80;
13+
root /var/www/html/;
14+
index index.php index.html index.htm;
15+
server_name goundo.md www.goundo.md;
16+
charset utf-8;
17+
}
18+
server {
19+
# SSL configuration
20+
listen 443 ssl http2;
21+
#listen [::]:443 ssl http2;
22+
root /var/www/html;
23+
index index.php index.html index.htm;
24+
server_name goundo.md www.goundo.md;
25+
26+
# for EasyCert Sertificates.
27+
28+
ssl_certificate /home/madeny/EasyCert/easycert/live/domain.com.ssl.crt; # managed by EasyCert
29+
ssl_certificate_key /home/madeny/EasyCert/easycert/live/domain.com.ssl.key; # managed by EasyCert
30+
31+
32+
33+
charset utf-8;
34+
gzip on;
35+
gzip_vary on;
36+
gzip_disable "msie6";
37+
gzip_comp_level 6;
38+
gzip_min_length 1100;
39+
gzip_buffers 16 8k;
40+
gzip_proxied any;
41+
gzip_types
42+
text/plain
43+
text/css
44+
text/js
45+
text/xml
46+
text/javascript
47+
application/javascript
48+
application/x-javascript
49+
application/json
50+
application/xml
51+
application/xml+rss;
52+
location / {
53+
try_files $uri $uri/ /index.php?$query_string;
54+
}
55+
location ~ \.php$ {
56+
try_files $uri /index.php =404;
57+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
58+
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
59+
fastcgi_index index.php;
60+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
61+
include fastcgi_params;
62+
}
63+
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|svg|woff|woff2|ttf)$ {
64+
expires 1M;
65+
access_log off;
66+
add_header Cache-Control "public";
67+
}
68+
location ~* \.(?:css|js)$ {
69+
expires 7d;
70+
access_log off;
71+
add_header Cache-Control "public";
72+
}
73+
location ~ /.well-known {
74+
allow all;
75+
}
76+
location ~ /\.ht {
77+
deny all;
78+
}
79+
80+
81+
}

cert/csr/.csr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-----BEGIN CERTIFICATE REQUEST-----
2+
MIIC0DCCAbgCAQAwgYoxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOWTERMA8GA1UE
3+
BwwITmV3IFlvcmsxEDAOBgNVBAoMB0BtYWRlbnkxEzARBgNVBAsMCm1hZGVueSBp
4+
bmMxGzAZBgkqhkiG9w0BCQEWDG1lQG1hZGVueS5tZTEXMBUGA1UEAwwOY29tLm1h
5+
ZGVueS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDWaSA0m2br
6+
0SREhaDVHDIMciS+ODPdS0RnV4LoePTRLFxzo7/OH+6xDePX+wGilwLO8kNnFywL
7+
BNChxqLyc4K7u0povm04TKqsbYR8GCDkQ9iv9lxRCuEJ1MIquI5LaVbnd4iszUrM
8+
ZBaM6iYLTJQgmLhdW78dfqDvr3j3pwtMlhxepcOOW8fyiEL7peK72QOD0bdNoMeV
9+
/j4OzabUAmm3/0Z3ym+dFNkIjzACiWevMDXdKHjDPH6b9fZH4891SocXCNuXBP7z
10+
H6Wmdm218CXfdvCjtcCQiCSy5nquKh0Ecys5TrOcPmpmefv0Jp9dEQ1sfaMxVlQL
11+
XoM2+um4F7QzAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEAsVNwmhtNREzwMwZm
12+
KzoSSo58iN/QUn6vKvhAFm6/XX+bV6ZR2h6m/yvHnQ193pntfEasPdLH+6gdGn67
13+
JipemCZEF2Pj1Qka8IubthH4KvzJbbDmmVWwv+xJHE3j+WZ6Uh7jhqYtsK/FIhcS
14+
ehxHpYhpscDyIlWzoU7OGXp+mJtOeID8kEuqOZZBaXtYCHsPlNta7Gvr5YxNp+Z4
15+
JVcNsMa5qsJQEihY5VFIgXDeG6uux5sdWBR2O04UcqaPu23Cn0L016qNw8WrOhL9
16+
7Dz6yKsIHgKs9Id1uJOO0fPoprkvKOkN3bmYz0K6eumkdAamfU5p8tc/W2jEn0bC
17+
1cXCog==
18+
-----END CERTIFICATE REQUEST-----

cert/csr/lhttps.md.csr

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-----BEGIN CERTIFICATE REQUEST-----
2+
MIIC3DCCAcQCAQAwgZYxCzAJBgNVBAYTAkxIMQswCQYDVQQIDAJMQzEUMBIGA1UE
3+
BwwLTG9jYWwgQ2l0cnkxEzARBgNVBAoMCkxPQ0FMSFRUUFMxEzARBgNVBAsMCmxv
4+
Y2FsaHR0cHMxIDAeBgkqhkiG9w0BCQEWEWxvY2FsQGh0dHBzLmxvY2FsMRgwFgYD
5+
VQQDDA9jb20ubG9jYWwuaHR0cHMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
6+
AoIBAQCzbCr50nzdYlXY6chiUZAcGlHOpadtHpljzW0QaPX64QkGApRoStQbV4+g
7+
SIENY8TELPgBt+mmT8aRSTI64EdvJFWPt3jSgpmYGipltKZus9omludKeE4ZmWnt
8+
eCvI5YKyg52ITmmG0BSZXJO97ROAA8KbqRfI59BepsHiGiYyiuuGNIwQtsGO3gQD
9+
1dyddRxH5LQ5HCeJtYde19pNW1naq9SsYQr6CE5yAMDuzd4Mb4LyHMXxu4oRTlPe
10+
TqG9ryhHzJwrc3W+MAXWV5mbH374Er8IMZTFPcPS1CDIGRpw015Mw4nRBDf0FMqc
11+
FjaYXZo0A0f5i1O+RZwBlH0+bVCdAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEA
12+
naCEiXcSGPkggYuY2dUrG1VlScxSxAI13P/SjroiCLhkXMq+NI41D0sBd8DaaLlC
13+
HZkvHQ95qzOryiG0tCg/Tr1VPbI1uFbXnDJX7iC1cxHoOH3lg7YFRZr+aE3b7WaS
14+
fTqYaEnhkqG9rcnJ/f42esO7S6ns9nYUTo42N/XN3MUt17ez3eB7WgMmLISb0VAx
15+
wq1zgo3/r6XVsiz+JtMqbhxH2bIBF1SWpYyyU9kNqd/FWrHR23dHmCMK2zmp45cS
16+
Jgp6oKXOb/8IYkXqKgXu6OjjsXu80TivNV/Rnr2hGiLkujbOVJF7xIA0GVXPCe+U
17+
jkmdI3ZMkoZD9X5T7PsPvw==
18+
-----END CERTIFICATE REQUEST-----

0 commit comments

Comments
 (0)