# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// certutil -urlcache * delete | |
// certutil -verify -user -urlfetch "Server Certificate.cer" | |
package main | |
import ( | |
"crypto" | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/tls" | |
"crypto/x509" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo MFIwUKADAgEAMEkwRzBFMAkGBSsOAwIaBQAEFNHxtXb57sDBD3r8fDEkqcNiXXxhBBTqTnzUgC3lFYGGJoyCbcCYpM+XDwIMPVGgldv/1vnVuWtZ | base64 --decode > ocsp.req | |
# Print OCSP request | |
openssl ocsp -text -reqin ocsp.req | |
# Make OCSP request | |
curl -v -o ocsp.resp --data-binary @ocsp.req -H "Content-Type: application/ocsp-request" --url http://ocsp.example.com/ca1 --header "Host: ocsp.example.com" | |
# Print OCSP response | |
openssl ocsp -noverify -text -respin ocsp.resp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make an OCSP request with CURL using the issuer certificate and serial number | |
openssl ocsp -noverify -no_nonce -respout ocsp.resp -reqout ocsp.req -issuer issuer.pem -serial "0x11219f92c6b10baba606ac6c7eb0474898f6" -text -url http://ocsp.example.com -header 'Host=ocsp.example.com' | |
# Replay the OCSP request via CURL showing request and response headers for debugggin | |
curl -v -o curl.resp --data-binary @ocsp.req -H "Content-Type: application/ocsp-request" --url http://ocsp.example.com/ca1 --header "Host=ocsp.example.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 1 ]; then | |
echo | |
echo "No hostname given to obtain certificate status" | |
echo "\tuse: $0 www.example.com" | |
echo | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure that this script runs with the time zone GMT | |
export TZ=GMT | |
config="crl-cache-headers.conf" | |
# swap the root directy every reload to make sure that | |
# the config alines with the files actually served | |
curdir=`cat lastroot.txt` | |
newdir=`expr $curdir + 1` | |
olddir=`expr $curdir - 1` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Just a quick and dirty API example for DNS verification | |
*/ | |
error_reporting(E_ALL); | |
/* | |
* Create a Private key | |
*/ | |
$dn = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph: | |
def __init__(self): | |
self.nodes = set() | |
self.edges = defaultdict(list) | |
self.distances = {} | |
def add_node(self, value): | |
self.nodes.add(value) | |
def add_edge(self, from_node, to_node, distance): |
NewerOlder