--- a/project/scenario_5b021564/additionalstepstoregisteraclientcertificatewithtest_mosquitto_org_1db6b845/1db6b845db554120831380d568372e10.object
+++ b/project/scenario_5b021564/additionalstepstoregisteraclientcertificatewithtest_mosquitto_org_1db6b845/1db6b845db554120831380d568372e10.object
@@ -1 +1 @@
-{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)1db6b845-db55-4120-8313-80d568372e10","ParentGuid":"(Guid)5b021564-ecc4-4ac9-8ad1-ee45df139b22","Name":"(string)AdditionalStepsToRegisterAClientCertificateWithtest_mosquitto_org","Properties":{"@Type":"2c41fa04:IDictionary","@Value":{}},"TypeGuid":"(Guid)f8a58466-d7f6-439f-bbb8-d4600e41d099","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","Guid":"System.Guid","string":"System.String"}},"object":{"Graph":{"@Type":"f8a58466","@Value":{"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)768","Tag":null,"Text":"(string)// This function_block, getClientCert, interacts with CODESYS Runtime's Certificate Store"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)769","Tag":null,"Text":"(string)// To view the source and documentation, Right click > Browse > Go to definition ..."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)770","Tag":null,"Text":"(string)// ... then right click SparkplugB.\"GetClientCert\" > Browse > Go to definition"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)771","Tag":null,"Text":"(string)getClientCert( xUseCertStore := TRUE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)772","Tag":null,"Text":"(string)               xCreateSelfSigned :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)773","Tag":null,"Text":"(string)               xCreateCSR :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)774","Tag":null,"Text":"(string)               xInstallCertFromString :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)775","Tag":null,"Text":"(string)               sCommonName :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)776","Tag":null,"Text":"(string)               sCountry :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)777","Tag":null,"Text":"(string)               sOrganization :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)778","Tag":null,"Text":"(string)               uliValidity :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)779","Tag":null,"Text":"(string)               sClientCert :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)780","Tag":null,"Text":"(string)               xProvideCertificate =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)781","Tag":null,"Text":"(string)               hCert => hCert,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)782","Tag":null,"Text":"(string)               sCSRorClientCertOut => );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)783","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)784","Tag":null,"Text":"(string)// wait a few cycles, incase the getClientCert already finds the right client cert"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)785","Tag":null,"Text":"(string)IF countClientCert > 6 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)786","Tag":null,"Text":"(string)    IF NOT getClientCert.xProvideCertificate THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)787","Tag":null,"Text":"(string)        //There is no Certificate registered, so generate a CSR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)788","Tag":null,"Text":"(string)        getClientCert.xCreateCSR := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)789","Tag":null,"Text":"(string)    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)790","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)791","Tag":null,"Text":"(string)    countClientCert := countClientCert + 1;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)792","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)793","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)794","Tag":null,"Text":"(string)// If xProvideCertificate is set, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)795","Tag":null,"Text":"(string)IF getClientCert.xProvideCertificate THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)796","Tag":null,"Text":"(string)    WaitForTheServerToRegisterCert( IN := TRUE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)797","Tag":null,"Text":"(string)                                    PT := T#1S,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)798","Tag":null,"Text":"(string)                                    Q => ); //1sec timer"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)799","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)800","Tag":null,"Text":"(string)    IF WaitForTheServerToRegisterCert.Q THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)801","Tag":null,"Text":"(string)        StillGettingClientCertificate := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)802","Tag":null,"Text":"(string)    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)803","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)804","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)805","Tag":null,"Text":"(string)(* Below this line is specific to registering a CSR with test.mosquitto.org.  Other servers will have other procedures *)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)806","Tag":null,"Text":"(string)//We are going to use a HTTP Post to get our CSR signed"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)807","Tag":null,"Text":"(string)httpPost := \"submit=Submit&csr=\";"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)808","Tag":null,"Text":"(string)//dirty hack: UTF8toUTF16 also works on strings, if every character is less than 0x80.. STRING_TO_WSTRING only does 255 chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)809","Tag":null,"Text":"(string)//            I know that for BASE64 encoded CSRs, every character is below 0x80"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)810","Tag":null,"Text":"(string)Stu.ConvertUTF8toUTF16( sourceStart := ADR( getClientCert.sCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)811","Tag":null,"Text":"(string)                        targetStart := ADR( wsCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)812","Tag":null,"Text":"(string)                        dwTargetBufferSize := SIZEOF( wsCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)813","Tag":null,"Text":"(string)                        bStrictConversion := FALSE );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)814","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)815","Tag":null,"Text":"(string)//convert the \" \" to %20 etc"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)816","Tag":null,"Text":"(string)wsCSRorClientCertOut := Web_CLient.URL_ENCODE_WSTRING( pwIn := ADR( wsCSRorClientCertOut ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)817","Tag":null,"Text":"(string)//add the CSR to the end of the httpPost.  note Standard64.WCONCAT() only works on 255 chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)818","Tag":null,"Text":"(string)STU.StrConcatW( pstFrom := ADR( wsCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)819","Tag":null,"Text":"(string)                pstTo := ADR( httpPost ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)820","Tag":null,"Text":"(string)                iBufferSize := TO_INT( SIZEOF( httpPost ) ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)821","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)822","Tag":null,"Text":"(string)IF LEN( getClientCert.sCSRorClientCertOut ) > 0 AND (getClientCert.xCreateCSR = TRUE) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)823","Tag":null,"Text":"(string)    //once a CSR is generated, execute the http Post"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)824","Tag":null,"Text":"(string)    RegisterCSR.xExecute := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)825","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)826","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)827","Tag":null,"Text":"(string)// This Web_Client.WebClient sends the CSR to test.mosquitto.org to be signed "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)828","Tag":null,"Text":"(string)RegisterCSR( xExecute :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)829","Tag":null,"Text":"(string)             udiTimeOut :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)830","Tag":null,"Text":"(string)             sURL := 'https://test.mosquitto.org/ssl/index.php', //form for submitting CSRs to mosquitto.org"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)831","Tag":null,"Text":"(string)             eRequestType := Web_Client.POST,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)832","Tag":null,"Text":"(string)             eContentType := Web_Client.CONTENT_TYPE.APPLICATION_FORM,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)833","Tag":null,"Text":"(string)             pwsAdditionalHeader :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)834","Tag":null,"Text":"(string)             pwsPostValue := ADR( httpPost ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)835","Tag":null,"Text":"(string)             xCloseConnection :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)836","Tag":null,"Text":"(string)             hCert :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)837","Tag":null,"Text":"(string)             xDone =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)838","Tag":null,"Text":"(string)             xBusy =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)839","Tag":null,"Text":"(string)             xError =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)840","Tag":null,"Text":"(string)             eError =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)841","Tag":null,"Text":"(string)             httpResult => );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)842","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)843","Tag":null,"Text":"(string)// Once signed, we just register the signed version of the certificate in the store"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)844","Tag":null,"Text":"(string)// If the result of the httpPost does not begine with '-----BEGIN' then there was an error ..."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)845","Tag":null,"Text":"(string)// ... and a CSR was not successfully signed"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)846","Tag":null,"Text":"(string)IF RegisterCSR.xDone AND (FIND( RegisterCSR.httpResult.sContent,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)847","Tag":null,"Text":"(string)                                '-----BEGIN' ) = 1) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)848","Tag":null,"Text":"(string)    //SUCCESS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)849","Tag":null,"Text":"(string)    getClientCert.sClientCert := RegisterCSR.httpResult.sContent;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)850","Tag":null,"Text":"(string)    getClientCert.xInstallCertFromString := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)184","Tag":null,"Text":"(string)END_IF"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)2","Tag":null,"Text":"(string)METHOD AdditionalStepsToRegisterAClientCertificateWithtest_mosquitto_org"}}]}}}}}}},"TypeInfos":{"3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","f8a58466":"{f8a58466-d7f6-439f-bbb8-d4600e41d099}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}
\ No newline at end of file
+{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)1db6b845-db55-4120-8313-80d568372e10","ParentGuid":"(Guid)5b021564-ecc4-4ac9-8ad1-ee45df139b22","Name":"(string)AdditionalStepsToRegisterAClientCertificateWithtest_mosquitto_org","Properties":{"@Type":"2c41fa04:IDictionary","@Value":{}},"TypeGuid":"(Guid)f8a58466-d7f6-439f-bbb8-d4600e41d099","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","Guid":"System.Guid","string":"System.String"}},"object":{"Graph":{"@Type":"f8a58466","@Value":{"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)768","Tag":null,"Text":"(string)// This function_block, getClientCert, interacts with CODESYS Runtime's Certificate Store"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)769","Tag":null,"Text":"(string)// To view the source and documentation, Right click > Browse > Go to definition .."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)770","Tag":null,"Text":"(string)// .. then right click SparkplugB.\"GetClientCert\" > Browse > Go to definition"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)771","Tag":null,"Text":"(string)getClientCert( xUseCertStore := TRUE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)772","Tag":null,"Text":"(string)               xCreateSelfSigned :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)773","Tag":null,"Text":"(string)               xCreateCSR :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)774","Tag":null,"Text":"(string)               xInstallCertFromString :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)775","Tag":null,"Text":"(string)               sCommonName :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)776","Tag":null,"Text":"(string)               sCountry :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)777","Tag":null,"Text":"(string)               sOrganization :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)778","Tag":null,"Text":"(string)               uliValidity :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)779","Tag":null,"Text":"(string)               sClientCert :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)780","Tag":null,"Text":"(string)               xProvideCertificate =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)781","Tag":null,"Text":"(string)               hCert => hCert,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)782","Tag":null,"Text":"(string)               sCSRorClientCertOut => );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)783","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)784","Tag":null,"Text":"(string)// wait a few cycles, incase the getClientCert already finds the right client cert"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)785","Tag":null,"Text":"(string)IF countClientCert > 6 THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)786","Tag":null,"Text":"(string)    IF NOT getClientCert.xProvideCertificate THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)787","Tag":null,"Text":"(string)        //There is no Certificate registered, so generate a CSR"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)788","Tag":null,"Text":"(string)        getClientCert.xCreateCSR := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)789","Tag":null,"Text":"(string)    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)790","Tag":null,"Text":"(string)ELSE"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)791","Tag":null,"Text":"(string)    countClientCert := countClientCert + 1;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)792","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)793","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)794","Tag":null,"Text":"(string)// If xProvideCertificate is set, "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)795","Tag":null,"Text":"(string)IF getClientCert.xProvideCertificate THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)796","Tag":null,"Text":"(string)    WaitForTheServerToRegisterCert( IN := TRUE,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)797","Tag":null,"Text":"(string)                                    PT := T#1S,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)798","Tag":null,"Text":"(string)                                    Q => ); //1sec timer"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)799","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)800","Tag":null,"Text":"(string)    IF WaitForTheServerToRegisterCert.Q THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)801","Tag":null,"Text":"(string)        StillGettingClientCertificate := FALSE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)802","Tag":null,"Text":"(string)    END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)803","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)804","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)805","Tag":null,"Text":"(string)(* Below this line is specific to registering a CSR with test.mosquitto.org.  Other servers will have other procedures *)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)806","Tag":null,"Text":"(string)//We are going to use a HTTP Post to get our CSR signed"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)807","Tag":null,"Text":"(string)httpPost := \"submit=Submit&csr=\";"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)808","Tag":null,"Text":"(string)//dirty hack: UTF8toUTF16 also works on strings, if every character is less than 0x80.. STRING_TO_WSTRING only does 255 chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)809","Tag":null,"Text":"(string)//            I know that for BASE64 encoded CSRs, every character is below 0x80"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)810","Tag":null,"Text":"(string)Stu.ConvertUTF8toUTF16( sourceStart := ADR( getClientCert.sCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)811","Tag":null,"Text":"(string)                        targetStart := ADR( wsCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)812","Tag":null,"Text":"(string)                        dwTargetBufferSize := SIZEOF( wsCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)813","Tag":null,"Text":"(string)                        bStrictConversion := FALSE );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)814","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)815","Tag":null,"Text":"(string)//convert the \" \" to %20 etc"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)816","Tag":null,"Text":"(string)wsCSRorClientCertOut := Web_CLient.URL_ENCODE_WSTRING( pwIn := ADR( wsCSRorClientCertOut ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)817","Tag":null,"Text":"(string)//add the CSR to the end of the httpPost.  note Standard64.WCONCAT() only works on 255 chars"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)818","Tag":null,"Text":"(string)STU.StrConcatW( pstFrom := ADR( wsCSRorClientCertOut ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)819","Tag":null,"Text":"(string)                pstTo := ADR( httpPost ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)820","Tag":null,"Text":"(string)                iBufferSize := TO_INT( SIZEOF( httpPost ) ) );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)821","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)822","Tag":null,"Text":"(string)IF LEN( getClientCert.sCSRorClientCertOut ) > 0 AND (getClientCert.xCreateCSR = TRUE) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)823","Tag":null,"Text":"(string)    //once a CSR is generated, execute the http Post"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)824","Tag":null,"Text":"(string)    RegisterCSR.xExecute := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)825","Tag":null,"Text":"(string)END_IF"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)826","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)827","Tag":null,"Text":"(string)// This Web_Client.WebClient sends the CSR to test.mosquitto.org to be signed "}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)828","Tag":null,"Text":"(string)RegisterCSR( xExecute :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)829","Tag":null,"Text":"(string)             udiTimeOut :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)830","Tag":null,"Text":"(string)             sURL := 'https://test.mosquitto.org/ssl/index.php', //form for submitting CSRs to mosquitto.org"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)831","Tag":null,"Text":"(string)             eRequestType := Web_Client.POST,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)832","Tag":null,"Text":"(string)             eContentType := Web_Client.CONTENT_TYPE.APPLICATION_FORM,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)833","Tag":null,"Text":"(string)             pwsAdditionalHeader :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)834","Tag":null,"Text":"(string)             pwsPostValue := ADR( httpPost ),"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)835","Tag":null,"Text":"(string)             xCloseConnection :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)836","Tag":null,"Text":"(string)             hCert :=,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)837","Tag":null,"Text":"(string)             xDone =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)838","Tag":null,"Text":"(string)             xBusy =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)839","Tag":null,"Text":"(string)             xError =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)840","Tag":null,"Text":"(string)             eError =>,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)841","Tag":null,"Text":"(string)             httpResult => );"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)842","Tag":null,"Text":"(string)"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)843","Tag":null,"Text":"(string)// Once signed, we just register the signed version of the certificate in the store"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)844","Tag":null,"Text":"(string)// If the result of the httpPost does not begine with '-----BEGIN' then there was an error .."}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)845","Tag":null,"Text":"(string)// .. and a CSR was not successfully signed"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)846","Tag":null,"Text":"(string)IF RegisterCSR.xDone AND (FIND( RegisterCSR.httpResult.sContent,"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)847","Tag":null,"Text":"(string)                                '-----BEGIN' ) = 1) THEN"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)848","Tag":null,"Text":"(string)    //SUCCESS"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)849","Tag":null,"Text":"(string)    getClientCert.sClientCert := RegisterCSR.httpResult.sContent;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)850","Tag":null,"Text":"(string)    getClientCert.xInstallCertFromString := TRUE;"}},{"@Type":"a5de0b0b","@Value":{"Id":"(long)184","Tag":null,"Text":"(string)END_IF"}}]}}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextLines":{"@Type":"[a5de0b0b]","@Value":[{"@Type":"a5de0b0b","@Value":{"Id":"(long)2","Tag":null,"Text":"(string)METHOD AdditionalStepsToRegisterAClientCertificateWithtest_mosquitto_org"}}]}}}}}}},"TypeInfos":{"3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","a5de0b0b":"{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","f8a58466":"{f8a58466-d7f6-439f-bbb8-d4600e41d099}","long":"System.Int64","string":"System.String"}}},"FormatVersion":"1.0"}
\ No newline at end of file