EldoS | Feel safer!

Software components for data protection, secure storage and transfer

how and when I set SerialNumber property?

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#7063
Posted: 07/26/2008 07:23:33
by Mohammad Khorsandi (Basic support level)
Joined: 05/05/2008
Posts: 34

Hi,
when I set SerialNumber property to '00001' or '1' and generate certificate and save it on disk, then I have opened the generated certificate I see SerialNumber = 00.

Code
Cert.SerialNumber := '1';
Cert.Generate(CACert, SignatureAlgorithm, KeySize div 32);


how and when I set SerialNumber property?

thanks.
#7064
Posted: 07/26/2008 07:36:02
by Eugene Mayevski (EldoS Corp.)

Did you try setting the serial number *after* the cerificate is generated?


Sincerely yours
Eugene Mayevski
#7070
Posted: 07/27/2008 00:32:21
by Mohammad Khorsandi (Basic support level)
Joined: 05/05/2008
Posts: 34

thanks,

Once, I set serialnumber before generate certificate and then generate certificate and save it on disk but so SerialNumber is 00.
Once again, I set serialnumber after generated certificate and then save it on disk but so SerialNumber is 00. (save with DER format).
!

#7071
Posted: 07/27/2008 00:47:15
by Mohammad Khorsandi (Basic support level)
Joined: 05/05/2008
Posts: 34

Is this required to use StringToByte function or similarly function for assigning serial number to SerialNumber property?
#7072
Posted: 07/27/2008 02:59:10
by Mohammad Khorsandi (Basic support level)
Joined: 05/05/2008
Posts: 34

the following lines are part of ReadTBSCertificate procedure,
when I tracing this procedure, the line that specified with //**** return value #0

Code
    
{ Serial number }
    if (CurrTagIndex >= Tag.Count) then
      raise EElCertificateException.Create(SInvalidtbsCert);
    if (not Tag.GetField(CurrTagIndex).CheckType(SB_ASN1_INTEGER, false)) then
      raise EElCertificateException.Create(SInvalidtbsCert);
      Cnt := TElASN1SimpleTag(Tag.GetField(CurrTagIndex)).Content; //****
    FTbsCertificate.FSerialNumber := Cnt;
    while (FTBSCertificate.FSerialNumber[1] = #0) and
      (Length(FTBSCertificate.FSerialNumber) > 1) do
      FTBSCertificate.FSerialNumber := Copy(FTBSCertificate.FSerialNumber, 2,
        Length(FTBSCertificate.FSerialNumber));
    if (Length(FTBSCertificate.FSerialNumber) >= 1) and
      (Ord(FTBSCertificate.FSerialNumber[1]) >= $80) then
      FTBSCertificate.FSerialNumber := #0 + FTBSCertificate.FSerialNumber;
    Inc(CurrTagIndex);
#7073
Posted: 07/27/2008 04:27:54
by Mykola Olshevsky (Basic support level)
Joined: 07/07/2005
Posts: 450

Please, attach the license ticket to your profile (via My Control Center).
Are you using the latest build of SBB (6.0.0.144)?
#7077
Posted: 07/27/2008 22:40:36
by Mohammad Khorsandi (Basic support level)
Joined: 05/05/2008
Posts: 34

Okay,
No, i'm using SBB 5.0.
#7090
Posted: 07/28/2008 10:01:27
by Eugene Mayevski (EldoS Corp.)

Unfortunately we can't help with this old version. You should upgrade to at least 5.2 (which is a free update if you have a license for version 5.x) or 6.0. To provide more information we need you to assign the license ticket to your account.

If you are using the evaluation version, please upgrade to version 6.0. We don't sell licenses for 5.0 anyway so it has no sense to evaluate the old version.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

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