Skip to content

Commit

Permalink
Java client HTTPS handling: use SSL certificate if provided
Browse files Browse the repository at this point in the history
This fixes a regression introduced in e808e03.
  • Loading branch information
hlg committed Nov 3, 2023
1 parent dc74524 commit 6daa43a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected SCheckoutResult convertModelToCheckoutResult(Project project, String u
try {
Serializer serializer = getBimServer().getSerializerFactory().create(project, username, model, renderEnginePlugin, downloadParameters);
if (serializer == null) {
throw new UserException("Error, no serializer found " + downloadParameters.getSerializerOid());
throw new UserException("Error, serializer " + downloadParameters.getSerializerOid() + "not found or failed to intialize.");
}
if (getBimServer().getServerSettingsCache().getServerSettings().getCacheOutputFiles() && serializer.allowCaching()) {
if (getBimServer().getDiskCacheManager().contains(downloadParameters)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public AbstractBimServerClientFactory(MetaDataManager metaDataManager, URL trust
addService(new SService(servicesMap, null, NotificationRegistryInterface.class));
addService(new SService(servicesMap, null, OAuthInterface.class));
servicesMap.initialize();
initHttpClient(sslContext(trustedCertificate));
initHttpClient(trustedCertificate != null ? sslContext(trustedCertificate) : null);
}

public AbstractBimServerClientFactory(MetaDataManager metaDataManager) throws BimServerClientException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public JsonBimServerClientFactory(String address, SServicesMap servicesMap, Json
*/

public JsonBimServerClientFactory(MetaDataManager metaDataManager, String address, URL trustedCertificate) throws BimServerClientException {
super(metaDataManager);
super(metaDataManager, trustedCertificate);
this.address = address;
this.jsonSocketReflectorFactory = new JsonSocketReflectorFactory(getServicesMap(), getHttpClient());
RealtimeReflectorFactoryBuilder factoryBuilder = new RealtimeReflectorFactoryBuilder(getServicesMap());
Expand Down

0 comments on commit 6daa43a

Please sign in to comment.