Package com.subgraph.orchid.crypto

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


    return key;
  }

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

  }
 
  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

    }
  }

  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

Related Classes of com.subgraph.orchid.crypto.TorSignature

Copyright © 2018 www.massapicom. 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.