EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Bug in GetOriginalSerialNumber (SBX509.pas)

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.
#33640
Posted: 06/11/2015 07:44:52
by Paolo Righi (Standard support level)
Joined: 02/15/2008
Posts: 34

Hi to all,

I've just found a bug in GetOriginalSerialNumber() function.

The original source code is:

function GetOriginalSerialNumber(Cert : TElX509Certificate): ByteArray;
begin
Result := CloneArray(Cert.SerialNumber);
if Cert.NegativeSerial and NegativeSerialWorkaround then
Result := Copy(Result, 2, Length(Result) - 1);
end;

But is should be changed to:

function GetOriginalSerialNumber(Cert : TElX509Certificate): ByteArray;
begin
Result := CloneArray(Cert.SerialNumber);
if Cert.NegativeSerial and NegativeSerialWorkaround then
Result := Copy(Result, 1, Length(Result) - 1);
end;

as now ByteArrays start from 0 not 1.


Best Regards;

Paolo Righi.
C. H. Ostfeld
#33641
Posted: 06/11/2015 07:56:52
by Ken Ivanov (EldoS Corp.)

Hi Claude,

Thank you for reporting the problem. Your fix is correct, and we will include the same one into the future product update.

Cheers,

Ken

Reply

Statistics

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