File: regenerate_cert.sh

package info (click to toggle)
libnet-ldap-perl 1%3A0.6500%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,660 kB
  • ctags: 731
  • sloc: perl: 15,059; sh: 76; makefile: 5
file content (17 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#/bin/sh
# regenerate server certificate for the SSL tests

if [ -e openssl.cnf ]; then
	# make sure we have a password-less 2048-bit RSA key
	openssl genrsa -out key.pem 2048 >/dev/null 2>&1

	# create a self-signed certificate with the DN cn=localhost,dc=demo,dc=perl-ldap
	openssl req -config openssl.cnf \
		-new -x509 \
		-key key.pem \
		-out cert.pem \
		-days 365 \
		-subj /domainComponent=perl-ldap/domainComponent=demo/commonName=localhost 
fi

# EOF