EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CMS timestamp

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#16898
Posted: 07/01/2011 04:12:12
by Salih Kardan (Basic support level)
Joined: 06/22/2011
Posts: 10

Hi,

I am trying to add timestamp to CMS, however I am having trouble with TSP server. The code should go to TSP server while requesting timestamp, but it does not.

Here is my code :

TElHTTPTSPClient tspClient = new TElHTTPTSPClient();
SBHTTPSClient.TElHTTPSClient x = new TElHTTPSClient();
x.SSLEnabled = true;

x.RequestHeaders.Add("Content-Type", "application/timestamp-query");
x.RequestHeaders.Add("User-Agent", "UEKAE TSS Client");

x.requestParameters.Username = "----";
x.RequestParameters.Password = "-----";

tspClient.HashAlgorithm = SBConstants.Unit.SB_ALGORITHM_DGST_SHA1;
tspClient.HTTPClient = x;
tspClient.URL = "-----";


Sig.UsePSS = false;
Sig.Sign(Cert, Chain);
Sig.AddTimestamp(tspClient);


Also X.requestParameters line crashes. username and password properties are not known.

Any help is welcome.
#16899
Posted: 07/01/2011 04:24:59
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

It should work. I think the problem is that C# is case sensitive, so you should write RequestParameters, not requestParameters.
#16900
Posted: 07/01/2011 04:29:59
by Salih Kardan (Basic support level)
Joined: 06/22/2011
Posts: 10

Thanks for your quick reply,

I realized that and now I already write RequestParameters, it still does not work.

here is the error
Error 4 'SBHTTPSClient.TElHTTPRequestParams' does not contain a definition for 'Password' and no extension method 'Password' accepting a first argument of type 'SBHTTPSClient.TElHTTPRequestParams' could be found (are you missing a using directive or an assembly reference?)

Error 3 'SBHTTPSClient.TElHTTPRequestParams' does not contain a definition for 'Username' and no extension method 'Username' accepting a first argument of type 'SBHTTPSClient.TElHTTPRequestParams' could be found (are you missing a using directive or an assembly reference?)

Thanks.
#16901
Posted: 07/01/2011 04:38:47
by Salih Kardan (Basic support level)
Joined: 06/22/2011
Posts: 10

Hi Vsevolod Ievgiienko again,

There is one more error, may be it would be the main problem for not recognizing
the username and password properties.

Error 1 The type 'SBHTTPSCommon.TElHTTPCustomRequestParams' is defined in an assembly that is not referenced. You must add a reference to assembly 'SecureBlackbox.HTTPCommon, Version=9.0.203.40621, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a'.

Thanks.
#16904
Posted: 07/01/2011 05:02:29
by Vsevolod Ievgiienko (EldoS Corp.)

You should add references to the next assemblies: SecureBlackbox.dll, SecureBlackbox.HTTPCommon.dll, SecureBlackbox.HTTP.dll, SecureBlackbox.SSLCommon.dll and SecureBlackbox.SSLClient.dll.
#16911
Posted: 07/01/2011 07:19:32
by Salih Kardan (Basic support level)
Joined: 06/22/2011
Posts: 10

Hi again,

thanks for help, I do not get those error. However, still
I cannot go to TSP server, and get this error.
SBHTTPSClient.EElHTTPSConnectionShutdownError was unhandled. Error code: 100354
What does this error mean?



my code:

TElHTTPTSPClient tspClient = new TElHTTPTSPClient();
SBHTTPSClient.TElHTTPSClient x = new TElHTTPSClient();
x.SSLEnabled = false;

x.RequestHeaders.Add("Content-Type", "application/timestamp-query");
x.RequestHeaders.Add("User-Agent", "UEKAE TSS Client");

tspClient.HashAlgorithm = SBConstants.Unit.SB_ALGORITHM_DGST_SHA1;
tspClient.HTTPClient = x;

x.RequestParameters.Username = "----";
x.RequestParameters.Password = "----!";


tspClient.URL = "http://zd.kamusm.gov.tr";


Sig.UsePSS = false;
Sig.Sign(Cert, Chain);
Sig.AddTimestamp(tspClient);


The code crashes at line Sig.AddTimestamp(tspClient).

Thanks.
#16918
Posted: 07/01/2011 08:14:30
by Vsevolod Ievgiienko (EldoS Corp.)

The server rejects TSP requests for some reason. Please check if the username and password are correct. If yes then do you know any software that works with this server without errors?
#16942
Posted: 07/05/2011 03:36:58
by Salih Kardan (Basic support level)
Joined: 06/22/2011
Posts: 10

Hi Vsevolod Ievgiienko

I checked the username and password, they are correct. However I do not know any software that works well with this server. I tried my code with a free timestamp server, but it does not work again.

My code:

TElHTTPTSPClient tspClient = new TElHTTPTSPClient();
SBHTTPSClient.TElHTTPSClient x = new TElHTTPSClient();
x.SSLEnabled = false;

x.RequestHeaders.Add("Content-Type", "application/timestamp-query");
x.RequestHeaders.Add("User-Agent", "UEKAE TSS Client");
tspClient.HTTPClient = x;

tspClient.URL = "http://timestamping.edelweb.fr/";
tspClient.HashAlgorithm = SBConstants.Unit.SB_ALGORITHM_DGST_SHA1;
tspClient.IncludeCertificates = true;


Sig.UsePSS = false;
Sig.Sign(Cert, Chain);
Sig.AddTimestamp(tspClient);
Result = true;

Any help is welcome.
#16943
Posted: 07/05/2011 03:42:27
by Vsevolod Ievgiienko (EldoS Corp.)

The code does not work with the free server because you are using an invalid URL. The valid one is http://timestamping.edelweb.fr/service/tsp
#16944
Posted: 07/05/2011 03:49:34
by Salih Kardan (Basic support level)
Joined: 06/22/2011
Posts: 10

Thanks for your quick answer, I fix that but now there is a different error whose code is 83973.
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 4496 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!