项目作者: pbergman

项目描述 :
certificate authority server for signing, creating and storing certificates
高级语言: Go
项目地址: git://github.com/pbergman/caserver.git
创建时间: 2017-10-10T22:07:41Z
项目社区:https://github.com/pbergman/caserver

开源协议:

下载


CA Server

caserver is a ca (certificate authority) server that can be used for signing, creating and storing certificates.

This was build to easely manage certificates with a program like cuyrl or wget and the generated certificates should be used for development where no host verification or security is needed.

See api docs for examples and endpoint of the server.

Installing

  1. make build
  2. sudo make install

after that you should edit the /etc/caserver.cnf file.

Chrome

to install the ca in chrome you should get the ca cert first:

  1. curl http://127.0.0.1:8080/api/v1/ca > ca.pem

then go to chrome://settings/certificates and in the tab Authorities you can import the
download certificate.

Nginx

create a certificate:

  1. curl -X POST -d 'cn=dev&host=*.dev' http://127.0.0.1:8080/api/v1/cert --output /etc/nginx/ssl/dev.pem

a simple ssl config could be:

  1. server {
  2. listen 443 ssl;
  3. server_name *.dev;
  4. ssl_certificate /etc/nginx/ssl/dev.pem;
  5. ssl_certificate_key /etc/nginx/ssl/dev.pem;
  6. ssl on;
  7. ssl_session_cache builtin:1000 shared:SSL:10m;
  8. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  9. ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
  10. ssl_prefer_server_ciphers on;
  11. location / {
  12. proxy_set_header Host $host;
  13. proxy_set_header X-Real-IP $remote_addr;
  14. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  15. proxy_set_header X-Forwarded-Proto $scheme;
  16. proxy_pass http://localhost:80;
  17. proxy_read_timeout 90;
  18. }
  19. }

Debug

us the —debug flag to output all debug messages. This will also setup the debug routes for the server see pprof