-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide CMP client implementation (#61)
- Loading branch information
Showing
65 changed files
with
5,554 additions
and
302 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
*.bak | ||
|
||
/target/ | ||
/path_accumulator_ps.tmp |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,57 @@ | ||
@startuml | ||
|
||
entity "**Embedding Application**" as embedapp | ||
|
||
activate embedapp | ||
|
||
participant "Client Instance" as Client | ||
participant "UpstreamExchange interface" as Upstream | ||
|
||
activate Upstream | ||
|
||
embedapp <-> Client : new CmpClient() | ||
|
||
activate Client | ||
|
||
hnote over embedapp, Client | ||
synchronous call of getCaCertificates(), | ||
getCertificateRequestTemplate(), getCrls(), | ||
getRootCaCertificateUpdate(), | ||
invokeEnrollment() or invokeRevocation() | ||
end note | ||
|
||
embedapp -> Client : invoke CmpClient method | ||
|
||
Client -> Upstream : sendReceiveMessage(**byte[]** request, **String** certProfile, **int** bodyTypeOfFirstRequest) | ||
|
||
alt synchronous | ||
Upstream --> Client : **byte[]** sendReceiveMessage (response) | ||
|
||
else asynchronous: delayed delivery | ||
|
||
Upstream --> Client : **byte[]** sendReceiveMessage (response with waiting indication) | ||
loop | ||
Client -> Upstream : sendReceiveMessage(**byte[]** pollRequest, **String** certProfile, **int** bodyTypeOfFirstRequest) | ||
alt | ||
Upstream --> Client : **byte[]** sendReceiveMessage (pollResponse) | ||
else | ||
break | ||
end | ||
|
||
end | ||
end | ||
|
||
Upstream --> Client : **byte[]** sendReceiveMessage (response) | ||
end | ||
opt sucessfull enrollment without implicit confirm | ||
Client -> Upstream : sendReceiveMessage(**byte[]** certConf, **String** certProfile, **int** bodyTypeOfFirstRequest) | ||
Upstream --> Client : **byte[]** sendReceiveMessage (pkiConf) | ||
end | ||
hnote over embedapp, Client | ||
response of getCaCertificates(), getCertificateRequestTemplate() | ||
getCrls(), getRootCaCertificateUpdate(), | ||
invokeEnrollment() or invokeRevocation() | ||
end note | ||
|
||
Client -> embedapp: CmpClient method call returns | ||
@enduml |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 @@ | ||
@startuml | ||
|
||
|
||
artifact embedding as "Embedding Application" { | ||
|
||
(**Upstream Interface**\n- provided by Embedding Application) as upif | ||
[**CmpClient Component**\n- instantiated by Embedding Application] as Client | ||
|
||
database "**Configuration Interface**\n- provided by Embedding Application" as config | ||
|
||
Client <= config : new CmpClient(config) | ||
|
||
left to right direction | ||
|
||
Client <--> upif : byte[] UpstreamExchange::sendReceiveMessage(byte[] request, String certProfile, int bodyTypeOfFirstRequest) | ||
} | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
48 changes: 48 additions & 0 deletions
48
src/main/java/com/siemens/pki/cmpclientcomponent/configuration/ClientContext.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,48 @@ | ||
/* | ||
* Copyright (c) 2022 Siemens AG | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package com.siemens.pki.cmpclientcomponent.configuration; | ||
|
||
/** | ||
* | ||
* generic client configuration | ||
*/ | ||
public interface ClientContext { | ||
|
||
/** | ||
* get enrollment specific configuration | ||
* | ||
* @return enrollment specific configuration | ||
*/ | ||
EnrollmentContext getEnrollmentContext(); | ||
|
||
/** | ||
* CMP message recipient or <code>null</code> if NULL_DN should be used | ||
* | ||
* @return CMP message recipient | ||
*/ | ||
default String getRecipient() { | ||
return null; | ||
} | ||
|
||
/** | ||
* get revocation specific configuration | ||
* | ||
* @return revocation specific configuration | ||
*/ | ||
RevocationContext getRevocationContext(); | ||
} |
Oops, something went wrong.