Skip to content

Commit e05f92b

Browse files
author
Dave Cramer
committed
removed Override to compile with java 1.4 added extra docs for ssl from Mikko Tiihonen
1 parent 59fcdac commit e05f92b

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

certdir/README

+13
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,18 @@ cp server.crt ../goodroot.crt
4040
#Common name is localhost, no password
4141

4242
The subdirectory server contains what should be copied to the PGDATA directory.
43+
If you do not overwrite the pg_hba.conf then remember to comment out all lines
44+
starting with "host all".
4345

4446
For the tests the sslinfo module must be installed into every database.
47+
The ssl=on must be set in postgresql.conf
48+
49+
The following command creates the databases and installs the sslinfo module.
50+
51+
for db in hostssldb hostnossldb certdb hostsslcertdb; do
52+
createdb $db
53+
psql $db -c "create extension sslinfo"
54+
done
55+
56+
The username for connecting to postgres as specified in build.local.properties tests has to be "test".
57+

org/postgresql/ssl/LazyKeyManager.java

-6
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public void throwKeyManagerException() throws PSQLException
7575
if (error!=null) throw error;
7676
}
7777

78-
@Override
7978
public String chooseClientAlias(String[] keyType, Principal[] issuers,
8079
Socket socket) {
8180
if (certfile==null)
@@ -105,13 +104,11 @@ public String chooseClientAlias(String[] keyType, Principal[] issuers,
105104
}
106105
}
107106

108-
@Override
109107
public String chooseServerAlias(String keyType, Principal[] issuers,
110108
Socket socket) {
111109
return null; //We are not a server
112110
}
113111

114-
@Override
115112
public X509Certificate[] getCertificateChain(String alias) {
116113
if (cert==null && certfile!=null) //If certfile is null, we do not load the certificate
117114
{ //The certificate must be loaded
@@ -145,13 +142,11 @@ public X509Certificate[] getCertificateChain(String alias) {
145142
return cert;
146143
}
147144

148-
@Override
149145
public String[] getClientAliases(String keyType, Principal[] issuers) {
150146
String alias = chooseClientAlias(new String[]{keyType}, issuers, (Socket)null);
151147
return (alias==null ? new String[]{} : new String[]{alias});
152148
}
153149

154-
@Override
155150
public PrivateKey getPrivateKey(String alias) {
156151
try
157152
{
@@ -244,7 +239,6 @@ public PrivateKey getPrivateKey(String alias) {
244239
return key;
245240
}
246241

247-
@Override
248242
public String[] getServerAliases(String keyType, Principal[] issuers) {
249243
return new String[]{};
250244
}

org/postgresql/ssl/LibPQFactory.java

-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ public ConsoleCallbackHandler(String password)
216216
* @throws UnsupportedCallbackException If the console is not available
217217
* or other than PasswordCallback is supplied
218218
*/
219-
@Override
220219
public void handle(Callback[] callbacks) throws IOException,
221220
UnsupportedCallbackException {
222221
Console cons = System.console();
@@ -251,7 +250,6 @@ public void handle(Callback[] callbacks) throws IOException,
251250
* @param session The SSL session.
252251
* @returns true if the certificate belongs to the server, false otherwise.
253252
*/
254-
@Override
255253
public boolean verify(String hostname, SSLSession session) {
256254
X509Certificate[] peerCerts;
257255
try

0 commit comments

Comments
 (0)