Commit 5728982a authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Enable running two freeDiameter instances on a single host

parent ab074fe3
# -------- Test configuration ---------
Identity = "peer1.localdomain";
Realm = "localdomain";
# Port = 3868;
# SecPort = 3869;
TLS_Cred = "peer1.cert.pem",
"peer1.key.pem";
TLS_CA = "cacert.pem";
LoadExtension = "extensions/test_app.fdx" : "test_app1.conf";
ConnectPeer = "peer2.localdomain" { ConnectTo = "127.0.0.1"; No_TLS; port = 30868; };
# -------- Test configuration ---------
Identity = "peer2.localdomain";
Realm = "localdomain";
Port = 30868;
SecPort = 30869;
TLS_Cred = "peer2.cert.pem",
"peer2.key.pem";
TLS_CA = "cacert.pem";
LoadExtension = "extensions/test_app.fdx" : "test_app2.conf";
ConnectPeer = "peer1.localdomain" { ConnectTo = "127.0.0.1"; No_TLS; };
rm -rf demoCA
mkdir demoCA
echo 01 > demoCA/serial
touch demoCA/index.txt
# CA self certificate
openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out cacert.pem -keyout cakey.pem -subj /CN=ca.localdomain/C=FR/ST=BdR/L=Aix/O=fD/OU=Tests
#peer1
openssl genrsa -out peer1.key.pem 1024
openssl req -new -batch -out peer1.csr.pem -key peer1.key.pem -subj /CN=peer1.localdomain/C=FR/ST=BdR/L=Aix/O=fD/OU=Tests
openssl ca -cert cacert.pem -keyfile cakey.pem -in peer1.csr.pem -out peer1.cert.pem -outdir . -batch
#peer2
openssl genrsa -out peer2.key.pem 1024
openssl req -new -batch -out peer2.csr.pem -key peer2.key.pem -subj /CN=peer2.localdomain/C=FR/ST=BdR/L=Aix/O=fD/OU=Tests
openssl ca -cert cacert.pem -keyfile cakey.pem -in peer2.csr.pem -out peer2.cert.pem -outdir . -batch
......@@ -488,7 +488,7 @@ peerparams: /* empty */
}
if (ret) { yyerror (&yylloc, conf, gai_strerror(ret)); YYERROR; }
CHECK_FCT_DO( fd_ep_add_merge( &fddpi.pi_endpoints, ai->ai_addr, ai->ai_addrlen, EP_FL_CONF | disc ), YYERROR );
CHECK_FCT_DO( fd_ep_add_merge( &fddpi.pi_endpoints, ai->ai_addr, ai->ai_addrlen, EP_FL_CONF | (disc ?: EP_ACCEPTALL) ), YYERROR );
free($4);
freeaddrinfo(ai);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment