EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SNI with SimpleSSLClient

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.
#26460
Posted: 09/16/2013 12:04:53
by Ken Ivanov (EldoS Corp.)

Please re-check that you are enabling the TLS1.0 version (SBSSLConstants.Unit.sbTLS1 constant) and not TLS1.1 (SBSSLConstants.Unit.sbTLS11 constant):

client.Versions = (short)(client.Versions + SBSSLConstants.Unit.sbTLS1);
#26461
Posted: 09/16/2013 12:19:21
by Kreissl Hogler (Priority Standard support level)
Joined: 09/16/2013
Posts: 24

Here the complete code snipped. The hostname targets a apache server (so i suppose TLS 1.0)

As i wrote, i use sbTLS1!

Code
var client = new TElSimpleSSLClient();
client.OnCertificateValidate += this.OnCertificateValidate;
client.Address = this.hostname;
client.Port = 443;

client.Versions = (short)(client.Versions + SBSSLConstants.__Global.sbTLS1);
client.Extensions.ServerName.Enabled = true;

int idx = client.Extensions.ServerName.Add();
var name = client.Extensions.ServerName.get_Names(idx);
name.Name = this.hostname;
name.NameType = TSBSSLServerNameType.ntHostName;

client.Open();
client.Close(false);


Raises the exception during Open() call...

A first chance exception of type 'SBSSLCommon.EElSecureClientError' occurred in SecureBlackbox.SSLClient.DLL
{SBSSLCommon.EElSecureClientError: Cannot support SSL 3.0 and TLS 1.1 and not support TLS 1.0
at SBSSLClient.TElSSLClient.SSLNegotiate(Boolean Value)
at SBSSLClient.TElSSLClient.Open()
at SBSimpleSSL.TElCustomSimpleSSLClient.Open()
at De.Mms.Dbmm.Wp8.PhoneApp.Services.CertValidationService.SslConnect()}


Regards
Holger
#26462
Posted: 09/16/2013 12:29:33
by Kreissl Hogler (Priority Standard support level)
Joined: 09/16/2013
Posts: 24

I could email you the url of the testserver if you send me your address..
Its http basic protected, but you could try to ssl connect using sbTLS1.

Holger
#26463
Posted: 09/16/2013 12:40:28
by Eugene Mayevski (EldoS Corp.)

That would be great. I've moved your latest message to Helpdesk, please proceed there to post the URL to HelpDesk (it's an individual support channel).


Sincerely yours
Eugene Mayevski
#26477
Posted: 09/17/2013 01:43:43
by ingbabic  (Standard support level)
Joined: 09/27/2011
Posts: 114

Quote
Ken Ivanov wrote:
You are doing everything correctly. C# does not support indexed properties, so one should use the get_Names() method instead of the Names[] collection if using this language.


I'm sorry I am interfering in this discussion, but I just wanted to tell that c# does support indexed properties. I allways wandered why we must write something like this:
Code
int index = pdfDocument.AddSignature();
TElPDFSignature signature = pdfDocument.get_Signatures(index);
signature.SigningTime = DateTime.UtcNow;
...

when we can do much more elegant style
Code
int index = pdfDocument.Signatures.Add();
pdfDocument.Signatures[index].SigningTime = DateTime.UtcNow;
...

All what you have to do is to implement Signatures collection as typed List of TElPDFSignature objects. Or maybe you didn't talk about this?
#26479
Posted: 09/17/2013 02:02:14
by Kreissl Hogler (Priority Standard support level)
Joined: 09/16/2013
Posts: 24

hi ingbabic,
collections and indexed properties are not the same.. your example is using a colelction to make this work.

Indexed properties are a c++ feature.

Look at this for more information:

http://www.fsmpi.uni-bayreuth.de/~dun3/archives/indexed-properties-in-c-property-indexer/231.html

reagards
Holger
#26492
Posted: 09/17/2013 06:21:57
by ingbabic  (Standard support level)
Joined: 09/27/2011
Posts: 114

Hi Holger

Thanks for clarification. However I think that it would be much nicer if, for example Signatures collection (and all other collections likewise), are in eldos implemented as c# collection. It allows much more elegant code (using indexers and iterators). For example instead:
Code
for (int i = 0; i < pdfDocument.SignatureCount; i++)
{
   TElPDFSignature pdfSignature = pdfDocument.get_Signatures(i);
   ...
}

we could write something like this:
Code
foreach (TElPDFSignature pdfSignature in pdfDocument.Signatures)
{
...
}

or instead of ugly
Code
TElPDFSignature pdfSignature = pdfDocument.get_Signatures(3);

we could simply write
Code
pdfDocument.Signatures[3]...
#26493
Posted: 09/17/2013 06:38:58
by Kreissl Hogler (Priority Standard support level)
Joined: 09/16/2013
Posts: 24

For sure. I was thinking the same.
greetings,
holger
#26494
Posted: 09/17/2013 06:54:36
by Eugene Mayevski (EldoS Corp.)

If we were to start the new code from scratch, we would surely implement it the way you are asking about. Changing interfaces now, however, would require rewriting of large amount of SecureBlackbox code and break the code of thousands of existing users.

We will check possibility of implementing some kind of collection in SecureBlackbox 12.


Sincerely yours
Eugene Mayevski
Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.

Reply

Statistics

Topic viewed 2460 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!