aboutsummaryrefslogtreecommitdiff
path: root/java/com/android/libraries/entitlement/http
diff options
context:
space:
mode:
authorMeng Wang <mewan@google.com>2021-02-24 11:12:56 -0800
committerMeng Wang <mewan@google.com>2021-03-03 19:56:19 -0800
commit1d74d2d9c825b08dd4e5666f443fc6feba75ca77 (patch)
tree284480e404166fbab2746ec45f3afeb45ec4c5a0 /java/com/android/libraries/entitlement/http
parente8e72b2d3f378e41d4e719f2b5ad339aaf3f507c (diff)
downloadservice_entitlement-1d74d2d9c825b08dd4e5666f443fc6feba75ca77.tar.gz
Handle EAP synchronization failure
Main changes: 1. EapAkaApi can support sync failure flow to get configuration doc 2. Seperate EAP-AKA challenge parsing from EapAkaResponse into a new class EapAkaChallenge 3. EapAkaResponse can represent either a success response or a sync failure 4. EapAkaSecurityContext can parse AUTS for sync failure Bug: 181052106 Test: atest Change-Id: I7bb942ca679cacf8ff6898177248419b56e06741
Diffstat (limited to 'java/com/android/libraries/entitlement/http')
-rw-r--r--java/com/android/libraries/entitlement/http/HttpClient.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/com/android/libraries/entitlement/http/HttpClient.java b/java/com/android/libraries/entitlement/http/HttpClient.java
index 8476164..76eeaec 100644
--- a/java/com/android/libraries/entitlement/http/HttpClient.java
+++ b/java/com/android/libraries/entitlement/http/HttpClient.java
@@ -17,8 +17,8 @@
package com.android.libraries.entitlement.http;
import static com.android.libraries.entitlement.ServiceEntitlementException.ERROR_HTTP_STATUS_NOT_SUCCESS;
-import static com.android.libraries.entitlement.ServiceEntitlementException.ERROR_SEVER_NOT_CONNECTABLE;
-import static com.android.libraries.entitlement.ServiceEntitlementException.MALFORMED_HTTP_RESPONSE;
+import static com.android.libraries.entitlement.ServiceEntitlementException.ERROR_MALFORMED_HTTP_RESPONSE;
+import static com.android.libraries.entitlement.ServiceEntitlementException.ERROR_SERVER_NOT_CONNECTABLE;
import static com.android.libraries.entitlement.http.HttpConstants.RequestMethod.POST;
import static com.android.libraries.entitlement.utils.DebugUtils.logPii;
@@ -107,7 +107,7 @@ public class HttpClient {
}
} catch (IOException ioe) {
throw new ServiceEntitlementException(
- ERROR_SEVER_NOT_CONNECTABLE, "Configure connection failed!", ioe);
+ ERROR_SERVER_NOT_CONNECTABLE, "Configure connection failed!", ioe);
}
}
@@ -143,7 +143,7 @@ public class HttpClient {
responseBuilder.setBody(responseBody);
} catch (IOException e) {
throw new ServiceEntitlementException(
- MALFORMED_HTTP_RESPONSE, "Read response body/message failed!", e);
+ ERROR_MALFORMED_HTTP_RESPONSE, "Read response body/message failed!", e);
}
return responseBuilder.build();
}