Hi Steve.

I'm using Ruby and the library for Ruby is... well... a little out of date. 
?There were a couple of quick changes to make (syntax for Ruby 1.9 and library 
changes), but i was having a hard time getting things to work with making a 
blocking request... ?Since i really want to do just a few simple things, i'll 
most likely roll my own library and publish as a Ruby Gem.

I did have another question:
How do applications such as a "chat" work? ?The only way that I could think of 
is to have multiple clients sharing the same SSK private key, publish to a USK 
to write a new message, then read all versions of with the public key to see 
what others have written. ?Is this even close?




On Saturday, November 9, 2013 8:24 PM, Steve Dougherty <steve at asksteved.com> 
wrote:

On 11/08/2013 03:43 AM, Michael Pearce wrote:
> Hey all.
> 
> I'm wanting to use Freenet to store small pieces of JSON data.? I'm
> wanting to do the following operations:
> 
> * Generate a new Public / Private Key Pair
> * Insert / Update a JSON string of data using the above private key
> * Get the JSON string using the public key
> 
> In the documentation for SSK, it shows an example of doing this via
> telnet (on port 2323, which i can't connect to):
> https://wiki.freenetproject.org/Signed_Subspace_Key.  I attempted the
> MAKESSK telnetting to port 9481 but it didn't work.? From what i can
> tell, this may no longer be the preferred way to do things.
> 
> I then looked at the FCP docs at
> https://wiki.freenetproject.org/FCPv2, which i'm gonna guess is what
> i should be doing.? I then tried the following:
> 
> ~/projects/ $ telnet 127.0.0.1 9481 Trying 127.0.0.1... Connected to
> localhost. Escape character is '^]'. GenerateSSK Identifier=My
> Identifier Blah Blah EndMessage Connection closed by foreign host.
> 
> It does not look to have generated a key.
> 
> Is there any example that i may have missed in my googling?
> 
> Thanks!
> 
> -mike

Sorry for the confusion! It looks like there's a bug. In this case the
node should have responded before closing the connection:

ProtocolError
Fatal=true
CodeDescription=ClientHello must be first message
Code=1
Global=false
EndMessage

So to generate an SSK keypair:

$ telnet localhost 9481
...
ClientHello
Name=TestingStuff
ExpectedVersion=2.0
End

The node will give a NodeHello.

GenerateSSK
End

The identifier field is not required for GenerateSSK. [1]

That said, there's no particular need to build your own library unless
you'd like to. For instance, there is lib-pyFreenet for Python. [2]
Inserting and fetching files are basic operations, and I hope would not
require special work to use.

-Steve

[0] https://wiki.freenetproject.org/FCPv2/ClientHello
[1] https://wiki.freenetproject.org/FCPv2/GenerateSSK

[2] https://github.com/freenet/lib-pyFreenet-staging

_______________________________________________
Tech mailing list
Tech at freenetproject.org
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/tech/attachments/20131109/38ba7bbc/attachment.html>

Reply via email to