I’ve attached example of SSL server.
client and server are combined into one project, but it can be easily split to two projects: testcase.zip (42.3 KB)
Hi
I am wondering if there is a way to catch only TRoAESEncryptionEnvelope errors (for instance, wrong passwords) at the client in the authentication step of the connection.
no, you can’t
but you can create a TROAESEncryptionEnvelope descendant and write some data like control sum before encoding into the end of stream and validate it after decoding.
ofc, you need to remove it after validation from stream
I just need a validation here. The code I’m using - at client - to place password in envelope is:
var
lEnv: TROAESEncryptionEnvelope;
lItem: TROMessageEnvelopeItem;
begin
lEnv := TROAESEncryptionEnvelope.Create(nil);
lEnv.Password := 'some_password';
lEnv.EnvelopeMarker := 'AES';
lItem := TROMessageEnvelopeItem( FMsg.Envelopes.Add );
lItem.Envelope := lEnv;
lItem.Enabled := true;
end
It’s working.
I suppose that TROMessageEnvelopeItem would be destroyed when its array (TRoMessageEnvelope) and its parent (TRoBinMessage ) are destroyed but I don’t know for sure.
Moreover (and mode important) is when and where would TROAESEncryptionEnvelope be destroyed? Should I have to destroy it by myself?