From: Dongsun Lee Date: Thu, 21 Mar 2024 07:59:32 +0000 (+0900) Subject: Remove json_data from API X-Git-Tag: accepted/tizen/unified/20240423.164622~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=257148e39c85f2555c40e1dc3978d2c1f8d0d92b;p=platform%2Fcore%2Fsecurity%2Fwebauthn.git Remove json_data from API Change-Id: Ibc9199bbd076e9ac05119c1f9b342b2ee92b761d --- diff --git a/include/webauthn-types.h b/include/webauthn-types.h index 4186db1..b242368 100644 --- a/include/webauthn-types.h +++ b/include/webauthn-types.h @@ -471,7 +471,6 @@ typedef struct __wauthn_pubkey_credential_attestaion { wauthn_authenticator_attestation_response_s *response; wauthn_authenticator_attachment_e authenticator_attachment; wauthn_authentication_exts_s *extensions; - wauthn_const_buffer_s *json_data; wauthn_hybrid_linked_data_s *linked_device; } wauthn_pubkey_credential_attestaion_s; @@ -492,7 +491,6 @@ typedef struct __wauthn_pubkey_credential_assertion { wauthn_authenticator_assertion_response_s *response; wauthn_authenticator_attachment_e authenticator_attachment; wauthn_authentication_exts_s *extensions; - wauthn_const_buffer_s *json_data; wauthn_hybrid_linked_data_s *linked_device; } wauthn_pubkey_credential_assertion_s; diff --git a/srcs/common/serialization.cpp b/srcs/common/serialization.cpp index 50e732b..8f0c859 100644 --- a/srcs/common/serialization.cpp +++ b/srcs/common/serialization.cpp @@ -770,7 +770,6 @@ void WAuthnCtypeSerializer::serialize(IStream& stream, const wauthn_pubkey_crede serialize(stream, data->rawId); serialize(stream, data->response); serialize(stream, data->extensions); - serialize(stream, data->json_data); serialize(stream, data->linked_device); } void WAuthnCtypeSerializer::deserialize(IStream& stream, wauthn_pubkey_credential_attestaion_s** data) { @@ -784,7 +783,6 @@ void WAuthnCtypeSerializer::deserialize(IStream& stream, wauthn_pubkey_credentia deserialize(stream, &((*data)->rawId)); deserialize(stream, &((*data)->response)); deserialize(stream, &((*data)->extensions)); - deserialize(stream, &((*data)->json_data)); deserialize(stream, &((*data)->linked_device)); } @@ -806,7 +804,6 @@ void WAuthnCtypeSerializer::serialize(IStream& stream, const wauthn_pubkey_crede serialize(stream, data->rawId); serialize(stream, data->response); serialize(stream, data->extensions); - serialize(stream, data->json_data); serialize(stream, data->linked_device); } void WAuthnCtypeSerializer::deserialize(IStream& stream, wauthn_pubkey_credential_assertion_s** data) { @@ -820,7 +817,6 @@ void WAuthnCtypeSerializer::deserialize(IStream& stream, wauthn_pubkey_credentia deserialize(stream, &((*data)->rawId)); deserialize(stream, &((*data)->response)); deserialize(stream, &((*data)->extensions)); - deserialize(stream, &((*data)->json_data)); deserialize(stream, &((*data)->linked_device)); } diff --git a/tests/serialization-test.cpp b/tests/serialization-test.cpp index abfc515..991da79 100644 --- a/tests/serialization-test.cpp +++ b/tests/serialization-test.cpp @@ -174,14 +174,14 @@ namespace SerializationTestData { nullptr, UVR_NONE, nullptr, AP_NONE, nullptr, nullptr, nullptr}; wauthn_pubkey_credential_attestaion_s pubkeyCredentialAttestation = {&bufferId, pubkeyCredType, &bufferId0, - &authenticatorAttestationResponse, attachment, &authenticationExts2, &buffer1, &hybirdLinkedData}; + &authenticatorAttestationResponse, attachment, &authenticationExts2, &hybirdLinkedData}; wauthn_pubkey_credential_attestaion_s emptyPubkeyCredentialAttestation = {nullptr, pubkeyCredType, nullptr, - nullptr, attachment, nullptr, nullptr, nullptr}; + nullptr, attachment, nullptr, nullptr}; wauthn_pubkey_credential_assertion_s pubkeyCredentialAssertion = {&bufferId, pubkeyCredType, &bufferId0, - &authenticatorAssertionResponse, attachment, &authenticationExts2, &buffer1, &hybirdLinkedData}; + &authenticatorAssertionResponse, attachment, &authenticationExts2, &hybirdLinkedData}; wauthn_pubkey_credential_assertion_s emptyPubkeyCredentialAssertion = {nullptr, pubkeyCredType, nullptr, - nullptr, attachment, nullptr, nullptr, nullptr}; + nullptr, attachment, nullptr, nullptr}; wauthn_hash_algorithm_e hashAlg = WAUTHN_HASH_ALGORITHM_SHA_256; wauthn_client_data_s clientData = {&bufferId, hashAlg}; @@ -1142,8 +1142,6 @@ bool __compareWAuthnPubkeyCredentialAttestionS(const wauthn_pubkey_credential_at return false; if(__compareWAuthnAuthenticationExtsS(expected->extensions, actual->extensions) == false) return false; - if(__compareWAuthnBuffers(expected->json_data, actual->json_data) == false) - return false; if(__compareWAuthnHybridLinkedDataS(expected->linked_device, actual->linked_device) == false) return false; return true; @@ -1202,8 +1200,6 @@ bool __compareWAuthnPubkeyCredentialAssertionS(const wauthn_pubkey_credential_as return false; if(__compareWAuthnAuthenticationExtsS(expected->extensions, actual->extensions) == false) return false; - if(__compareWAuthnBuffers(expected->json_data, actual->json_data) == false) - return false; if(__compareWAuthnHybridLinkedDataS(expected->linked_device, actual->linked_device) == false) return false; return true; diff --git a/tests/webauthn-client-test.cpp b/tests/webauthn-client-test.cpp index 5991a5e..cabe6ae 100644 --- a/tests/webauthn-client-test.cpp +++ b/tests/webauthn-client-test.cpp @@ -183,14 +183,14 @@ namespace CommonTestData { nullptr, UVR_NONE, nullptr, AP_NONE, nullptr, nullptr, nullptr}; wauthn_pubkey_credential_attestaion_s pubkeyCredentialAttestation = {&bufferId, pubkeyCredType, &bufferId0, - &authenticatorAttestationResponse, attachment, &authenticationExts2, &buffer1, &hybirdLinkedData}; + &authenticatorAttestationResponse, attachment, &authenticationExts2, &hybirdLinkedData}; wauthn_pubkey_credential_attestaion_s emptyPubkeyCredentialAttestation = {nullptr, pubkeyCredType, nullptr, - nullptr, attachment, nullptr, nullptr, nullptr}; + nullptr, attachment, nullptr, nullptr}; wauthn_pubkey_credential_assertion_s pubkeyCredentialAssertion = {&bufferId, pubkeyCredType, &bufferId0, - &authenticatorAssertionResponse, attachment, &authenticationExts2, &buffer1, &hybirdLinkedData}; + &authenticatorAssertionResponse, attachment, &authenticationExts2, &hybirdLinkedData}; wauthn_pubkey_credential_assertion_s emptyPubkeyCredentialAssertion = {nullptr, pubkeyCredType, nullptr, - nullptr, attachment, nullptr, nullptr, nullptr}; + nullptr, attachment, nullptr, nullptr}; wauthn_hash_algorithm_e hashAlg = WAUTHN_HASH_ALGORITHM_SHA_256; wauthn_client_data_s clientData = {&bufferId, hashAlg};