#!/bin/bash

if [ "$1" == "" ]; then
	echo "usage: $0 domain.tld"
	exit 3
else
	KN=$1
	openssl req -nodes -newkey rsa:2048 -nodes -keyout $KN-key.pem -out $KN.csr -subj "/C=HU/ST=Budapest/L=Budapest/O=3Gteam Kft./OU=internet/CN=$KN"
	touch $KN-cert.pem
	cat $KN.csr
fi
