1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
$NetBSD: patch-ac,v 1.2 2016/12/15 23:46:48 joerg Exp $
Add pkgsrc path to openssl.
Don't bother creating SSL keys, they are not installed anyway and should
be created on the target system.
--- tools/autoconf.c.orig 2011-07-14 18:11:35.000000000 +0000
+++ tools/autoconf.c
@@ -290,7 +290,7 @@ int checkssl()
strcat(sysbuf,DN);
system(sysbuf);
#else
- system(CC " tools/chkssl.c -I/usr/local/ssl/include -L/usr/local/ssl/lib -lssl -lcrypto -o tools/chkssl" DN);
+ system(CC " tools/chkssl.c -I/usr/pkg/include -L/usr/pkg/lib -lssl -lcrypto -o tools/chkssl" DN);
#endif
return checkcmp();
}
@@ -394,6 +394,7 @@ int main()
"/usr/sbin/openssl",
"/usr/local/bin/openssl",
"/usr/local/ssl/bin/openssl",
+ "/usr/pkg/bin/openssl",
NULL
};
#endif
@@ -566,7 +567,7 @@ int main()
strcpy(sslbin,sslblist[sslin]);
printf("Yes.\n");
strcpy(sslopt,"-DHAVE_SSL ");
- strcpy(ssllib,"-L/usr/local/ssl/lib -lssl -lcrypto ");
+ strcpy(ssllib,"-L/usr/pkg/lib -lssl -lcrypto ");
}
#else
if(strlen(SSLPATH)+13<sizeof(mbuf))
@@ -625,7 +626,7 @@ int main()
#ifdef SSLPATH
fprintf(makefile,"INCLUDE = -I./src/ -I. -I%sinclude %s %s\n", SSLPATH, mysqlheaders, dnsinc);
#else
- fprintf(makefile,"INCLUDE = -I./src/ -I. -I/usr/local/ssl/include %s %s\n", mysqlheaders, dnsinc);
+ fprintf(makefile,"INCLUDE = -I./src/ -I. -I/usr/pkg/include %s %s\n", mysqlheaders, dnsinc);
#endif
else
fprintf(makefile,"INCLUDE = -I./src/ -I. %s %s\n", mysqlheaders, dnsinc);
@@ -641,25 +642,6 @@ int main()
/* fprintf(makefile," @strip $(TARGET)\n");*/
if(ssl==0)
{
- if(!fexists("key/psybnc.cert.pem")) /* only create, if not exist */
- {
- mkdir("key",0700);
- fprintf(makefile," @echo \"*** GENERATING SSL-KEYS FROM CERTIFICATE **\"\n");
- fprintf(makefile," @echo \"* You will be prompted for Cert-Contents *\"\n");
- fprintf(makefile," @echo \"* This Infos will be used only for SSL *\"\n");
- fprintf(makefile," @echo \"* Alter the informations to your values *\"\n");
- fprintf(makefile," @echo \"* for the sake of correct Cert-Checking *\"\n");
- fprintf(makefile," @echo \"*******************************************\"\n");
- fprintf(makefile," @echo \"Generating certificate request .. \"\n");
- fprintf(makefile," @%s req -new -config src/ssl.cnf -out key/psybnc.req.pem \\\n",sslbin);
- fprintf(makefile," -keyout key/psybnc.key.pem -nodes\n");
- fprintf(makefile," @echo \"Generating self-signed certificate .. \"\n");
- fprintf(makefile," @%s req -x509 -days 365 -in key/psybnc.req.pem \\\n",sslbin);
- fprintf(makefile," -key key/psybnc.key.pem -out key/psybnc.cert.pem\n");
- fprintf(makefile," @echo \"Generating fingerprint ..\"\n");
- fprintf(makefile," @%s x509 -subject -dates -fingerprint -noout \\\n",sslbin);
- fprintf(makefile," -in key/psybnc.cert.pem\n");
- }
if(!fexists("src/ssl.rnd"))
{
sslrnd=fopen("src/ssl.rnd","w");
|