Skip to content

Commit 25e5a49

Browse files
committed
pvxinfo -v show server credentials
1 parent f727be1 commit 25e5a49

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/serverconn.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ std::set<std::string> PeerCredentials::roles() const
3636

3737
std::ostream& operator<<(std::ostream& strm, const PeerCredentials& cred)
3838
{
39+
if(cred.isTLS)
40+
strm<<"TLS ";
3941
strm<<cred.method;
4042
if(!cred.authority.empty())
41-
strm<<cred.authority;
43+
strm<<":"<<cred.authority;
4244
strm<<"/"<<cred.account<<"@"<<cred.peer;
4345
return strm;
4446
}

tools/info.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@ int main(int argc, char *argv[])
7979
std::cout<<"Effective config\n"<<ctxt.config();
8080

8181
std::list<std::shared_ptr<client::Operation>> ops;
82+
std::list<std::shared_ptr<client::Connect>> conns;
8283

8384
std::atomic<int> remaining{argc-optind};
8485
epicsEvent done;
8586

8687
for(auto n : range(optind, argc)) {
88+
if(verbose)
89+
conns.push_back(ctxt.connect(argv[n]).onConnect([](const client::Connected& cb) {
90+
std::cout<<"# "<<(*cb.cred)<<"\n";
91+
}).exec());
8792

8893
ops.push_back(ctxt.info(argv[n])
8994
.result([&argv, n, &remaining, &done](client::Result&& result) {

0 commit comments

Comments
 (0)