Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ljagiello/certdump
Certdump with pkcs8 support
https://github.com/ljagiello/certdump
Last synced: 12 days ago
JSON representation
Certdump with pkcs8 support
- Host: GitHub
- URL: https://github.com/ljagiello/certdump
- Owner: ljagiello
- License: mit
- Created: 2017-09-04T22:11:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-05T04:40:23.000Z (over 7 years ago)
- Last Synced: 2024-10-25T05:10:24.098Z (about 2 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Certdump with pkcs8 support
Based off [certdump](https://gist.github.com/tam7t/1b45125ae4de13b3fc6fd0455954c08e) consul-template plugin for writing vault-generated certificates to separate files with support for [PKCS8](https://en.wikipedia.org/wiki/PKCS_8) private key format.
# Usage:
```
certdump
````type` is optional, supported: none(default), pkcs8
Example of use in consul-template:
```
{{ with secret "pki/issue/logstash" "ttl=720h" "common_name=logstash.service.consul" }}
{{ .Data.serial_number }}
{{ .Data.certificate | plugin "certdump" "/srv/ssl/logstash.pem" "logstash" "root" "0444" }}
{{ .Data.private_key | plugin "certdump" "/srv/ssl/logstash-key.pem" "logstash" "root" "0400" }}
{{ .Data.private_key | plugin "certdump" "/srv/ssl/logstash-key-pkcs8.pem" "logstash" "root" "0400" "pkcs8" }}
{{ .Data.issuing_ca | plugin "certdump" "/srv/ssl/logstash-ca.pem" "root" "root" "0444" }}
{{ end }}
```# `certdump` build:
```
go get -v -t -d ./...
go build certdump.go
```