From 28983a4e42cc2103d8ed6366ced614533326f09a Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Fri, 23 Apr 2021 19:38:12 +0300 Subject: [PATCH 1/7] Bug 573004 persist generated key pairs mark unused registry method Signed-off-by: eparovyshnaya --- .../passage/loc/internal/emf/EditingDomainRegistry.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.passage.loc.api/src/org/eclipse/passage/loc/internal/emf/EditingDomainRegistry.java b/bundles/org.eclipse.passage.loc.api/src/org/eclipse/passage/loc/internal/emf/EditingDomainRegistry.java index 4fb875e2a..efd1ed7c2 100644 --- a/bundles/org.eclipse.passage.loc.api/src/org/eclipse/passage/loc/internal/emf/EditingDomainRegistry.java +++ b/bundles/org.eclipse.passage.loc.api/src/org/eclipse/passage/loc/internal/emf/EditingDomainRegistry.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2020 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -34,6 +34,7 @@ public interface EditingDomainRegistry { String getFileExtension(); + // TODO: is not used EClass getContentClassifier(); EStructuralFeature getContentIdentifierAttribute(); From de91e5832a363c9ba2c63185e1400a8ee12870b5 Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Sat, 24 Apr 2021 14:39:01 +0300 Subject: [PATCH 2/7] Bug 573129 StremCodec must supply encryption keys to streams evolve StreamCodec: make it possible to generate encryption keys without file system invocation --- .../lic/internal/api/io/StreamCodec.java | 84 +++++++++++++++++-- .../passage/lic/internal/bc/BcKeyPair.java | 15 ++-- .../lic/internal/bc/BcStreamCodec.java | 6 +- 3 files changed, 86 insertions(+), 19 deletions(-) diff --git a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/internal/api/io/StreamCodec.java b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/internal/api/io/StreamCodec.java index 66c9d48c3..947d094c1 100644 --- a/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/internal/api/io/StreamCodec.java +++ b/bundles/org.eclipse.passage.lic.api/src/org/eclipse/passage/lic/internal/api/io/StreamCodec.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -12,9 +12,12 @@ *******************************************************************************/ package org.eclipse.passage.lic.internal.api.io; +import java.io.FileOutputStream; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.file.Path; +import java.util.Objects; import org.eclipse.passage.lic.internal.api.LicensedProduct; import org.eclipse.passage.lic.internal.api.LicensingException; @@ -37,16 +40,17 @@ public interface StreamCodec extends Service { EncryptionKeySize keySize(); /** - * Create a public/private keys pair and store them to {@code publicKeyPath} and - * {@code privateKeyPath} respectively. + * Create a public/private keys pair and store them to {@code publicKey} stream + * and {@code privateKey} stream respectively. * - * @param publicKey file system path for public key to be generated - * @param privateKey file system path for private key to be generated + * @param publicKey a stream for public key content to be stored in + * @param privateKey a stream for private key content to be stored in * @param username of the keys owner user - * @param password of the keys owner user + * @param password of the keys owner password * @throws LicensingException in case of any i/o misbehavior */ - void createKeyPair(Path publicKey, Path privateKey, String username, String password) throws LicensingException; + void createKeyPair(OutputStream publicKey, OutputStream privateKey, String username, String password) + throws LicensingException; /** * Encode {@code input} stream data with a private key retrieved form the given @@ -57,7 +61,7 @@ public interface StreamCodec extends Service { * @param output target stream to place encoded data into * @param key source for a private key * @param username of the private key owner user - * @param password of the private key owner user + * @param password of the private key owner password * @throws LicensingException in case of any i/o misbehavior */ void encode(InputStream input, OutputStream output, InputStream key, String username, String password) @@ -78,4 +82,68 @@ void encode(InputStream input, OutputStream output, InputStream key, String user void decode(InputStream input, OutputStream output, InputStream key, DigestExpectation digest) throws LicensingException; + public static final class Smart implements StreamCodec { + private final StreamCodec delegate; + + public Smart(StreamCodec delegate) { + Objects.requireNonNull(delegate, "StreamCodec.Smart::delegate"); //$NON-NLS-1$ + this.delegate = delegate; + } + + @Override + public LicensedProduct id() { + return delegate.id(); + } + + @Override + public EncryptionAlgorithm algorithm() { + return delegate.algorithm(); + } + + @Override + public EncryptionKeySize keySize() { + return delegate.keySize(); + } + + @Override + public void createKeyPair(OutputStream publicKey, OutputStream privateKey, String username, String password) + throws LicensingException { + delegate.createKeyPair(publicKey, privateKey, username, password); + } + + /** + * Create a public/private keys pair and store them to {@code publicKey} path + * and {@code privateKey} path respectively. + * + * @param publicKey file system path for public key to be generated + * @param privateKey file system path for private key to be generated + * @param username of the keys owner user + * @param password of the keys owner password + * @throws LicensingException in case of any i/o misbehavior + */ + public void createKeyPair(Path publicKey, Path privateKey, String username, String password) + throws LicensingException { + try (FileOutputStream pub = new FileOutputStream(publicKey.toFile()); // + FileOutputStream scr = new FileOutputStream(privateKey.toFile())) { + delegate.createKeyPair(pub, scr, username, password); + } catch (IOException e) { + throw new LicensingException("failed to create encryption keys", e); //$NON-NLS-1$ + } + + } + + @Override + public void encode(InputStream input, OutputStream output, InputStream key, String username, String password) + throws LicensingException { + delegate.encode(input, output, key, username, password); + } + + @Override + public void decode(InputStream input, OutputStream output, InputStream key, DigestExpectation digest) + throws LicensingException { + delegate.decode(input, output, key, digest); + } + + } + } diff --git a/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcKeyPair.java b/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcKeyPair.java index 7fc47fd43..bf3f64a7a 100644 --- a/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcKeyPair.java +++ b/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcKeyPair.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018, 2020 ArSysOp + * Copyright (c) 2018, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -13,8 +13,8 @@ package org.eclipse.passage.lic.internal.bc; import java.io.BufferedOutputStream; -import java.io.FileOutputStream; import java.io.IOException; +import java.io.OutputStream; import java.nio.file.Path; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -94,9 +94,8 @@ private PGPKeyRingGenerator keyRing(String username, String password) throws Lic } } - private void persist(PGPKeyRing key, Path target, String error) throws LicensingException { - try (FileOutputStream fos = new FileOutputStream(target.toFile()); - ArmoredOutputStream output = new ArmoredOutputStream(new BufferedOutputStream(fos))) { + private void persist(PGPKeyRing key, OutputStream target, String error) throws LicensingException { + try (ArmoredOutputStream output = new ArmoredOutputStream(new BufferedOutputStream(target))) { key.encode(output); } catch (IOException e) { throw new LicensingException(BcMessages.getString(error), e); // $NON-NLS-1$ @@ -128,10 +127,10 @@ private JcaPGPContentSignerBuilder signer(PGPKeyPair pair) { static final class Targets { - private final Path publicPath; - private final Path privatePath; + private final OutputStream publicPath; + private final OutputStream privatePath; - Targets(Path publicPath, Path privatePath) { + Targets(OutputStream publicPath, OutputStream privatePath) { this.publicPath = publicPath; this.privatePath = privatePath; } diff --git a/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcStreamCodec.java b/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcStreamCodec.java index a402ec24b..4c5b7e623 100644 --- a/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcStreamCodec.java +++ b/bundles/org.eclipse.passage.lic.bc/src/org/eclipse/passage/lic/internal/bc/BcStreamCodec.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -14,7 +14,6 @@ import java.io.InputStream; import java.io.OutputStream; -import java.nio.file.Path; import java.security.Security; import java.util.Objects; import java.util.function.Supplier; @@ -62,8 +61,9 @@ public EncryptionKeySize keySize() { return keySize; } + @SuppressWarnings("resource") @Override - public void createKeyPair(Path publicKey, Path privateKey, String username, String password) + public void createKeyPair(OutputStream publicKey, OutputStream privateKey, String username, String password) throws LicensingException { Objects.requireNonNull(publicKey, "BcStreamCodec::createKeyPair::publicKey"); //$NON-NLS-1$ Objects.requireNonNull(privateKey, "BcStreamCodec::createKeyPair::privateKey"); //$NON-NLS-1$ From 1e244f4fbdf0a152d487db1ef779b269b04a804c Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Sat, 24 Apr 2021 14:40:34 +0300 Subject: [PATCH 3/7] Bug 573129 StremCodec must supply encryption keys to streams update tests and stubs according to the interface evolution Signed-off-by: eparovyshnaya --- .../lic/api/tests/fakes/io/FakeKeyKeeper.java | 3 +-- .../api/tests/fakes/io/FakeStreamCodec.java | 6 ++---- .../conditions/mining/EchoStreamCodec.java | 5 ++--- .../internal/bc/tests/BcStreamCodecTest.java | 5 +++-- .../bc/tests/KeyPairGenerationTest.java | 20 ++++++++++++------- .../internal/bc/tests/StreamEncodingTest.java | 5 +++-- 6 files changed, 24 insertions(+), 20 deletions(-) diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeKeyKeeper.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeKeyKeeper.java index 9044b168c..19293d098 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeKeyKeeper.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeKeyKeeper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -18,7 +18,6 @@ import org.eclipse.passage.lic.internal.api.LicensingException; import org.eclipse.passage.lic.internal.api.io.KeyKeeper; -@SuppressWarnings("restriction") public final class FakeKeyKeeper implements KeyKeeper, LicensedProduct { @Override diff --git a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeStreamCodec.java b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeStreamCodec.java index 9fdd46f6e..67136ab92 100644 --- a/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeStreamCodec.java +++ b/tests/org.eclipse.passage.lic.api.tests/src/org/eclipse/passage/lic/api/tests/fakes/io/FakeStreamCodec.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -14,7 +14,6 @@ import java.io.InputStream; import java.io.OutputStream; -import java.nio.file.Path; import org.eclipse.passage.lic.internal.api.LicensedProduct; import org.eclipse.passage.lic.internal.api.LicensingException; @@ -23,7 +22,6 @@ import org.eclipse.passage.lic.internal.api.io.EncryptionKeySize; import org.eclipse.passage.lic.internal.api.io.StreamCodec; -@SuppressWarnings("restriction") public final class FakeStreamCodec implements StreamCodec, LicensedProduct { @Override @@ -42,7 +40,7 @@ public EncryptionKeySize keySize() { } @Override - public void createKeyPair(Path publicKey, Path privateKey, String username, String password) + public void createKeyPair(OutputStream publicKey, OutputStream privateKey, String username, String password) throws LicensingException { throw new UnsupportedOperationException(); diff --git a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/conditions/mining/EchoStreamCodec.java b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/conditions/mining/EchoStreamCodec.java index 015bd81cc..8621ccaf5 100644 --- a/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/conditions/mining/EchoStreamCodec.java +++ b/tests/org.eclipse.passage.lic.base.tests/src/org/eclipse/passage/lic/internal/base/tests/conditions/mining/EchoStreamCodec.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -18,7 +18,6 @@ import java.io.LineNumberReader; import java.io.OutputStream; import java.io.PrintWriter; -import java.nio.file.Path; import org.eclipse.passage.lic.internal.api.LicensedProduct; import org.eclipse.passage.lic.internal.api.LicensingException; @@ -54,7 +53,7 @@ public EncryptionKeySize keySize() { } @Override - public void createKeyPair(Path publicKey, Path privateKey, String username, String password) + public void createKeyPair(OutputStream publicKey, OutputStream privateKey, String username, String password) throws LicensingException { throw new UnsupportedOperationException(); } diff --git a/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/BcStreamCodecTest.java b/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/BcStreamCodecTest.java index 210d91b49..572a4a0cf 100644 --- a/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/BcStreamCodecTest.java +++ b/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/BcStreamCodecTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -25,6 +25,7 @@ import org.eclipse.passage.lic.internal.api.LicensedProduct; import org.eclipse.passage.lic.internal.api.LicensingException; +import org.eclipse.passage.lic.internal.api.io.StreamCodec; import org.eclipse.passage.lic.internal.base.BaseLicensedProduct; import org.eclipse.passage.lic.internal.base.io.PassageFileExtension; import org.eclipse.passage.lic.internal.bc.BcStreamCodec; @@ -49,7 +50,7 @@ protected final PairInfo pair(String user, String pass) throws IOException protected final PairInfo pair(ThrowingCtor ctor, String user, String pass) throws IOException { Path pub = new TmpFile(root).keyFile(new PassageFileExtension.PublicKey()); Path secret = new TmpFile(root).keyFile(new PassageFileExtension.PrivateKey()); - BcStreamCodec codec = new BcStreamCodec(this::product); + StreamCodec.Smart codec = new StreamCodec.Smart(new BcStreamCodec(this::product)); try { codec.createKeyPair(pub, secret, user, pass); } catch (LicensingException e) { diff --git a/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/KeyPairGenerationTest.java b/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/KeyPairGenerationTest.java index 1d840f813..530e656ff 100644 --- a/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/KeyPairGenerationTest.java +++ b/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/KeyPairGenerationTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -26,6 +26,8 @@ import org.eclipse.passage.lic.internal.api.LicensingException; import org.eclipse.passage.lic.internal.api.io.DigestExpectation; +import org.eclipse.passage.lic.internal.api.io.StreamCodec; +import org.eclipse.passage.lic.internal.api.io.StreamCodec.Smart; import org.eclipse.passage.lic.internal.base.io.FileContent; import org.eclipse.passage.lic.internal.base.io.PassageFileExtension; import org.eclipse.passage.lic.internal.bc.BcStreamCodec; @@ -107,7 +109,7 @@ public void generatedPairIsFunctional() throws IOException { @Test(expected = NullPointerException.class) public void publicKeyPathIsMandatory() throws LicensingException, IOException { - new BcStreamCodec(this::product).createKeyPair(// + codec().createKeyPair(// null, // new TmpFile(root).keyFile(new PassageFileExtension.PrivateKey()), // "u", //$NON-NLS-1$ @@ -116,7 +118,7 @@ public void publicKeyPathIsMandatory() throws LicensingException, IOException { @Test(expected = NullPointerException.class) public void privateKeyPathIsMandatory() throws LicensingException, IOException { - new BcStreamCodec(this::product).createKeyPair(// + codec().createKeyPair(// new TmpFile(root).keyFile(new PassageFileExtension.PublicKey()), // null, // "u", //$NON-NLS-1$ @@ -125,7 +127,7 @@ public void privateKeyPathIsMandatory() throws LicensingException, IOException { @Test(expected = NullPointerException.class) public void usernameIsMandatory() throws LicensingException, IOException { - new BcStreamCodec(this::product).createKeyPair(// + codec().createKeyPair(// new TmpFile(root).keyFile(new PassageFileExtension.PublicKey()), // new TmpFile(root).keyFile(new PassageFileExtension.PrivateKey()), // null, // @@ -134,7 +136,7 @@ public void usernameIsMandatory() throws LicensingException, IOException { @Test(expected = NullPointerException.class) public void passwordIsMandatory() throws LicensingException, IOException { - new BcStreamCodec(this::product).createKeyPair(// + codec().createKeyPair(// new TmpFile(root).keyFile(new PassageFileExtension.PublicKey()), // new TmpFile(root).keyFile(new PassageFileExtension.PrivateKey()), // "u", //$NON-NLS-1$ @@ -146,7 +148,7 @@ public void absentPrivateKeyFileIsCreated() throws LicensingException, IOExcepti // given Path privatePath = new TmpFile(root).keyPath(new PassageFileExtension.PrivateKey()); // when - new BcStreamCodec(this::product).createKeyPair(// + codec().createKeyPair(// new TmpFile(root).keyFile(new PassageFileExtension.PublicKey()), // privatePath, // "u", //$NON-NLS-1$ @@ -160,7 +162,7 @@ public void absentPublicKeyFileIsCreated() throws LicensingException, IOExceptio // given Path publicPath = new TmpFile(root).keyPath(new PassageFileExtension.PublicKey()); // when - new BcStreamCodec(this::product).createKeyPair(// + codec().createKeyPair(// publicPath, // new TmpFile(root).keyFile(new PassageFileExtension.PrivateKey()), // "u", //$NON-NLS-1$ @@ -173,4 +175,8 @@ private PairInfo pair(ThrowingCtor ctor) throws IOException { return pair(ctor, "test-user", "test-pass-word");//$NON-NLS-1$//$NON-NLS-2$ } + private Smart codec() { + return new StreamCodec.Smart(new BcStreamCodec(this::product)); + } + } diff --git a/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/StreamEncodingTest.java b/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/StreamEncodingTest.java index d3370daab..851d56a73 100644 --- a/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/StreamEncodingTest.java +++ b/tests/org.eclipse.passage.lic.bc.tests/src/org/eclipse/passage/lic/internal/bc/tests/StreamEncodingTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2020 ArSysOp + * Copyright (c) 2020, 2021 ArSysOp * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -27,6 +27,7 @@ import java.util.Objects; import org.eclipse.passage.lic.internal.api.LicensingException; +import org.eclipse.passage.lic.internal.api.io.StreamCodec; import org.eclipse.passage.lic.internal.base.io.FileContent; import org.eclipse.passage.lic.internal.base.io.PassageFileExtension; import org.eclipse.passage.lic.internal.bc.BcStreamCodec; @@ -119,7 +120,7 @@ public void passwordIsMandatory() throws IOException { private Path privateKey(String user, String pass) throws IOException { Path key = new TmpFile(root).keyFile(new PassageFileExtension.PrivateKey()); try { - new BcStreamCodec(this::product).createKeyPair(// + new StreamCodec.Smart(new BcStreamCodec(this::product)).createKeyPair(// new TmpFile(root).keyFile(new PassageFileExtension.PublicKey()), // key, user, pass); } catch (LicensingException e) { From 1652fc4e02b1f0d6a1a0962f34eeb6df7f44f274 Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Sat, 24 Apr 2021 15:22:39 +0300 Subject: [PATCH 4/7] Bug 573129 StremCodec must supply encryption keys to streams Bump service version for affected bundle Signed-off-by: eparovyshnaya --- tests/org.eclipse.passage.lic.bc.tests/META-INF/MANIFEST.MF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/org.eclipse.passage.lic.bc.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.passage.lic.bc.tests/META-INF/MANIFEST.MF index 2e73d3986..f245aab65 100644 --- a/tests/org.eclipse.passage.lic.bc.tests/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.passage.lic.bc.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Automatic-Module-Name: org.eclipse.passage.lic.bc.tests Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.passage.lic.bc.tests -Bundle-Version: 0.5.0.qualifier +Bundle-Version: 0.5.100.qualifier Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor Bundle-Copyright: %Bundle-Copyright From ad5e8af4156abbaf6a489133870a38235da72bb4 Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Sat, 24 Apr 2021 15:23:21 +0300 Subject: [PATCH 5/7] Bug 573129 StremCodec must supply encryption keys to streams Temporarily roll back Signed-off-by: eparovyshnaya --- .../passage/loc/internal/products/core/ProductVersionKeys.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductVersionKeys.java b/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductVersionKeys.java index 76df954c1..37974c286 100644 --- a/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductVersionKeys.java +++ b/bundles/org.eclipse.passage.loc.products.core/src/org/eclipse/passage/loc/internal/products/core/ProductVersionKeys.java @@ -71,7 +71,8 @@ private IStatus createKeyPair(ProductVersionDescriptor target, LicensedProduct p Path destination = new UserHomeProductResidence(product).get(); Path open = open(product, destination); Path secret = secret(product, destination); - codec.createKeyPair(open, secret, product.identifier(), new ProductVersionPassword(target).get()); + new StreamCodec.Smart(codec).createKeyPair(open, secret, product.identifier(), + new ProductVersionPassword(target).get()); notify.accept(open, secret); // TODO: store .keys_xmi under workspace return created(open, secret); From 86d7c5c3f3fecc2622d5505fada3fba4e62cc958 Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Sat, 24 Apr 2021 15:28:51 +0300 Subject: [PATCH 6/7] Bug 573129 StremCodec must supply encryption keys to streams Bump service version for affected bundle Signed-off-by: eparovyshnaya --- bundles/org.eclipse.passage.lic.bc/META-INF/MANIFEST.MF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.passage.lic.bc/META-INF/MANIFEST.MF b/bundles/org.eclipse.passage.lic.bc/META-INF/MANIFEST.MF index e4c0a264c..396aef41c 100644 --- a/bundles/org.eclipse.passage.lic.bc/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.passage.lic.bc/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Automatic-Module-Name: org.eclipse.passage.lic.bc Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.passage.lic.bc -Bundle-Version: 1.0.200.qualifier +Bundle-Version: 1.0.300.qualifier Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor Bundle-Copyright: %Bundle-Copyright From aadffba2cec15e6a77cf73ef0dacd6905edf778a Mon Sep 17 00:00:00 2001 From: Elena Parovyshnaia Date: Sat, 24 Apr 2021 15:33:31 +0300 Subject: [PATCH 7/7] Bug 573129 StremCodec must supply encryption keys to streams Bump service version for affected feature Signed-off-by: eparovyshnaya --- features/org.eclipse.passage.lic.bc.feature/feature.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/org.eclipse.passage.lic.bc.feature/feature.xml b/features/org.eclipse.passage.lic.bc.feature/feature.xml index 01f4b5bdb..ee059c2d3 100644 --- a/features/org.eclipse.passage.lic.bc.feature/feature.xml +++ b/features/org.eclipse.passage.lic.bc.feature/feature.xml @@ -14,7 +14,7 @@