Demo entry 6633592

1

   

Submitted by anonymous on Aug 04, 2017 at 03:09
Language: Tcl. Code size: 2.7 kB.

    set cmd(_signroot) {openssl req -new -x509 -days 3650 -config config.cfg -key ca.key -passin pass:$attr(*password) -out ca.crt}
    set cmd(_srv_sign) {openssl ca -batch -notext -passin pass:$attr(*password) -config config.cfg -out $attr(fn).crt -infiles $attr(fn).csr}
    set cmd(_client_sign) {openssl ca -batch -notext -passin pass:$attr(*password) -config config.cfg -out $attr(fn).crt -infiles $attr(fn).csr}
    set cmd(_client_revoke) {openssl ca -config config.cfg -passin pass:$attr(*password) -revoke $attr(fn).crt}
    set cmd(_export_pkcs12) {openssl pkcs12 -export -in "$attr(fn).crt" -inkey "$attr(fn).key" -certfile ca.crt -name "$attr(username)" -caname "$attr(caname)" -out "$attr(fn).p12" -passout pass:$attr(*password)}
    set cmd(_gencrl) {openssl ca -config config.cfg -gencrl -passin pass:$attr(*password) | openssl crl -outform DER -out "$attr(fn).crl"}
    set cmd(_cert_revoke) {openssl ca -config config.cfg -passin pass:$attr(*password) -revoke $attr(fn)}
    set cmd(newroot) {openssl genrsa -des3 -passout pass:$attr(*password) -out ca.key 1024}
    set cmd(signroot) {openssl req -new -x509 -days 3650 -config config.cfg -key ca.key -passin env:password -out ca.crt}
    set cmd(srv_key) {openssl genrsa -out $attr(fn).key 1024}
    set cmd(srv_req) {openssl req -new -config config.cfg -key $attr(fn).key -out $attr(fn).csr}
    set cmd(srv_sign) {openssl ca -batch -notext -passin env:password -config config.cfg -out $attr(fn).crt -infiles $attr(fn).csr}
    set cmd(srv_revoke) {openssl ca -config config.cfg -passin pass:$attr(*password) -revoke $attr(fn).crt}
    set cmd(client_key) {openssl genrsa -out $attr(fn).key 1024}
    set cmd(client_req) {openssl req -new -config config.cfg -key $attr(fn).key -out $attr(fn).csr}
    set cmd(client_sign) {openssl ca -batch -notext -passin env:password -config config.cfg -out $attr(fn).crt -infiles $attr(fn).csr}
    set cmd(client_revoke) {openssl ca -config config.cfg -passin env:password -revoke $attr(fn).crt}
    set cmd(export_pkcs12) {openssl pkcs12 -export -in "$attr(fn).crt" -inkey "$attr(fn).key" -certfile ca.crt -name "$attr(username)" -caname "$attr(caname)" -out "$attr(fn).p12" -passout env:password}
    set cmd(gencrl) {openssl ca -config config.cfg -gencrl -passin env:password | openssl crl -outform DER -out "$attr(fn).crl"}
    set cmd(cert_revoke) {openssl ca -config config.cfg -passin env:password -revoke $attr(fn)}
    set cmd(cert_view) {openssl x509 -text -in $attr(fn)}

    set cmd(csr_read) {openssl req -text -in "$filename" -out "req.txt"}
    set cmd(crt_read) {openssl x509 -noout -subject -in "$filename"}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).