Examples of TorSignature


Examples of com.subgraph.orchid.crypto.TorSignature

      identity = fieldParser.parseHexDigest();
    } else {
      identity = HexDigest.createFromString(s);
    }
    HexDigest signingKey = fieldParser.parseHexDigest();
    TorSignature signature = fieldParser.parseSignature();
    document.addSignature(new DirectorySignature(identity, signingKey, signature, useSha256));
  }
View Full Code Here

Examples of com.subgraph.orchid.crypto.TorSignature

    return key;
  }

  public TorSignature parseSignature() {
    final DocumentObject documentObject = parseObject();
    TorSignature s = TorSignature.createFromPEMBuffer(documentObject.getContent());
    return s;
  }
View Full Code Here

Examples of com.subgraph.orchid.crypto.TorSignature

  }
 
  private void processSignature() {
    fieldParser.endSignedEntity();
    currentDescriptor.setDescriptorHash(fieldParser.getSignatureMessageDigest().getHexDigest());
    final TorSignature signature = fieldParser.parseSignature();
    currentDescriptor.setRawDocumentData(fieldParser.getRawDocument());
   
    if(verifyCurrentDescriptor(signature))
      resultHandler.documentParsed(currentDescriptor);
    startNewDescriptor();
View Full Code Here

Examples of com.subgraph.orchid.crypto.TorSignature

    }
  }

  private void processSignature() {
    fieldParser.endSignedEntity();
    final TorSignature signature = fieldParser.parseSignature();
    if(!fieldParser.verifySignedEntity(descriptor.getPermanentKey(), signature)) {
      resultHandler.documentInvalid(descriptor, "Signature verification failed");
      fieldParser.logWarn("Signature failed for descriptor: "+ descriptor.getDescriptorId().toBase32());
      return;
    }
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.