Package br.net.woodstock.rockframework.security.store

Examples of br.net.woodstock.rockframework.security.store.StoreAlias


          type = StoreEntryType.PRIVATE_KEY;
        } else if (this.keyStore.entryInstanceOf(alias, java.security.KeyStore.SecretKeyEntry.class)) {
          type = StoreEntryType.SECRET_KEY;
        }
        if (type != null) {
          list.add(new StoreAlias(alias, type));
        }
      }
      return Collections.toArray(list, StoreAlias.class);
    } catch (GeneralSecurityException e) {
      throw new StoreException(e);
View Full Code Here


  @Override
  public StoreAlias[] aliases() {
    Collection<StoreAlias> aliases = new ArrayList<StoreAlias>();
    for (Entry<String, Certificate> entry : this.certificateMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.CERTIFICATE));
    }
    for (Entry<String, Identity> entry : this.privateKeyMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.PRIVATE_KEY));
    }
    for (Entry<String, PublicKey> entry : this.publicKeyMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.PUBLIC_KEY));
    }
    for (Entry<String, SecretKey> entry : this.secretKeyMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.SECRET_KEY));
    }
    return Collections.toArray(aliases, StoreAlias.class);
  }
View Full Code Here

      InputStream inputStream = Resources.getResourceAsStream(timeStampConfig.getStoreResource());

      Store store = new JCAStore(KeyStoreType.valueOf(timeStampConfig.getStoreType()));
      store.read(inputStream, timeStampConfig.getStorePassword());

      StoreAlias alias = new PasswordAlias(timeStampConfig.getKeyAlias(), timeStampConfig.getKeyPassword());

      this.timeStampServer = new BouncyCastleTimeStampServer(store, alias);
    } catch (Exception e) {
      throw new ServletException(e);
    }
View Full Code Here

          type = StoreEntryType.PRIVATE_KEY;
        } else if (this.keyStore.entryInstanceOf(alias, java.security.KeyStore.SecretKeyEntry.class)) {
          type = StoreEntryType.SECRET_KEY;
        }
        if (type != null) {
          list.add(new StoreAlias(alias, type));
        }
      }
      return CollectionUtils.toArray(list, StoreAlias.class);
    } catch (GeneralSecurityException e) {
      throw new StoreException(e);
View Full Code Here

  @Override
  public StoreAlias[] aliases() {
    Collection<StoreAlias> aliases = new ArrayList<StoreAlias>();
    for (Entry<String, Certificate> entry : this.certificateMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.CERTIFICATE));
    }
    for (Entry<String, Identity> entry : this.privateKeyMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.PRIVATE_KEY));
    }
    for (Entry<String, PublicKey> entry : this.publicKeyMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.PUBLIC_KEY));
    }
    for (Entry<String, SecretKey> entry : this.secretKeyMap.entrySet()) {
      aliases.add(new StoreAlias(entry.getKey(), StoreEntryType.SECRET_KEY));
    }
    return CollectionUtils.toArray(aliases, StoreAlias.class);
  }
View Full Code Here

      InputStream inputStream = ClassLoaderUtils.getResourceAsStream(timeStampConfig.getStoreResource());

      Store store = new JCAStore(KeyStoreType.valueOf(timeStampConfig.getStoreType()));
      store.read(inputStream, timeStampConfig.getStorePassword());

      StoreAlias alias = new PasswordAlias(timeStampConfig.getKeyAlias(), timeStampConfig.getKeyPassword());

      this.timeStampServer = new BouncyCastleTimeStampServer(store, alias);
    } catch (Exception e) {
      throw new ServletException(e);
    }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.security.store.StoreAlias

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.