Remove json_data from API 10/308310/2
authorDongsun Lee <ds73.lee@samsung.com>
Thu, 21 Mar 2024 07:59:32 +0000 (16:59 +0900)
committerDongsun Lee <ds73.lee@samsung.com>
Thu, 21 Mar 2024 08:08:42 +0000 (17:08 +0900)
Change-Id: Ibc9199bbd076e9ac05119c1f9b342b2ee92b761d

include/webauthn-types.h
srcs/common/serialization.cpp
tests/serialization-test.cpp
tests/webauthn-client-test.cpp

index 4186db145d606a4cac8217e0adca9f977df17b1c..b242368c547686d6872bb0cb7946a591da5e9690 100644 (file)
@@ -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;
 
index 50e732bcf9af984e26111d7594f075e44ee2a56a..8f0c859445554cf1459e5a2d78d1d78d00f992c5 100644 (file)
@@ -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));
 }
 
index abfc515e8f2efedecf3b33ee3a88b8e0fd40ad98..991da79d7cf2b12565125a496e1932cc576609f5 100644 (file)
@@ -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;
index 5991a5ecdd6e7a65d38b7e4ef67a1f80a3a715ec..cabe6ae27ff9e27459c56fb1108b026006c2efb0 100644 (file)
@@ -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};