This commit is contained in:
Ren RenJuan 2014-01-10 01:55:41 +00:00
parent f9f0216f3f
commit 59354d66ca
3 changed files with 7 additions and 8 deletions

View File

@ -38,6 +38,12 @@ TLSSocket::TLSSocket(SSL_CTX* ctx, int sock, const string& host,
throw e; 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) if ((ret = SSL_get_verify_result(ssl)) != X509_V_OK)
{char why[100]; sprintf(why,"Cert verify fail: %d",ret); {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; 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); X509_free(peer);
} }

View File

@ -55,9 +55,7 @@ ARTKDEPS = -L$(ARTK_LIB_DIR) -lACTK1_0 \
# --- targets # --- targets
# #
ifeq ($(LOCATION),authoring)
all: cliever all: cliever
endif
cliever: build/drde-cliever cliever: build/drde-cliever

View File

@ -126,7 +126,7 @@ void masterDaemon::dispatch(const mdIncoming &what) {
int masterDaemon::initAusRegTK(void) { int masterDaemon::initAusRegTK(void) {
int rc=OK; int rc=OK;
const std::string nil("/etc/site.properties"); const std::string nil("etc/toolkit2.conf");
try { try {