diff --git a/nlsr_km.c b/nlsr_km.c
index 995db18..a6d7347 100644
--- a/nlsr_km.c
+++ b/nlsr_km.c
@@ -176,7 +176,7 @@
 */
 
 int 
-verify_key(const unsigned char *ccnb,size_t size, 
+verify_key(const unsigned char *ccnb, 
 										struct ccn_parsed_ContentObject *pco){
 	if ( nlsr->debugging )
 		printf("verify key called\n");
@@ -216,7 +216,7 @@
 					ret=0;
 				}
 				else{
-					ret=verify_key(result->buf,temp_pco.offset[CCN_PCO_E],&temp_pco);
+					ret=verify_key(result->buf,&temp_pco);
 				}
 			}
 		}
diff --git a/nlsr_km.h b/nlsr_km.h
index f509bc8..59847f5 100644
--- a/nlsr_km.h
+++ b/nlsr_km.h
@@ -29,7 +29,7 @@
 struct ccn_charbuf * get_key_name(const unsigned char *ccnb, 
 					struct ccn_parsed_ContentObject *pco);
 
-int verify_key(const unsigned char *ccnb, size_t size, 
+int verify_key(const unsigned char *ccnb, 
 					struct ccn_parsed_ContentObject *pco);
 
 #endif
diff --git a/nlsr_ndn.c b/nlsr_ndn.c
index b907570..4d0df28 100644
--- a/nlsr_ndn.c
+++ b/nlsr_ndn.c
@@ -269,7 +269,7 @@
 	
 
 	int res;
-	struct ccn_charbuf *data=ccn_charbuf_create();
+	//struct ccn_charbuf *data=ccn_charbuf_create();
     	struct ccn_charbuf *name=ccn_charbuf_create();
     	
 
@@ -278,7 +278,7 @@
 	if (res >= 0)
 	{
 		
-
+		/*
 		struct ccn_charbuf *pubid = ccn_charbuf_create();
 		struct ccn_charbuf *pubkey = ccn_charbuf_create();
 
@@ -298,9 +298,23 @@
 
 		char *raw_data=(char *)malloc(20);
 		memset(raw_data,0,20);
-		sprintf(raw_data,"%s", nlsr->lsdb->lsdb_version);	
+		sprintf(raw_data,"%s", nlsr->lsdb->lsdb_version);
+		*/	
 
-		res= ccn_sign_content(nlsr->ccn, data, name, &sp, "info",strlen("info")); 
+		struct ccn_charbuf *resultbuf=ccn_charbuf_create();
+
+		res=sign_content_with_user_defined_keystore(name,
+											resultbuf,
+											"info",
+											strlen("info"),
+											nlsr->keystore_path,
+											nlsr->keystore_passphrase,
+											nlsr->root_key_prefix,
+											nlsr->site_name,
+											nlsr->router_name);
+
+
+		//res= ccn_sign_content(nlsr->ccn, data, name, &sp, "info",strlen("info")); 
 		if(res >= 0)
 		{
 			if ( nlsr->debugging )
@@ -310,7 +324,7 @@
 									" is successful \n");
 
 		}
-    		res=ccn_put(nlsr->ccn,data->buf,data->length);		
+    		res=ccn_put(nlsr->ccn,resultbuf->buf,resultbuf->length);		
 		if(res >= 0)
 		{
 			if ( nlsr->debugging )
@@ -341,13 +355,13 @@
 		}
 
 		free(nbr);
-		free(raw_data);
-		ccn_charbuf_destroy(&sp.template_ccnb);
-		ccn_charbuf_destroy(&pubid);
-		ccn_charbuf_destroy(&pubkey);
+		//free(raw_data);
+		//ccn_charbuf_destroy(&sp.template_ccnb);
+		//ccn_charbuf_destroy(&pubid);
+		//ccn_charbuf_destroy(&pubkey);
 	}
 
-	ccn_charbuf_destroy(&data);
+	//ccn_charbuf_destroy(&data);
 	ccn_charbuf_destroy(&name);
 
 }
@@ -413,7 +427,8 @@
 			if ( nlsr->detailed_logging )
 				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Unverified Content"
 										" Received ..Waiting for verification\n");
-			return CCN_UPCALL_RESULT_VERIFY;
+			//return CCN_UPCALL_RESULT_VERIFY;
+			process_incoming_timed_out_interest(selfp,info);
 	    break;
 
         default:
@@ -484,6 +499,7 @@
 		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_content_info"
 																" called \n");
 
+	int res;
 	struct name_prefix *nbr=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
 	get_nbr(nbr,selfp,info);
 
@@ -495,34 +511,60 @@
 								"ghbor: %s Length:%d\n",nbr->name,nbr->length);
 
 
+	if ( contain_key_name(info->content_ccnb, info->pco) == 1){
+		struct ccn_charbuf *key_name=get_key_name(info->content_ccnb, info->pco);
+		struct ccn_charbuf *orig_router_kn=ccn_charbuf_create();
+		res=get_orig_router_from_key_name(orig_router_kn,key_name);
+		if( res == 0){
+			struct ccn_charbuf *rtr_uri = ccn_charbuf_create();
+			ccn_uri_append(rtr_uri, orig_router_kn->buf,
+													orig_router_kn->length, 0);
+			printf("Orig Router from Key name: %s\n",
+												ccn_charbuf_as_string(rtr_uri));
+					
+			if( strcmp(nbr->name,ccn_charbuf_as_string(rtr_uri)) == 0){
+						
+				int res_verify=verify_key(info->content_ccnb,info->pco);
 
-	update_adjacent_timed_out_zero_to_adl(nbr);	
-	update_adjacent_status_to_adl(nbr,NBR_ACTIVE);
-	print_adjacent_from_adl();
+				if ( res_verify != 0 ){
+					printf("Error in verfiying keys !! :( \n");
+				}
+				else{
+					printf("Key verification is successful :)\n");
+					update_adjacent_timed_out_zero_to_adl(nbr);	
+					update_adjacent_status_to_adl(nbr,NBR_ACTIVE);
+					print_adjacent_from_adl();
 
-
-
-	if(!nlsr->is_build_adj_lsa_sheduled)
-	{
-		if ( nlsr->debugging )
-			printf("Scheduling Build and Install Adj LSA...\n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Scheduling Build and Inst"
-															"all Adj LSA...\n");
-		nlsr->event_build_adj_lsa = ccn_schedule_event(nlsr->sched, 100000, 
+					if(!nlsr->is_build_adj_lsa_sheduled){
+						if ( nlsr->debugging )
+							printf("Scheduling Build and Install Adj LSA...\n");
+						if ( nlsr->detailed_logging )
+							writeLogg(__FILE__,__FUNCTION__,__LINE__,"Scheduling"
+									 "Build and Install Adj LSA...\n");
+						nlsr->event_build_adj_lsa = ccn_schedule_event(
+														nlsr->sched, 100000, 
 										&build_and_install_adj_lsa, NULL, 0);
-		nlsr->is_build_adj_lsa_sheduled=1;		
-	}
-	else
-	{
-		if ( nlsr->debugging )
-			printf("Build and Install Adj LSA already scheduled\n");
-		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Build and Install Adj LSA"
+						nlsr->is_build_adj_lsa_sheduled=1;			
+					}
+					else{
+						if ( nlsr->debugging )
+							printf("Build and Install Adj LSA already scheduled\n");
+						if ( nlsr->detailed_logging )
+							writeLogg(__FILE__,__FUNCTION__,__LINE__,"Build and Install Adj LSA"
 														" already scheduled\n");
+					}
+
+				}
+			}
+			ccn_charbuf_destroy(&rtr_uri);
+		}
+		ccn_charbuf_destroy(&key_name);
+		ccn_charbuf_destroy(&orig_router_kn);	
 	}
 
 
+
+
 	free(nbr);
 
 
diff --git a/nlsr_sync.c b/nlsr_sync.c
index fd884cb..80b0175 100644
--- a/nlsr_sync.c
+++ b/nlsr_sync.c
@@ -249,8 +249,7 @@
 					
 					if( strcmp(orig_router,ccn_charbuf_as_string(rtr_uri)) == 0){
 						
-						int res_verify=verify_key(ptr,pcobuf1.offset[CCN_PCO_E],
-																	&pcobuf1);
+						int res_verify=verify_key(ptr,&pcobuf1);
 
 						if ( res_verify != 0 ){
 							printf("Error in verfiying keys !! :( \n");
@@ -780,6 +779,7 @@
 	ccn_run(temp_ccn, 100);
 	ccn_charbuf_destroy(&name);
 	ccn_destroy(&temp_ccn);
+	ccn_charbuf_destroy(&resultbuf);
 
 	return 0;
 }
