Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b846091

Browse filesBrowse files
committed
Make ssl certificate for ssl_passphrase_callback test via Makefile
The recipe was previously given in comments in the module's test script, but now we have an explicit recipe in the Makefile. The now redundant comments in the script are removed. This recipe shouldn't be needed in normal use, as the certificate and key are in git and don't need to be regenerated. Discussion: https://postgr.es/m/ae8f21fc-95cb-c98a-f241-1936133f466f@2ndQuadrant.com
1 parent 42181b1 commit b846091
Copy full SHA for b846091

File tree

Expand file treeCollapse file tree

2 files changed

+19
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+19
-6
lines changed

‎src/test/modules/ssl_passphrase_callback/Makefile

Copy file name to clipboardExpand all lines: src/test/modules/ssl_passphrase_callback/Makefile
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,21 @@ include $(top_srcdir)/contrib/contrib-global.mk
2020
endif
2121

2222
SHLIB_LINK += $(filter -lssl -lcrypto -lssleay32 -leay32, $(LIBS))
23+
24+
# Targets to generate or remove the ssl certificate and key
25+
# Normally not needed. Don't run these targets in a vpath build, the results
26+
# won't be in the right place if you do.
27+
28+
# needs to agree with what's in the test script
29+
PASS = FooBaR1
30+
31+
.PHONY: ssl-files ssl-files-clean
32+
33+
ssl-files:
34+
openssl req -new -x509 -days 10000 -nodes -out server.crt \
35+
-keyout server.ckey -subj "/CN=localhost"
36+
openssl rsa -aes256 -in server.ckey -out server.key -passout pass:$(PASS)
37+
rm server.ckey
38+
39+
ssl-files-clean:
40+
rm -f server.crt server.key

‎src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl

Copy file name to clipboardExpand all lines: src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@
1515
my $clearpass = "FooBaR1";
1616
my $rot13pass = "SbbOnE1";
1717

18-
# self-signed cert was generated like this:
19-
# system('openssl req -new -x509 -days 10000 -nodes -out server.crt -keyout server.ckey -subj "/CN=localhost"');
20-
# add the cleartext passphrase to the key, remove the unprotected key
21-
# system("openssl rsa -aes256 -in server.ckey -out server.key -passout pass:$clearpass");
22-
# unlink "server.ckey";
23-
18+
# see the Makefile for how the certificate and key have been generated
2419

2520
my $node = get_new_node('main');
2621
$node->init;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.