Skip to content

Commit

Permalink
Bug 572366 verify product's public key on hc-fls interaction
Browse files Browse the repository at this point in the history
move not-generated floating.model utils to 'internal' package

Signed-off-by: eparovyshnaya <[email protected]>
  • Loading branch information
MI authored and eparovyshnaya committed Mar 31, 2021
1 parent 3b26a52 commit 378d043
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import java.util.Optional;
import java.util.function.Supplier;

import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.internal.api.EvaluationInstructions;
import org.eclipse.passage.lic.internal.api.EvaluationType;
import org.eclipse.passage.lic.internal.base.conditions.BaseEvaluationInstructions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public Logging(ConfigSupplier config) {
@SuppressWarnings("resource")
public void configure() {
try {
System.setProperty("org.apache.logging.log4j.simplelog.StatusLogger.level", "ERROR"); //$NON-NLS-1$//$NON-NLS-2$
ConfigurationSource source = new ConfigurationSource(new FileInputStream(config.get().toFile()));
Configurator.initialize(getClass().getClassLoader().getParent(), source);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="0.0.0";resolution:=opti
org.eclipse.passage.lic.floating;bundle-version="0.0.0";visibility:=reexport,
org.eclipse.passage.lic.api;bundle-version="1.0.100",
org.eclipse.passage.lic.base;bundle-version="1.0.100"
Export-Package: org.eclipse.passage.lic.floating.model.api;
Export-Package: org.eclipse.passage.lic.floating.internal.model.convert;x-friends:="org.eclipse.passage.lic.hc",
org.eclipse.passage.lic.floating.internal.model.net;x-friends:="org.eclipse.passage.lbc.base,org.eclipse.passage.lic.hc",
org.eclipse.passage.lic.floating.model.api;
x-friends:="org.eclipse.passage.lic.floating.edit,
org.eclipse.passage.loc.dashboard.ui,
org.eclipse.passage.loc.api,
Expand All @@ -24,7 +26,6 @@ Export-Package: org.eclipse.passage.lic.floating.model.api;
org.eclipse.passage.lbc.base,
org.eclipse.passage.lbc.api,
org.eclipse.passage.lbc.base.tests",
org.eclipse.passage.lic.floating.model.convert;x-friends:="org.eclipse.passage.lic.hc",
org.eclipse.passage.lic.floating.model.impl;x-internal:=true,
org.eclipse.passage.lic.floating.model.meta;
x-friends:="org.eclipse.passage.lic.floating.e4.ui,
Expand All @@ -35,7 +36,6 @@ Export-Package: org.eclipse.passage.lic.floating.model.api;
org.eclipse.passage.lbc.base,
org.eclipse.passage.lbc.base.tests,
org.eclipse.passage.lic.hc",
org.eclipse.passage.lic.floating.model.net,
org.eclipse.passage.lic.floating.model.util;x-friends:="org.eclipse.passage.lic.floating.edit"
Bundle-ClassPath: .
Bundle-ActivationPolicy: lazy
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.floating.model.convert;
package org.eclipse.passage.lic.floating.internal.model.convert;

import java.util.function.Supplier;

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,15 +10,16 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.floating.model.convert;
package org.eclipse.passage.lic.floating.internal.model.convert;

import java.util.Objects;
import java.util.function.Supplier;

import org.eclipse.passage.lic.floating.model.api.GrantAcqisition;
import org.eclipse.passage.lic.internal.base.acquire.BaseGrantAcquisition;

public final class PGrantAcquisition implements Supplier<org.eclipse.passage.lic.internal.api.acquire.GrantAcquisition> {
public final class PGrantAcquisition
implements Supplier<org.eclipse.passage.lic.internal.api.acquire.GrantAcquisition> {

private final GrantAcqisition source;

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.floating.model.net;
package org.eclipse.passage.lic.floating.internal.model.net;

import java.util.function.Function;

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,7 +10,7 @@
* Contributors:
* ArSysOp - initial API and implementation
*******************************************************************************/
package org.eclipse.passage.lic.floating.model.net;
package org.eclipse.passage.lic.floating.internal.model.net;

import java.util.function.Function;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import java.util.List;
import java.util.stream.Collectors;

import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.internal.api.LicensedProduct;
import org.eclipse.passage.lic.internal.api.LicensingException;
import org.eclipse.passage.lic.internal.api.PassageAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import java.nio.file.Path;
import java.util.function.Supplier;

import org.eclipse.passage.lic.floating.internal.model.convert.PGrantAcquisition;
import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess;
import org.eclipse.passage.lic.floating.model.convert.PGrantAcquisition;
import org.eclipse.passage.lic.internal.api.LicensingException;
import org.eclipse.passage.lic.internal.api.acquire.GrantAcquisition;
import org.eclipse.passage.lic.internal.api.io.HashesRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import java.nio.file.Path;
import java.util.function.Supplier;

import org.eclipse.passage.lic.floating.internal.model.convert.EGrantAcquisition;
import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess;
import org.eclipse.passage.lic.floating.model.convert.EGrantAcquisition;
import org.eclipse.passage.lic.internal.api.LicensingException;
import org.eclipse.passage.lic.internal.api.acquire.GrantAcquisition;
import org.eclipse.passage.lic.internal.api.io.HashesRegistry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import java.util.Arrays;

import org.eclipse.passage.lbc.internal.base.FlotingRequestHandled;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.internal.api.EvaluationType;
import org.eclipse.passage.lic.internal.api.PassageAction;
import org.eclipse.passage.lic.internal.base.ProductIdentifier;
Expand All @@ -29,6 +29,7 @@
import org.eclipse.passage.lic.internal.net.handle.Failure;
import org.junit.Test;

@SuppressWarnings("restriction")
public final class MineTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import org.eclipse.passage.lbc.internal.base.EagerFloatingState;
import org.eclipse.passage.lbc.internal.base.api.FloatingState;
import org.eclipse.passage.lbc.internal.base.api.RawRequest;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.internal.api.EvaluationType;
import org.eclipse.passage.lic.internal.api.PassageAction;
import org.eclipse.passage.lic.internal.base.NamedData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
import static org.junit.Assert.assertTrue;

import org.eclipse.passage.lbc.internal.base.FlotingRequestHandled;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.internal.api.EvaluationType;
import org.eclipse.passage.lic.internal.api.PassageAction;
import org.eclipse.passage.lic.internal.base.StringNamedData;
import org.eclipse.passage.lic.internal.net.api.handle.NetResponse;
import org.eclipse.passage.lic.internal.net.handle.Failure;
import org.junit.Test;

@SuppressWarnings("restriction")
public final class ServerAuthenticationTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
import java.io.IOException;
import java.net.URL;

import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.internal.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.floating.model.api.EvaluationInstructions;
import org.eclipse.passage.lic.floating.model.api.FloatingLicenseAccess;
import org.eclipse.passage.lic.floating.model.api.FloatingServerConnection;
import org.eclipse.passage.lic.floating.model.meta.FloatingFactory;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationExpression;
import org.eclipse.passage.lic.floating.model.net.ServerAuthenticationType;
import org.eclipse.passage.lic.internal.api.LicensedProduct;
import org.eclipse.passage.lic.internal.api.LicensingException;
import org.eclipse.passage.lic.internal.api.PassageAction;
Expand Down

0 comments on commit 378d043

Please sign in to comment.