summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE.txt14
-rw-r--r--doc/note/ssh/_SeeAlsoTls0
-rw-r--r--doc/note/tls/_SeeAlsoSsh0
-rw-r--r--doc/note/tls/tls.txt34
4 files changed, 48 insertions, 0 deletions
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..b9e20aa
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,14 @@
+
+Copyright (c) 2022 Andreas Fankhauser
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/doc/note/ssh/_SeeAlsoTls b/doc/note/ssh/_SeeAlsoTls
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/note/ssh/_SeeAlsoTls
diff --git a/doc/note/tls/_SeeAlsoSsh b/doc/note/tls/_SeeAlsoSsh
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/note/tls/_SeeAlsoSsh
diff --git a/doc/note/tls/tls.txt b/doc/note/tls/tls.txt
new file mode 100644
index 0000000..ce1e305
--- /dev/null
+++ b/doc/note/tls/tls.txt
@@ -0,0 +1,34 @@
+
+TLS Key Management
+==================
+
+WARN: Nothing useful here. Just some nonsense copy-pasta lines.
+
+
+## Create new server PEM cert
+
+```sh
+openssl genrsa -out path/to/private/key 2048
+```
+
+```sh
+openssl req -new -key path/to/private/key -new -nodes -x509 -days 42 -out path/to/certSignRequest.csr -subj "/C=/ST=/L=/O=/OU=/CN=example.com"
+```
+
+```sh
+openssl x509 -req -days 42 -in path/to/certSignRequest.csr -signkey path/to/private/key -out path/to/cert.crt
+```
+
+```sh
+cat path/to/private/key path/to/cert.crt > path/to/cert.pem
+```
+
+
+## TLS debugging
+
+```sh
+socat OPENSSL-LISTEN:1234,reuseaddr,cert=server.pem tcp-connect:127.0.0.1:1235
+```
+
+HINT: Add option 'fork' to ssl sock to serve multiple requests.
+