EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SaveToStreamJKS Error

Posted: 07/14/2015 11:36:11
by Charlie Jimenez (Standard support level)
Joined: 08/14/2012
Posts: 38

I am not having any luck saving the certificates in a TElMemoryStorage object to a JKS file. Here is my code:

                  Using fs As FileStream = New FileStream(sFileName, FileMode.Create)
                    blnSaveFailed = memStor.SaveToStreamJKSEx(fs, sPwd, AddressOf AliasNeededEvent)
                  End Using
                Catch e As Exception
                  ErrorMessage = e.Message
                  blnSaveFailed = True
                End Try

Here is the exception detail:

System.ArgumentNullException was caught
Message=Value cannot be null.
Parameter name: dst
at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at SBUtils.__Global.SBMove(Byte[] Src, Int32 SrcOffset, Byte[] Dst, Int32 DstOffset, Int32 Size)
at SBJKS.TElJKS.GetSaveBufferSize()
at SBCustomCertStorage.TElCustomCertStorage.SaveToBufferJKSEx(Byte[]& Buffer, String Pass, Int32& Size, TElJKSAliasNeededEvent OnAliasNeeded)
at SBCustomCertStorage.TElCustomCertStorage.SaveToStreamJKSEx(Stream Stream, String Pass, TElJKSAliasNeededEvent OnAliasNeeded)
at CertManager.frmMain.SaveAsStorage() in C:\Users\Charlie\Documents\Visual Studio 2013\Projects\Certificate Manager\frmMain.vb:line 2367

I have a breakpoint in the AliasNeedEvent handler and it never reaches that point.

I am using SBB for .Net
Posted: 07/14/2015 12:02:29
by Eugene Mayevski (Team)

Let's continue in HelpDesk ( https://www.eldos.com/helpdesk/ ) please. I have created a new support ticket based on your above message. You will see your (and only your) support tickets by following this URL. You will also get e-mail notifications about updates related to your support ticket.

Sincerely yours
Eugene Mayevski



Topic viewed 882 times

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


Back to top

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

Got it!