Browse Source

2022-09-29/Jerry Wang
[OCPP 1.6] Note: confVersion 22->23
Action:
1. Modify StopTransaction queue logic.
2. Modify StopTxnSampledDataMaxlength and StopTxnAlignedDataMaxlength default value.
3. Improve certificate related functions.

File:
1. EVSE/Modularization/ocppfiles/MessageHandler.c
--> Action 1-3

Jerry Wang 2 years ago
parent
commit
2ddaf9aad3
1 changed files with 179 additions and 81 deletions
  1. 179 81
      EVSE/Modularization/ocppfiles/MessageHandler.c

+ 179 - 81
EVSE/Modularization/ocppfiles/MessageHandler.c

@@ -1221,7 +1221,7 @@ int OCPP_insert_transaction_msg(uint8_t isStartTransaction, char *transactionMsg
 		DEBUG_WARN( "Insert local transaction record error message: %s\n", errMsg);
 	}
 
-	sprintf(sqlStr, "delete from ocpp_transaction_record where (idx < (select idx from ocpp_transaction_record order by idx desc limit 1)-2000) and (occurDatetime < '%04d-01-01 00:00:00');", (getCurrentYear()-3));
+	sprintf(sqlStr, "delete from ocpp_transaction_record where (idx < (select idx from ocpp_transaction_record order by idx desc limit 1)-100) and (occurDatetime < '%04d-01-01 00:00:00');", (getCurrentYear()-3));
 	if (sqlite3_exec(db, sqlStr, 0, 0, &errMsg) != SQLITE_OK)
 	{
 		result = FAIL;
@@ -1831,6 +1831,8 @@ int syncDateTimeRTC(uint8_t *data)
 int parseCertInfo(char *certPath, int parseType, char *data)
 {
 	int result = FAIL;
+	int count = 0;
+	int showupLine = 0;
 	memset(data, 0, ARRAY_SIZE(data));
 	if(access(certPath,F_OK) != -1)
 	{
@@ -1892,43 +1894,105 @@ int parseCertInfo(char *certPath, int parseType, char *data)
 			break;
 
 		case CERT_PARSE_IssuerNameHash:
-			sprintf(temp ,"openssl x509 -noout -issuer -in %s | openssl dgst -%s", certPath, (char*)hashType);
+			sprintf(temp ,"openssl asn1parse -i < %s", certPath);
 			fp = popen(temp, "r");
 			if(fp)
 			{
 				while(fgets(temp, sizeof(temp), fp) != NULL)
 				{
-					if(strstr(temp, "(stdin)=") != NULL)
+					if(strstr(temp, "SEQUENCE") != NULL)
 					{
-						sscanf(temp, "%*[^=]=%s", capturedData);
-						result = PASS;
-						break;
+						count++;
+						if(count==4)
+						{
+							sscanf(temp, "%[^:]", capturedData);
+							showupLine = atoi(capturedData);
+							break;
+						}
 					}
 				}
-				stringtrimspace(capturedData);
-				DEBUG_INFO("issuerNameHash: %s\n", capturedData);
-				sprintf((char*)data, capturedData);
 			}
+
+			if(showupLine > 0)
+			{
+				sprintf(temp ,"openssl asn1parse -i < %s -strparse %d -out /Storage/OCPP/IssuerNameHash", certPath, showupLine);
+				system(temp);
+			}
+			else
+			{
+				break;
+			}
+
+			if(access("/Storage/OCPP/IssuerNameHash",F_OK) != -1)
+			{
+				sprintf(temp ,"openssl %s < /Storage/OCPP/IssuerNameHash", (char*)hashType);
+				fp = popen(temp, "r");
+				if(fp)
+				{
+					while(fgets(temp, sizeof(temp), fp) != NULL)
+					{
+						if(strstr(temp, "(stdin)=") != NULL)
+						{
+							sscanf(temp, "%*[^=]=%s", capturedData);
+							result = PASS;
+							break;
+						}
+					}
+					stringtrimspace(capturedData);
+					DEBUG_INFO("issuerNameHash: %s\n", capturedData);
+					sprintf((char*)data, capturedData);
+				}
+			}
+
 			break;
 
 		case CERT_PARSE_IssuerKeyHash:
-			sprintf(temp ,"openssl x509 -noout -pubkey -in %s | openssl dgst -%s", certPath, (char*)hashType);
+			sprintf(temp ,"openssl asn1parse -i < %s", certPath);
 			fp = popen(temp, "r");
 			if(fp)
 			{
 				while(fgets(temp, sizeof(temp), fp) != NULL)
 				{
-					if(strstr(temp, "(stdin)=") != NULL)
+					if(strstr(temp, "BIT STRING") != NULL)
 					{
-						sscanf(temp, "%*[^=]=%s", capturedData);
-						result = PASS;
+						sscanf(temp, "%[^:]", capturedData);
+						showupLine = atoi(capturedData);
 						break;
 					}
 				}
-				stringtrimspace(capturedData);
-				DEBUG_INFO("issuerKeyHash: %s\n", capturedData);
-				sprintf((char*)data, capturedData);
 			}
+
+			if(showupLine > 0)
+			{
+				sprintf(temp ,"openssl asn1parse -i < %s -strparse %d -out /Storage/OCPP/IssuerKeyHash", certPath, showupLine);
+				system(temp);
+			}
+			else
+			{
+				break;
+			}
+
+			if(access("/Storage/OCPP/IssuerKeyHash",F_OK) != -1)
+			{
+				sprintf(temp ,"openssl %s < /Storage/OCPP/IssuerKeyHash", (char*)hashType);
+				fp = popen(temp, "r");
+				if(fp)
+				{
+					while(fgets(temp, sizeof(temp), fp) != NULL)
+					{
+						if(strstr(temp, "(stdin)=") != NULL)
+						{
+							sscanf(temp, "%*[^=]=%s", capturedData);
+							result = PASS;
+							break;
+						}
+					}
+					stringtrimspace(capturedData);
+					DEBUG_INFO("issuerNameHash: %s\n", capturedData);
+					sprintf((char*)data, capturedData);
+				}
+			}
+
 			break;
 
 		case CERT_PARSE_OcspUrl:
@@ -15754,22 +15818,42 @@ int handleDeleteCertificateRequest(char *uuid, char *payload)
 		DEBUG_INFO("issuerKeyHash: %s\n", ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerKeyHash);
 		DEBUG_INFO("serialNumber: %s\n", ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber);
 
+		for(int i = 0; ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerNameHash[i]; i++)
+		{
+			ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerNameHash[i] = tolower(ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerNameHash[i]);
+		}
+		for(int i = 0; ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerKeyHash[i]; i++)
+		{
+			ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerKeyHash[i] = tolower(ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerKeyHash[i]);
+		}
+		for(int i = 0; ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber[i]; i++)
+		{
+			ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber[i] = tolower(ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber[i]);
+		}
+
 		char temp[256] = {0};
 		char compareData[256] = {0};
 		int  isMatch = TRUE;
 
-		FILE *fp;
+		// Check CentralSystemRootCertificate
 		if(access(ROOTCA_CS,F_OK) != -1)
 		{
-			// Check CentralSystemRootCertificate
 			DEBUG_INFO("Checking CentralSystemRootCertificate...\n");
 			parseCertInfo(ROOTCA_CS, CERT_PARSE_SerialNumber, compareData);
+			for(int i = 0; compareData[i]; i++)
+			{
+				compareData[i] = tolower(compareData[i]);
+			}
 			if(strcmp(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber) != 0)
 				isMatch = FALSE;
 
 			if(isMatch == TRUE)
 			{
 				parseCertInfo(ROOTCA_CS, CERT_PARSE_IssuerNameHash, compareData);
+				for(int i = 0; compareData[i]; i++)
+				{
+					compareData[i] = tolower(compareData[i]);
+				}
 				if(strstr(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerNameHash) == NULL)
 					isMatch = FALSE;
 			}
@@ -15777,13 +15861,18 @@ int handleDeleteCertificateRequest(char *uuid, char *payload)
 			if(isMatch == TRUE)
 			{
 				parseCertInfo(ROOTCA_CS, CERT_PARSE_IssuerKeyHash, compareData);
+				for(int i = 0; compareData[i]; i++)
+				{
+					compareData[i] = tolower(compareData[i]);
+				}
 				if(strstr(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerKeyHash) == NULL)
 					isMatch = FALSE;
 			}
 
 			if(isMatch == TRUE)
 			{
-				sprintf(temp, "rm -f /Storage/OCPP/%s", ROOTCA_CS);
+				DEBUG_INFO("Deleting CentralSystemRootCertificate...\n");
+				sprintf(temp, "rm -f %s", ROOTCA_CS);
 				system(temp);
 				sprintf((char*)ShmOCPP16Data->DeleteCertificate.Response_status, "Accepted");
 				goto End;
@@ -15793,14 +15882,23 @@ int handleDeleteCertificateRequest(char *uuid, char *payload)
 		// Check ManufacturerRootCertificate
 		if(access(ROOTCA_MFG,F_OK) != -1)
 		{
+			DEBUG_INFO("Checking ManufacturerRootCertificate...\n");
 			isMatch = TRUE;
 			parseCertInfo(ROOTCA_MFG, CERT_PARSE_SerialNumber, compareData);
+			for(int i = 0; compareData[i]; i++)
+			{
+				compareData[i] = tolower(compareData[i]);
+			}
 			if(strcmp(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber) != 0)
 				isMatch = FALSE;
 
 			if(isMatch == TRUE)
 			{
 				parseCertInfo(ROOTCA_MFG, CERT_PARSE_IssuerNameHash, compareData);
+				for(int i = 0; compareData[i]; i++)
+				{
+					compareData[i] = tolower(compareData[i]);
+				}
 				if(strstr(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerNameHash) == NULL)
 					isMatch = FALSE;
 			}
@@ -15808,12 +15906,17 @@ int handleDeleteCertificateRequest(char *uuid, char *payload)
 			if(isMatch == TRUE)
 			{
 				parseCertInfo(ROOTCA_MFG, CERT_PARSE_IssuerKeyHash, compareData);
+				for(int i = 0; compareData[i]; i++)
+				{
+					compareData[i] = tolower(compareData[i]);
+				}
 				if(strstr(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerKeyHash) == NULL)
 					isMatch = FALSE;
 			}
 
 			if(isMatch == TRUE)
 			{
+				DEBUG_INFO("Deleting ManufacturerRootCertificate...\n");
 				sprintf(temp, "rm -f %s", ROOTCA_MFG);
 				system(temp);
 				sprintf((char*)ShmOCPP16Data->DeleteCertificate.Response_status, "Accepted");
@@ -15824,51 +15927,33 @@ int handleDeleteCertificateRequest(char *uuid, char *payload)
 		// Check certCP
 		if(access(CERTIFICATE_CP,F_OK) != -1)
 		{
-			isMatch = FALSE;
-			sprintf(temp ,"openssl x509 -noout -serial -in %s", CERTIFICATE_CP);
-			fp = popen(temp, "r");
-			if(fp)
+			DEBUG_INFO("Checking certCP...\n");
+			isMatch = TRUE;
+			parseCertInfo(CERTIFICATE_CP, CERT_PARSE_SerialNumber, compareData);
+			for(int i = 0; compareData[i]; i++)
 			{
-				while(fgets(temp, sizeof(temp), fp) != NULL)
-				{
-					if(strstr(temp, "serial=") != NULL)
-					{
-						DEBUG_INFO("Certificate enddate info: %s\n", temp);
-						sscanf(temp, "%*[^=]=%s", compareData);
-						break;
-					}
-				}
+				compareData[i] = tolower(compareData[i]);
 			}
 			if(strcmp(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber) != 0)
 				isMatch = FALSE;
 
 			if(isMatch == TRUE)
 			{
-				memset(compareData, 0, ARRAY_SIZE(compareData));
-				sprintf(temp ,"openssl x509 -noout -issuer -in %s | openssl dgst -%s", CERTIFICATE_CP, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.hashAlgorithm);
-				fp = popen(temp, "r");
-				if(fp)
+				parseCertInfo(CERTIFICATE_CP, CERT_PARSE_IssuerNameHash, compareData);
+				for(int i = 0; compareData[i]; i++)
 				{
-					while(fgets(temp, sizeof(temp), fp) != NULL)
-					{
-						strcat(compareData, temp);
-					}
+					compareData[i] = tolower(compareData[i]);
 				}
-				if(strstr(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.serialNumber) == NULL)
+				if(strstr(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerNameHash) == NULL)
 					isMatch = FALSE;
 			}
 
 			if(isMatch == TRUE)
 			{
-				memset(compareData, 0, ARRAY_SIZE(compareData));
-				sprintf(temp ,"openssl x509 -noout -pubkey -in %s | openssl dgst -%s", CERTIFICATE_CP, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.hashAlgorithm);
-				fp = popen(temp, "r");
-				if(fp)
+				parseCertInfo(CERTIFICATE_CP, CERT_PARSE_IssuerKeyHash, compareData);
+				for(int i = 0; compareData[i]; i++)
 				{
-					while(fgets(temp, sizeof(temp), fp) != NULL)
-					{
-						strcat(compareData, temp);
-					}
+					compareData[i] = tolower(compareData[i]);
 				}
 				if(strstr(compareData, (char*)ShmOCPP16Data->DeleteCertificate.certificateHashData.issuerKeyHash) == NULL)
 					isMatch = FALSE;
@@ -15876,6 +15961,7 @@ int handleDeleteCertificateRequest(char *uuid, char *payload)
 
 			if(isMatch == TRUE)
 			{
+				DEBUG_INFO("Deleting certCP...\n");
 				sprintf(temp, "rm -f %s", CERTIFICATE_CP);
 				system(temp);
 				sprintf((char*)ShmOCPP16Data->DeleteCertificate.Response_status, "Accepted");
@@ -16028,47 +16114,59 @@ int handleGetInstalledCertificateIdsRequest(char *uuid, char *payload)
 		DEBUG_INFO("Requested Certificate: %s\n", (char*)ShmOCPP16Data->GetInstalledCertificateIds.certificateType);
 		sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_status, "Accepted");
 
+		DEBUG_INFO("Access ROOTCA_CS result: %d\n", access(ROOTCA_CS,F_OK));
+
 		// Check CentralSystemRootCertificate
-		if((strstr((char*)ShmOCPP16Data->GetInstalledCertificateIds.certificateType, "CentralSystemRootCertificate")!= NULL) && (access(ROOTCA_CS,F_OK) != -1))
+		if(strstr((char*)ShmOCPP16Data->GetInstalledCertificateIds.certificateType, "CentralSystemRootCertificate")!= NULL)
 		{
-			char parseData[512] = {0};
-			if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_HashAlgorithm, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].hashAlgorithm, parseData);
+			if(access(ROOTCA_CS,F_OK) != -1)
+			{
+				char parseData[512] = {0};
+				if(parseCertInfo(ROOTCA_CS, CERT_PARSE_HashAlgorithm, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].hashAlgorithm, parseData);
 
-			if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_SerialNumber, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].serialNumber, parseData);
+				if(parseCertInfo(ROOTCA_CS, CERT_PARSE_SerialNumber, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].serialNumber, parseData);
 
-			if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_IssuerNameHash, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerNameHash, parseData);
+				if(parseCertInfo(ROOTCA_CS, CERT_PARSE_IssuerNameHash, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerNameHash, parseData);
 
-			if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_IssuerKeyHash, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerKeyHash, parseData);
-		}
-		else
-		{
-			DEBUG_INFO(">>> No CentralSystemRootCertificate found.\n");
-			sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_status, "NotFound");
+				if(parseCertInfo(ROOTCA_CS, CERT_PARSE_IssuerKeyHash, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerKeyHash, parseData);
+			}
+			else
+			{
+				DEBUG_INFO(">>> No CentralSystemRootCertificate was found.\n");
+				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_status, "NotFound");
+			}
 		}
-
 		// Check ManufacturerRootCertificate
-		if((strstr((char*)ShmOCPP16Data->GetInstalledCertificateIds.certificateType, "ManufacturerRootCertificate") != NULL) && (access(ROOTCA_MFG,F_OK) != -1))
+		else if(strstr((char*)ShmOCPP16Data->GetInstalledCertificateIds.certificateType, "ManufacturerRootCertificate") != NULL)
 		{
-			char parseData[512] = {0};
-			if(parseCertInfo(ROOTCA_MFG, 1, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].hashAlgorithm, parseData);
+			if(access(ROOTCA_MFG,F_OK) != -1)
+			{
+				char parseData[512] = {0};
+				if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_HashAlgorithm, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].hashAlgorithm, parseData);
 
-			if(parseCertInfo(ROOTCA_MFG, 1, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].serialNumber, parseData);
+				if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_SerialNumber, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].serialNumber, parseData);
 
-			if(parseCertInfo(ROOTCA_MFG, 1, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerNameHash, parseData);
+				if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_IssuerNameHash, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerNameHash, parseData);
 
-			if(parseCertInfo(ROOTCA_MFG, 1, parseData) == PASS)
-				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerKeyHash, parseData);
+				if(parseCertInfo(ROOTCA_MFG, CERT_PARSE_IssuerKeyHash, parseData) == PASS)
+					sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_certificateHashData[0].issuerKeyHash, parseData);
+			}
+			else
+			{
+				DEBUG_INFO(">>> No ManufacturerRootCertificate was found.\n");
+				sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_status, "NotFound");
+			}
 		}
 		else
 		{
-			DEBUG_INFO(">>> No ManufacturerRootCertificate found.\n");
+			DEBUG_INFO(">>> No %s was found.\n", (char*)ShmOCPP16Data->GetInstalledCertificateIds.certificateType);
 			sprintf((char*)ShmOCPP16Data->GetInstalledCertificateIds.Response_status, "NotFound");
 		}
 	}
