This repository has been archived by the owner on May 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved documentation. Rename SecureSocketServers->RequestSecureSock…
…etProvider. Add unregister method Signed-off-by: David Graeff <david.graeff@web.de>
- Loading branch information
David Graeff
committed
Mar 28, 2018
1 parent
40f946f
commit fb9b055
Showing
9 changed files
with
109 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
This content is produced and maintained by the Eclipse SmartHome project. | ||
|
||
* Project home: https://eclipse.org/smarthome/ | ||
|
||
== Declared Project Licenses | ||
|
||
This program and the accompanying materials are made available under the terms | ||
of the Eclipse Public License 2.0 which is available at | ||
https://www.eclipse.org/legal/epl-2.0/. | ||
|
||
== Source Code | ||
|
||
https://github.com/eclipse/smarthome | ||
|
||
== Copyright Holders | ||
|
||
See the NOTICE file distributed with the source code at | ||
https://github.com/eclipse/smarthome/blob/master/NOTICE | ||
for detailed information regarding copyright ownership. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
bin.includes = META-INF/,\ | ||
.,\ | ||
about.html | ||
NOTICE | ||
source.. = src/main/java/ | ||
output.. = target/classes |
60 changes: 60 additions & 0 deletions
60
...rity/src/main/java/org/eclipse/smarthome/io/security/api/RequestSecureSocketProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* Copyright (c) 2014,2018 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.eclipse.smarthome.io.security.api; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* A central service interface to provide SSL/DTLS configuration for server-like services within ESH and derived | ||
* products. | ||
* An implementation is required to return on a best effort approach a working SSLContext or any other secure socket | ||
* provider, if required with a self-signed certificate. Network based services within ESH should be able to provide a | ||
* secure TLS or DTLS based endpoint from the first start on. | ||
* | ||
* @author David Graeff - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public interface RequestSecureSocketProvider { | ||
/** | ||
* To retrieve a working secure socket provider (usually a SSLContext object), you would call this | ||
* method and get an asynchronous callback as soon as the context is ready. It can take a while (some seconds) | ||
* to resolve a new SSLContext if there is none so far. Please note that an async behavior is not guaranteed, | ||
* and you might get called back straight from this method call. | ||
* | ||
* You are also automatically registering to change notifications. If the requested provider changes after | ||
* some time, for example because a certificate was renewed or the user removed the provider deliberately, | ||
* you will get notified with a refreshed or alternative provider. Call | ||
* {@link #removeProviderRequest(SecureSocketRequest)} to unregister from such notifications. | ||
* | ||
* The given request/callback object has a second purpose: You can describe what features your secure socket | ||
* provider should fulfil (mandatoryCapabilities) and what features are nice to have (optionalCapabilities). | ||
* | ||
* For example if you need a Scandium DtlsConnector, you would return | ||
* {SecureSocketRequest.SCANDIUM_CONNECTOR,SecureSocketRequest.DTLS} for mandatoryCapabilities(). | ||
* | ||
* The behavior is undefined if you specify two contrary features like SecureSocketRequest.SCANDIUM_CONNECTOR | ||
* and SecureSocketRequest.SSLCONTEXT. | ||
* | ||
*/ | ||
void addProviderRequest(SecureSocketRequest consumer); | ||
|
||
/** | ||
* By calling {@link #addProviderRequest(SecureSocketRequest)} you are registering to change notifications. If the | ||
* requested provider changes after some time, for example because a certificate was renewed or the user removed the | ||
* provider deliberately, you will get notified with a refreshed or alternative provider. Call this method to | ||
* unregister from such notifications. | ||
* | ||
* @param consumer | ||
*/ | ||
void removeProviderRequest(SecureSocketRequest consumer); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
....io.security/src/main/java/org/eclipse/smarthome/io/security/api/SecureSocketServers.java
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
...me.io.security/src/main/java/org/eclipse/smarthome/io/security/api/annotation/Secret.java
This file was deleted.
Oops, something went wrong.