Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credential ID and Type always returns "0" and "Unknown" on Java/Linux #107

Open
AntGarrido opened this issue Sep 13, 2021 · 1 comment
Open
Assignees
Labels
linux issue on linux

Comments

@AntGarrido
Copy link
Collaborator

AntGarrido commented Sep 13, 2021

OCCred_credType_get returns 0 (Unknown), and OCCred_credId_get returns 0 for all credential types when used in Java/Linux. When used in Java/Android or C/Linux, however, they return proper codes and work as expected.

For Linux the compilation flags are:
DEBUG=1 SECURE=1 IPV4=1 TCP=1 PKI=1 DYNAMIC=1 CLOUD=1 JAVA=1 IDD=1

@WAvdBeek WAvdBeek added the linux issue on linux label Sep 21, 2021
@AntGarrido
Copy link
Collaborator Author

Using onboarding_tool (C), code 19 (Retrieve own creds), values are as expected:

credid: 1414584228
subjectuuid: *
credtype: Asymmetric signing key with certificate
credusage: oic.sec.cred.trustca
publicdata_encoding: oic.sec.encoding.pem
privatedata_encoding: Unknown

However, using java_onboarding_tool, returns this:

credid: 0 
subjectuuid: d0d52364-0800-0000-2a00-000000000000
credtype: Unknown 
credusage: None 
privatedata_encoding: Unknown

For all credentials, credid is always "0", credtype "Unknown", and credusage "None"

I've noticed the Makefile for swig has some SWIG_CFLAG missing:

ifeq ($(CLOUD),1)
	TCP=1
	EXTRA_FLAG += -DOC_CLOUD
	SWIG_CFLAG += -DOC_CLOUD
	CLOUD_OBJ_DIR = $(PORT_OBJ_DIR)cloud/*.o
endif

ifneq ($(SECURE),0)
	EXTRA_FLAG += -DOC_SECURITY
	SWIG_CFLAG += -DOC_SECURITY
endif

ifeq ($(IDD), 1)
	EXTRA_FLAG += -DOC_IDD_API
	SWIG_CFLAG += -DOC_IDD_API
endif

ifneq ($(PKI),0)
	EXTRA_FLAG += -DOC_PKI
	SWIG_CFLAG += -DOC_PKI
endif

With these changes, I'm able to see now the correct credusage values

credid: 0
subjectuuid: d0d52364-0800-0000-2a00-000000000000
credtype: Unknown
credusage: oic.sec.cred.trustca
publicdata_encoding: oic.sec.encoding.pem
privatedata_encoding: Unknown

But credid and credtype still return 0 and Unknown

@AntGarrido AntGarrido changed the title Credential Type always returns "Unknown" Credential ID and Type always returns "0" and "Unknown" on Java/Linux Sep 24, 2021
@Danielius1922 Danielius1922 self-assigned this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux issue on linux
Projects
None yet
Development

No branches or pull requests

3 participants