@@ -17426,7 +17524,7 @@ int initialConfigurationTable(void)
 	char sstr[256]={0};
 	int c = 0;
 	char *loc;
-	int	confVersion = 22;
+	int	confVersion = 23;
 
 	DEBUG_INFO("initialConfigurationTable...version: %d\n", confVersion);
 	//start_t = clock();
@@ -17662,11 +17760,11 @@ int initialConfigurationTable(void)
 		strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemName, "StopTxnAlignedDataMaxLength");
 		if(ShmSysConfigAndInfo->SysConfig.ModelName[0]=='D')
 		{
-			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemData, "%d", 7);
+			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemData, "%d", 8);
 		}
 		else
 		{
-			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemData, "%d", 9);
+			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemData, "%d", 10);
 		}
 
 		fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","StopTxnAlignedDataMaxLength", "true", ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnAlignedDataMaxLength].ItemData);
@@ -17683,11 +17781,11 @@ int initialConfigurationTable(void)
 		strcpy((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemName, "StopTxnSampledDataMaxLength");
 		if(ShmSysConfigAndInfo->SysConfig.ModelName[0]=='D')
 		{
-			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemData, "%d", 7);
+			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemData, "%d", 8);
 		}
 		else
 		{
-			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemData, "%d", 9);
+			sprintf((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemData, "%d", 10);
 		}
 
 		fprintf(outfile,"{\"key\":\"%s\",\"readonly\":%s,\"value\":\"%s\"}\n","StopTxnSampledDataMaxLength", "true", (char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTxnSampledDataMaxLength].ItemData);