Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14 from openconnectivity/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
javiguerra committed Oct 24, 2019
2 parents 255dc70 + 7f46bdc commit 6b6057b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/debian/otgc_native.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Constants
PROJECT_NAME="otgc"
VERSION="2.4.0"
VERSION="2.5.0"

program=$0

Expand Down
9 changes: 5 additions & 4 deletions extlibs/patchs/remove_cred_by_credid.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/include/oc_pki.h b/include/oc_pki.h
index acbab8c..c16b512 100644
index acbab8c7..c16b512b 100644
--- a/include/oc_pki.h
+++ b/include/oc_pki.h
@@ -45,6 +45,9 @@ int oc_pki_add_trust_anchor(size_t device, const unsigned char *cert,
Expand All @@ -13,10 +13,10 @@ index acbab8c..c16b512 100644
}
#endif
diff --git a/security/oc_pki.c b/security/oc_pki.c
index a9306c2..c9b3b15 100644
index a9306c23..52755576 100644
--- a/security/oc_pki.c
+++ b/security/oc_pki.c
@@ -354,6 +354,16 @@ oc_pki_add_trust_anchor(size_t device, const unsigned char *cert,
@@ -354,6 +354,17 @@ oc_pki_add_trust_anchor(size_t device, const unsigned char *cert,
return pki_add_trust_anchor(device, cert, cert_size, OC_CREDUSAGE_TRUSTCA);
}

Expand All @@ -27,14 +27,15 @@ index a9306c2..c9b3b15 100644
+ if (cred)
+ {
+ oc_sec_remove_cred(cred, device);
+ oc_sec_dump_cred(device);
+ }
+}
+
#else /* OC_PKI */
typedef int dummy_declaration;
#endif /* !OC_PKI */
diff --git a/swig/swig_interfaces/oc_pki.i b/swig/swig_interfaces/oc_pki.i
index 2765e56..9910770 100644
index 2765e562..9910770c 100644
--- a/swig/swig_interfaces/oc_pki.i
+++ b/swig/swig_interfaces/oc_pki.i
@@ -105,4 +105,6 @@ void jni_pki_set_security_profile(size_t device,
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>otgc</groupId>
<artifactId>otgc</artifactId>
<version>2.4.0</version>
<version>2.5.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public Single<List<OcCredential>> execute() {
List<OcCredential> trustAnchorList = new ArrayList<>();
for (OcCredential cred : credentials.getCredList()) {
if (cred.getCredusage() != null
&& cred.getCredusage() == OcfCredUsage.OC_CREDUSAGE_TRUSTCA) {
&& (cred.getCredusage() == OcfCredUsage.OC_CREDUSAGE_MFGTRUSTCA
|| cred.getCredusage() == OcfCredUsage.OC_CREDUSAGE_TRUSTCA)) {
trustAnchorList.add(cred);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public OcfOxmType onGetOxM(List<OcfOxmType> supportedOxm) {
Platform.runLater(() -> {
ChoiceDialog alertDialog = new ChoiceDialog(options.get(0), options);
alertDialog.setTitle(resourceBundle.getString("dialog.title.select_oxm"));
alertDialog.setHeaderText("OXM: ");
alertDialog.setHeaderText("OTM: ");

Optional<String> result = alertDialog.showAndWait();
if (result.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class TrustAnchorViewCell extends ListCell<OcCredential> {
private GridPane gridPane = new GridPane();
private Label credId = new Label();
private Label credSubject = new Label();
private Label credUsage = new Label();

public TrustAnchorViewCell() {
configureGrid();
Expand All @@ -42,6 +43,7 @@ private void configureGrid() {
private void addControlsToGrid() {
gridPane.add(credId, 0, 0);
gridPane.add(credSubject, 0, 1);
gridPane.add(credUsage, 0, 2);
}

@Override
Expand All @@ -65,6 +67,7 @@ private void addContent(OcCredential cred) {

credId.setText("Credential ID: " + String.valueOf(cred.getCredid()));
credSubject.setText("UUID: " + cred.getSubjectuuid());
credSubject.setText("Usage: " + cred.getCredusage().getValue());

setGraphic(gridPane);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/properties/Strings_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ linkdevices.label.role_id=Role ID
linkdevices.label.role_authority= Role authority

## Dialog
dialog.title.select_oxm=Select OXM
dialog.title.select_oxm=Select OTM
dialog.title.set_device_name=Set device name
dialog.title.confirm_reset_mode=Reset device
dialog.message.confirm_reset_mode=Are you sure you want to delete all linked devices?

## Iotivity
oxm.just_works=Just Works
oxm.random_pin=Random Pin
oxm.manufacturer_certificate=Manufacturer Certificate
oxm.manufacturer_certificate=PKI

0 comments on commit 6b6057b

Please sign in to comment.