Package freenet.support

Examples of freenet.support.SimpleFieldSet.toOrderedString()


         System.out.println("Sent data");
         while(true) {
             name = lis.readLine(65536, 128, true);
             fs = new SimpleFieldSet(lis, 65536, 128, true, false, true);
           System.out.println("Got FCP message: \n"+name);
           System.out.print(fs.toOrderedString());
           if(name.equals("ProtocolError")) {
             System.err.println("Protocol error when inserting data.");
             System.exit(EXIT_INSERTER_PROBLEM);
           }
           if(name.equals("PutFailed")) {
View Full Code Here


      SimpleFieldSet sfs = this.base.getOverrideForCurrentLanguageTranslation();
      if(sfs == null) {
        super.sendErrorPage(ctx, 503 /* Service Unavailable */, "Service Unavailable", l10n("noCustomTranslations"));
        return;
      }
      byte[] data = sfs.toOrderedString().getBytes("UTF-8");
      MultiValueTable<String, String> head = new MultiValueTable<String, String>();
      head.put("Content-Disposition", "attachment; filename=\"" + this.base.getL10nOverrideFileName(this.base.getSelectedLanguage()) + '"');
      ctx.sendReplyHeaders(200, "Found", head, "text/plain; charset=utf-8", data.length);
      ctx.writeData(data);
      return;
View Full Code Here

public class PluginStoreTest extends TestCase {
   
    private void check(PluginStore store) throws IllegalBase64Exception, FSParseException {
        SimpleFieldSet fs = store.exportStoreAsSFS();
        PluginStore copyStore = new PluginStore(fs);
        assertEquals(fs.toOrderedString(), copyStore.exportStoreAsSFS().toOrderedString());
    }

    /** These are not allowed in SFS except base64 encoded when the always allow base64 flag is on.
     * So they ARE allowed in PluginStore's. */
    private String invalidCharsForSFS = "\r\n"+SimpleFieldSet.KEYVALUE_SEPARATOR_CHAR+
View Full Code Here

    if(!forAnonInitiator) {
      // Anonymous initiator setup type specifies whether the node is opennet or not.
      fs.put("opennet", isOpennet);
      synchronized (referenceSync) {
        if(myReferenceSignature == null || myReferenceECDSASignature == null || mySignedReference == null || !mySignedReference.equals(fs.toOrderedString())){
          mySignedReference = fs.toOrderedString();
          try {
              myReferenceECDSASignature = ecdsaSignRef(mySignedReference);

              // Old nodes will verify the signature including sigP256
View Full Code Here

    if(!forAnonInitiator) {
      // Anonymous initiator setup type specifies whether the node is opennet or not.
      fs.put("opennet", isOpennet);
      synchronized (referenceSync) {
        if(myReferenceSignature == null || myReferenceECDSASignature == null || mySignedReference == null || !mySignedReference.equals(fs.toOrderedString())){
          mySignedReference = fs.toOrderedString();
          try {
              myReferenceECDSASignature = ecdsaSignRef(mySignedReference);

              // Old nodes will verify the signature including sigP256
              fs.putSingle("sigP256", myReferenceECDSASignature);
View Full Code Here

          try {
              myReferenceECDSASignature = ecdsaSignRef(mySignedReference);

              // Old nodes will verify the signature including sigP256
              fs.putSingle("sigP256", myReferenceECDSASignature);
              mySignedReference = fs.toOrderedString();
              myReferenceSignature = signRef(mySignedReference);
          } catch (NodeInitException e) {
            node.exit(e.exitCode);
          }
        }
View Full Code Here

        }
        fs.putSingle("sig", myReferenceSignature.toLongString());
      }
    }

    if(logMINOR) Logger.minor(this, "My reference: "+fs.toOrderedString());
    return fs;
  }

  SimpleFieldSet exportPublicCryptoFieldSet(boolean forSetup, boolean forAnonInitiator) {
    SimpleFieldSet fs = new SimpleFieldSet(true);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.