Examples of EncryptionOptions


Examples of org.apache.abdera.security.EncryptionOptions

        Document<Element> doc = getDocument(wrapper);
        if (doc != null) {
          Encryption enc = security.getEncryption();
          if (enc.isEncrypted(doc)) {
            Object arg = initArg(request);
            EncryptionOptions options = initEncryptionOptions(request,response,enc,arg);
            doDecryption(doc, options, enc, wrapper);
          }
        }
      } catch (Exception e) {
      } finally {wrapper.reset();}
View Full Code Here

Examples of org.apache.abdera.security.EncryptionOptions

  protected EncryptionOptions initEncryptionOptions(
      ServletRequest request,
      ServletResponse response,
      Encryption enc,
      Object arg) {
    EncryptionOptions options = null;
    try {
      DHContext context = (DHContext) arg;
      options = context.getEncryptionOptions(enc);
      returnPublicKey((HttpServletResponse)response,context);
    } catch (Exception e) {}
View Full Code Here

Examples of org.apache.abdera.security.EncryptionOptions

        ka.doPhase(publicKey, true);
        return ka.generateSecret("DESede");
    }

    public EncryptionOptions getEncryptionOptions(Encryption enc) throws InvalidKeyException, NoSuchAlgorithmException {
        EncryptionOptions options = enc.getDefaultEncryptionOptions();
        options.setDataEncryptionKey(generateSecret());
        options.setDataCipherAlgorithm(XMLCipher.TRIPLEDES);
        return options;
    }
View Full Code Here

Examples of org.apache.cassandra.config.EncryptionOptions

    */

    public void stream(StreamHeader header, InetAddress to)
    {
        /* Streaming asynchronously on streamExector_ threads. */
        EncryptionOptions encryption = DatabaseDescriptor.getEncryptionOptions();
        if (encryption != null && encryption.internode_encryption == EncryptionOptions.InternodeEncryption.all)
            streamExecutor_.execute(new SSLFileStreamTask(header, to));
        else
            streamExecutor_.execute(new FileStreamTask(header, to));
    }
View Full Code Here

Examples of org.apache.cassandra.config.EncryptionOptions

        while (System.currentTimeMillis() < start + DatabaseDescriptor.getRpcTimeout())
        {
            try
            {
                // zero means 'bind on any available port.'
                EncryptionOptions options = DatabaseDescriptor.getEncryptionOptions();
                if (options != null && options.internode_encryption == EncryptionOptions.InternodeEncryption.all)
                {
                    socket = SSLFactory.getSocket(options, endpoint, DatabaseDescriptor.getStoragePort(), FBUtilities.getLocalAddress(), 0);
                }
                else {
View Full Code Here

Examples of org.apache.cassandra.config.EncryptionOptions

        {
            final InetSocketAddress addr = args.addr;
            TServerTransport serverTransport;
            try
            {
                final EncryptionOptions clientEnc = DatabaseDescriptor.getClientEncryptionOptions();
                if(EncryptionOptions.InternodeEncryption.all == clientEnc.internode_encryption)
                {
                    logger.info("enabling encrypted thrift connections between client and server");
                    TSSLTransportParameters params = new TSSLTransportParameters(clientEnc.protocol, clientEnc.cipher_suites);
                    params.setKeyStore(clientEnc.keystore, clientEnc.keystore_password);
View Full Code Here

Examples of org.apache.cassandra.config.EncryptionOptions

    */

    public void stream(StreamHeader header, InetAddress to)
    {
        /* Streaming asynchronously on streamExector_ threads. */
        EncryptionOptions encryption = DatabaseDescriptor.getEncryptionOptions();
        if (encryption != null && encryption.internode_encryption == EncryptionOptions.InternodeEncryption.all)
            streamExecutor_.execute(new SSLFileStreamTask(header, to));
        else
            streamExecutor_.execute(new FileStreamTask(header, to));
    }
View Full Code Here

Examples of org.apache.cassandra.config.EncryptionOptions

        while (System.currentTimeMillis() < start + DatabaseDescriptor.getRpcTimeout())
        {
            try
            {
                // zero means 'bind on any available port.'
                EncryptionOptions options = DatabaseDescriptor.getEncryptionOptions();
                if (options != null && options.internode_encryption == EncryptionOptions.InternodeEncryption.all)
                {
                    socket = SSLFactory.getSocket(options, endpoint, DatabaseDescriptor.getStoragePort(), FBUtilities.getLocalAddress(), 0);
                }
                else {
View Full Code Here

Examples of org.apache.cassandra.config.EncryptionOptions

        }
    }

    private void stream(StreamHeader streamHeader, DataInputStream input) throws IOException
    {
        EncryptionOptions options = DatabaseDescriptor.getEncryptionOptions();
        if (options != null && options.internode_encryption == EncryptionOptions.InternodeEncryption.all)
            new SSLIncomingStreamReader(streamHeader, socket, input).read();
        else
            new IncomingStreamReader(streamHeader, socket).read();
    }
View Full Code Here

Examples of org.apache.cassandra.config.EncryptionOptions

        while (System.currentTimeMillis() < start + DatabaseDescriptor.getRpcTimeout())
        {
            try
            {
                // zero means 'bind on any available port.'
                EncryptionOptions options = DatabaseDescriptor.getEncryptionOptions();
                if (options != null && options.internode_encryption == EncryptionOptions.InternodeEncryption.all)
                {
                    socket = SSLFactory.getSocket(options, endpoint, DatabaseDescriptor.getStoragePort(), FBUtilities.getLocalAddress(), 0);
                }
                else {
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.