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

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


    Assert.notNull(from, "from");
    Assert.notNull(to, "to");
    Assert.notEmpty(aliases, "aliases");

    for (StoreAlias alias : aliases) {
      StoreEntry entry = from.get(alias);
      if (entry != null) {
        to.add(entry);
      }
    }
  }
View Full Code Here


      Assert.notNull(alias, "alias");

      String name = alias.getName();
      String password = null;

      StoreEntry entry = null;

      if (alias instanceof PasswordAlias) {
        PasswordAlias pa = (PasswordAlias) alias;
        password = pa.getPassword();
      }
View Full Code Here

  @Override
  public StoreEntry get(final StoreAlias alias) {
    Assert.notNull(alias, "alias");

    StoreEntry entry = null;
    StoreEntryType type = alias.getType();

    switch (type) {
      case CERTIFICATE:
        Certificate certificate = this.certificateMap.get(alias.getName());
View Full Code Here

    try {
      CMSSignedDataGenerator cmsSignedDataGenerator = new CMSSignedDataGenerator();
      TimeStampClient timeStampClient = this.request.getTimeStampClient();

      for (Alias alias : this.request.getAliases()) {
        StoreEntry certificateEntry = this.request.getStore().get(alias, StoreEntryType.CERTIFICATE);
        StoreEntry privateKeyEntry = this.request.getStore().get(alias, StoreEntryType.PRIVATE_KEY);

        Certificate certificate = (Certificate) certificateEntry.getValue();
        PrivateKey privateKey = (PrivateKey) privateKeyEntry.getValue();

        JcaContentSignerBuilder contentSignerBuilder = new JcaContentSignerBuilder(SignatureType.SHA1_RSA.getAlgorithm());
        contentSignerBuilder.setProvider(BouncyCastleProviderHelper.PROVIDER_NAME);

        ContentSigner contentSigner = contentSignerBuilder.build(privateKey);
View Full Code Here

      Assert.notNull(type, "type");

      String name = alias.getName();
      String password = null;

      StoreEntry entry = null;

      if (alias instanceof PasswordAlias) {
        PasswordAlias pa = (PasswordAlias) alias;
        password = pa.getPassword();
      }
View Full Code Here

  @Override
  public StoreEntry get(final Alias alias, final StoreEntryType type) {
    Assert.notNull(alias, "alias");
    Assert.notNull(type, "type");

    StoreEntry entry = null;

    switch (type) {
      case CERTIFICATE:
        Certificate certificate = this.certificateMap.get(alias.getName());
        if (certificate != null) {
View Full Code Here

    Assert.notNull(to, "to");
    Assert.notEmpty(aliases, "aliases");

    for (Alias alias : aliases) {

      StoreEntry entry = from.get(alias, StoreEntryType.PRIVATE_KEY);
      if (entry != null) {
        to.add(entry);
      } else {
        entry = from.get(alias, StoreEntryType.CERTIFICATE);
        if (entry != null) {
View Full Code Here

    Assert.notNull(from, "from");
    Assert.notNull(to, "to");
    Assert.notEmpty(aliases, "aliases");

    for (StoreAlias alias : aliases) {
      StoreEntry entry = from.get(alias);
      if (entry != null) {
        to.add(entry);
      }
    }
  }
View Full Code Here

      Assert.notNull(alias, "alias");

      String name = alias.getName();
      String password = null;

      StoreEntry entry = null;

      if (alias instanceof PasswordAlias) {
        PasswordAlias pa = (PasswordAlias) alias;
        password = pa.getPassword();
      }
View Full Code Here

  @Override
  public StoreEntry get(final StoreAlias alias) {
    Assert.notNull(alias, "alias");

    StoreEntry entry = null;
    StoreEntryType type = alias.getType();

    switch (type) {
      case CERTIFICATE:
        Certificate certificate = this.certificateMap.get(alias.getName());
View Full Code Here

TOP

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

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.