From 59354d66ca3ca5a8665135522eeb6311e444efa9 Mon Sep 17 00:00:00 2001 From: Ren RenJuan Date: Fri, 10 Jan 2014 01:55:41 +0000 Subject: [PATCH] * --- ACTK1_0/session/TLSSocket.cpp | 11 ++++++----- AusRegCliever/Makefile | 2 -- AusRegCliever/server/masterDaemon.cpp | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ACTK1_0/session/TLSSocket.cpp b/ACTK1_0/session/TLSSocket.cpp index da83aa1..e42d26f 100644 --- a/ACTK1_0/session/TLSSocket.cpp +++ b/ACTK1_0/session/TLSSocket.cpp @@ -38,6 +38,12 @@ TLSSocket::TLSSocket(SSL_CTX* ctx, int sock, const string& host, throw e; } + // Common name + char cn[256]; + X509 *peer = SSL_get_peer_certificate(ssl); + X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, cn, 256); + commonName = cn; + if ((ret = SSL_get_verify_result(ssl)) != X509_V_OK) {char why[100]; sprintf(why,"Cert verify fail: %d",ret); @@ -46,11 +52,6 @@ TLSSocket::TLSSocket(SSL_CTX* ctx, int sock, const string& host, throw e; } - // Common name - char cn[256]; - X509 *peer = SSL_get_peer_certificate(ssl); - X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, cn, 256); - commonName = cn; X509_free(peer); } diff --git a/AusRegCliever/Makefile b/AusRegCliever/Makefile index 0cc90cd..34da321 100644 --- a/AusRegCliever/Makefile +++ b/AusRegCliever/Makefile @@ -55,9 +55,7 @@ ARTKDEPS = -L$(ARTK_LIB_DIR) -lACTK1_0 \ # --- targets # -ifeq ($(LOCATION),authoring) all: cliever -endif cliever: build/drde-cliever diff --git a/AusRegCliever/server/masterDaemon.cpp b/AusRegCliever/server/masterDaemon.cpp index 2ee7d46..ce5b141 100644 --- a/AusRegCliever/server/masterDaemon.cpp +++ b/AusRegCliever/server/masterDaemon.cpp @@ -126,7 +126,7 @@ void masterDaemon::dispatch(const mdIncoming &what) { int masterDaemon::initAusRegTK(void) { int rc=OK; - const std::string nil("/etc/site.properties"); + const std::string nil("etc/toolkit2.conf"); try {