From acd835f99e694027faa6d7b1734d307b6e71a9ee Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Fri, 9 Oct 2015 15:20:57 -0700 Subject: First pass at the headers. --- src/core/security/credentials.h | 157 +++++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 66 deletions(-) (limited to 'src/core') diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h index b213e052d3..1bf628a946 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -54,13 +54,15 @@ typedef enum { #define GRPC_FAKE_TRANSPORT_SECURITY_TYPE "fake" -#define GRPC_CREDENTIALS_TYPE_SSL "Ssl" -#define GRPC_CREDENTIALS_TYPE_OAUTH2 "Oauth2" -#define GRPC_CREDENTIALS_TYPE_METADATA_PLUGIN "Plugin" -#define GRPC_CREDENTIALS_TYPE_JWT "Jwt" -#define GRPC_CREDENTIALS_TYPE_IAM "Iam" -#define GRPC_CREDENTIALS_TYPE_COMPOSITE "Composite" -#define GRPC_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY "FakeTransportSecurity" +#define GRPC_CHANNEL_CREDENTIALS_TYPE_SSL "Ssl" +#define GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY \ + "FakeTransportSecurity" + +#define GRPC_CALL_CREDENTIALS_TYPE_OAUTH2 "Oauth2" +#define GRPC_CALL_CREDENTIALS_TYPE_METADATA_PLUGIN "Plugin" +#define GRPC_CALL_CREDENTIALS_TYPE_JWT "Jwt" +#define GRPC_CALL_CREDENTIALS_TYPE_IAM "Iam" +#define GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE "Composite" #define GRPC_AUTHORIZATION_METADATA_KEY "Authorization" #define GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY \ @@ -87,6 +89,41 @@ typedef enum { #define GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING \ "client_id=%s&client_secret=%s&refresh_token=%s&grant_type=refresh_token" +/* --- Google utils --- */ + +/* It is the caller's responsibility to gpr_free the result if not NULL. */ +char *grpc_get_well_known_google_credentials_file_path(void); + +/* --- grpc_channel_credentials. --- */ + +typedef struct { + void (*destruct)(grpc_channel_credentials *c); + grpc_security_status (*create_security_connector)( + grpc_channel_credentials *c, const char *target, const grpc_channel_args *args, + grpc_call_credentials *call_creds, + grpc_channel_security_connector **sc, grpc_channel_args **new_args); +} grpc_channel_credentials_vtable; + +struct grpc_channel_credentials { + const grpc_channel_credentials_vtable *vtable; + const char *type; + gpr_refcount refcount; + grpc_call_credentials *call_creds; +}; + +grpc_channel_credentials *grpc_channel_credentials_ref( + grpc_channel_credentials *creds); +void grpc_channel_credentials_unref(grpc_channel_credentials *creds); + +/* Creates a security connector for the channel. May also create new channel + args for the channel to be used in place of the passed in const args if + returned non NULL. In that case the caller is responsible for destroying + new_args after channel creation. */ +grpc_security_status grpc_channel_credentials_create_security_connector( + grpc_channel_credentials *creds, const char *target, + const grpc_channel_args *args, grpc_call_credentials *call_creds, + grpc_channel_security_connector **sc, grpc_channel_args **new_args); + /* --- grpc_credentials_md. --- */ typedef struct { @@ -113,16 +150,7 @@ grpc_credentials_md_store *grpc_credentials_md_store_ref( grpc_credentials_md_store *store); void grpc_credentials_md_store_unref(grpc_credentials_md_store *store); -/* --- grpc_credentials. --- */ - -/* Creates a fake transport security credentials object for testing. */ -grpc_credentials *grpc_fake_transport_security_credentials_create(void); -/* Creates a fake server transport security credentials object for testing. */ -grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( - void); - -/* It is the caller's responsibility to gpr_free the result if not NULL. */ -char *grpc_get_well_known_google_credentials_file_path(void); +/* --- grpc_call_credentials. --- */ typedef void (*grpc_credentials_metadata_cb)(grpc_exec_ctx *exec_ctx, void *user_data, @@ -131,57 +159,47 @@ typedef void (*grpc_credentials_metadata_cb)(grpc_exec_ctx *exec_ctx, grpc_credentials_status status); typedef struct { - void (*destruct)(grpc_credentials *c); - int (*has_request_metadata)(const grpc_credentials *c); - int (*has_request_metadata_only)(const grpc_credentials *c); - void (*get_request_metadata)(grpc_exec_ctx *exec_ctx, grpc_credentials *c, - grpc_pollset *pollset, const char *service_url, + void (*destruct)(grpc_call_credentials *c); + int (*has_request_metadata)(const grpc_call_credentials *c); + void (*get_request_metadata)(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *c, grpc_pollset *pollset, + const char *service_url, grpc_credentials_metadata_cb cb, void *user_data); - grpc_security_status (*create_security_connector)( - grpc_credentials *c, const char *target, const grpc_channel_args *args, - grpc_credentials *request_metadata_creds, - grpc_channel_security_connector **sc, grpc_channel_args **new_args); -} grpc_credentials_vtable; +} grpc_call_credentials_vtable; -struct grpc_credentials { - const grpc_credentials_vtable *vtable; +struct grpc_call_credentials { + const grpc_call_credentials_vtable *vtable; const char *type; gpr_refcount refcount; }; -grpc_credentials *grpc_credentials_ref(grpc_credentials *creds); -void grpc_credentials_unref(grpc_credentials *creds); -int grpc_credentials_has_request_metadata(grpc_credentials *creds); -int grpc_credentials_has_request_metadata_only(grpc_credentials *creds); -void grpc_credentials_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data); +grpc_call_credentials *grpc_credentials_ref(grpc_call_credentials *creds); +void grpc_call_credentials_unref(grpc_call_credentials *creds); +int grpc_call_credentials_has_request_metadata(grpc_call_credentials *creds); +void grpc_call_credentials_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data); -/* Creates a security connector for the channel. May also create new channel - args for the channel to be used in place of the passed in const args if - returned non NULL. In that case the caller is responsible for destroying - new_args after channel creation. */ -grpc_security_status grpc_credentials_create_security_connector( - grpc_credentials *creds, const char *target, const grpc_channel_args *args, - grpc_credentials *request_metadata_creds, - grpc_channel_security_connector **sc, grpc_channel_args **new_args); typedef struct { - grpc_credentials **creds_array; + grpc_call_credentials **creds_array; size_t num_creds; -} grpc_credentials_array; +} grpc_call_credentials_array; -const grpc_credentials_array *grpc_composite_credentials_get_credentials( - grpc_credentials *composite_creds); +const grpc_call_credentials_array *grpc_composite_credentials_get_credentials( + grpc_call_credentials *composite_creds); /* Returns creds if creds is of the specified type or the inner creds of the specified type (if found), if the creds is of type COMPOSITE. If composite_creds is not NULL, *composite_creds will point to creds if of type COMPOSITE in case of success. */ -grpc_credentials *grpc_credentials_contains_type( - grpc_credentials *creds, const char *type, - grpc_credentials **composite_creds); +grpc_call_credentials *grpc_credentials_contains_type( + grpc_call_credentials *creds, const char *type, + grpc_call_credentials **composite_creds); /* Exposed for testing only. */ grpc_credentials_status @@ -192,19 +210,19 @@ void grpc_flush_cached_google_default_credentials(void); /* Metadata-only credentials with the specified key and value where asynchronicity can be simulated for testing. */ -grpc_credentials *grpc_md_only_test_credentials_create(const char *md_key, - const char *md_value, - int is_async); +grpc_call_credentials *grpc_md_only_test_credentials_create( + const char *md_key, const char *md_value, int is_async); /* Private constructor for jwt credentials from an already parsed json key. Takes ownership of the key. */ -grpc_credentials * +grpc_call_credentials * grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key key, gpr_timespec token_lifetime); /* Private constructor for refresh token credentials from an already parsed refresh token. Takes ownership of the refresh token. */ -grpc_credentials *grpc_refresh_token_credentials_create_from_auth_refresh_token( +grpc_call_credentials * +grpc_refresh_token_credentials_create_from_auth_refresh_token( grpc_auth_refresh_token token); /* --- grpc_server_credentials. --- */ @@ -231,10 +249,18 @@ grpc_server_credentials *grpc_server_credentials_ref( void grpc_server_credentials_unref(grpc_server_credentials *creds); +/* -- Fake transport security credentials. -- */ + +/* Creates a fake transport security credentials object for testing. */ +grpc_channel_credentials *grpc_fake_transport_security_credentials_create(void); +/* Creates a fake server transport security credentials object for testing. */ +grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( + void); + /* -- Ssl credentials. -- */ typedef struct { - grpc_credentials base; + grpc_channel_credentials base; grpc_ssl_config config; } grpc_ssl_credentials; @@ -246,7 +272,7 @@ typedef struct { /* -- Jwt credentials -- */ typedef struct { - grpc_credentials base; + grpc_call_credentials base; /* Have a simple cache for now with just 1 entry. We could have a map based on the service_url for a more sophisticated one. */ @@ -277,7 +303,7 @@ typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, gpr_timespec deadline); typedef struct { - grpc_credentials base; + grpc_call_credentials base; gpr_mu mu; grpc_credentials_md_store *access_token_md; gpr_timespec token_expiration; @@ -295,14 +321,14 @@ typedef struct { /* -- Oauth2 Access Token credentials. -- */ typedef struct { - grpc_credentials base; + grpc_call_credentials base; grpc_credentials_md_store *access_token_md; } grpc_access_token_credentials; /* -- Metadata-only Test credentials. -- */ typedef struct { - grpc_credentials base; + grpc_call_credentials base; grpc_credentials_md_store *md_store; int is_async; } grpc_md_only_test_credentials; @@ -310,22 +336,21 @@ typedef struct { /* -- GoogleIAM credentials. -- */ typedef struct { - grpc_credentials base; + grpc_call_credentials base; grpc_credentials_md_store *iam_md; } grpc_google_iam_credentials; /* -- Composite credentials. -- */ typedef struct { - grpc_credentials base; - grpc_credentials_array inner; - grpc_credentials *connector_creds; + grpc_call_credentials base; + grpc_call_credentials_array inner; } grpc_composite_credentials; /* -- Plugin credentials. -- */ typedef struct { - grpc_credentials base; + grpc_call_credentials base; grpc_metadata_credentials_plugin plugin; grpc_credentials_md_store *plugin_md; } grpc_plugin_credentials; -- cgit v1.2.3 From 441176d161f7c8e61b7724103e761d9076607223 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Fri, 9 Oct 2015 21:14:07 -0700 Subject: Got core to compile (without the tests) --- include/grpc/grpc_security.h | 6 +- src/core/security/client_auth_filter.c | 30 +- src/core/security/credentials.c | 441 +++++++++---------------- src/core/security/credentials.h | 16 +- src/core/security/google_default_credentials.c | 53 +-- src/core/security/security_connector.c | 29 +- src/core/security/security_connector.h | 11 +- src/core/security/security_context.c | 14 +- src/core/security/security_context.h | 2 +- src/core/surface/secure_channel_create.c | 8 +- 10 files changed, 234 insertions(+), 376 deletions(-) (limited to 'src/core') diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 98d6bbf257..c8da59331d 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -50,7 +50,7 @@ typedef struct grpc_channel_credentials grpc_channel_credentials; /* Releases a channel credentials object. The creator of the credentials object is responsible for its release. */ -void grpc_credentials_release(grpc_channel_credentials *creds); +void grpc_channel_credentials_release(grpc_channel_credentials *creds); /* Environment variable that points to the google default application credentials json key or refresh token. Used in the @@ -101,6 +101,10 @@ grpc_channel_credentials *grpc_ssl_credentials_create( typedef struct grpc_call_credentials grpc_call_credentials; +/* Releases a call credentials object. + The creator of the credentials object is responsible for its release. */ +void grpc_call_credentials_release(grpc_call_credentials *creds); + /* Creates a composite channel credentials object. */ grpc_channel_credentials *grpc_composite_channel_credentials_create( grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, diff --git a/src/core/security/client_auth_filter.c b/src/core/security/client_auth_filter.c index 635982b252..f257502a98 100644 --- a/src/core/security/client_auth_filter.c +++ b/src/core/security/client_auth_filter.c @@ -50,7 +50,7 @@ /* We can have a per-call credentials. */ typedef struct { - grpc_credentials *creds; + grpc_call_credentials *creds; grpc_mdstr *host; grpc_mdstr *method; /* pollset bound to this call; if we need to make external @@ -146,39 +146,35 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx, channel_data *chand = elem->channel_data; grpc_client_security_context *ctx = (grpc_client_security_context *)op->context[GRPC_CONTEXT_SECURITY].value; - grpc_credentials *channel_creds = + grpc_call_credentials *channel_call_creds = chand->security_connector->request_metadata_creds; - int channel_creds_has_md = - (channel_creds != NULL) && - grpc_credentials_has_request_metadata(channel_creds); - int call_creds_has_md = (ctx != NULL) && (ctx->creds != NULL) && - grpc_credentials_has_request_metadata(ctx->creds); + int call_creds_has_md = (ctx != NULL) && (ctx->creds != NULL); - if (!channel_creds_has_md && !call_creds_has_md) { + if (channel_call_creds == NULL && !call_creds_has_md) { /* Skip sending metadata altogether. */ grpc_call_next_op(exec_ctx, elem, op); return; } - if (channel_creds_has_md && call_creds_has_md) { - calld->creds = - grpc_composite_credentials_create(channel_creds, ctx->creds, NULL); + if (channel_call_creds != NULL && call_creds_has_md) { + calld->creds = grpc_composite_call_credentials_create(channel_call_creds, + ctx->creds, NULL); if (calld->creds == NULL) { bubble_up_error(exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, "Incompatible credentials set on channel and call."); return; } } else { - calld->creds = - grpc_credentials_ref(call_creds_has_md ? ctx->creds : channel_creds); + calld->creds = grpc_call_credentials_ref( + call_creds_has_md ? ctx->creds : channel_call_creds); } build_service_url(chand->security_connector->base.url_scheme, calld); calld->op = *op; /* Copy op (originates from the caller's stack). */ GPR_ASSERT(calld->pollset); - grpc_credentials_get_request_metadata(exec_ctx, calld->creds, calld->pollset, - calld->service_url, - on_credentials_metadata, elem); + grpc_call_credentials_get_request_metadata(exec_ctx, calld->creds, + calld->pollset, calld->service_url, + on_credentials_metadata, elem); } static void on_host_checked(grpc_exec_ctx *exec_ctx, void *user_data, @@ -294,7 +290,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { call_data *calld = elem->call_data; - grpc_credentials_unref(calld->creds); + grpc_call_credentials_unref(calld->creds); if (calld->host != NULL) { GRPC_MDSTR_UNREF(calld->host); } diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index 5e155d83b9..a1fa457d1a 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -54,18 +54,18 @@ /* -- Common. -- */ struct grpc_credentials_metadata_request { - grpc_credentials *creds; + grpc_call_credentials *creds; grpc_credentials_metadata_cb cb; void *user_data; }; static grpc_credentials_metadata_request * -grpc_credentials_metadata_request_create(grpc_credentials *creds, +grpc_credentials_metadata_request_create(grpc_call_credentials *creds, grpc_credentials_metadata_cb cb, void *user_data) { grpc_credentials_metadata_request *r = gpr_malloc(sizeof(grpc_credentials_metadata_request)); - r->creds = grpc_credentials_ref(creds); + r->creds = grpc_call_credentials_ref(creds); r->cb = cb; r->user_data = user_data; return r; @@ -73,17 +73,18 @@ grpc_credentials_metadata_request_create(grpc_credentials *creds, static void grpc_credentials_metadata_request_destroy( grpc_credentials_metadata_request *r) { - grpc_credentials_unref(r->creds); + grpc_call_credentials_unref(r->creds); gpr_free(r); } -grpc_credentials *grpc_credentials_ref(grpc_credentials *creds) { +grpc_channel_credentials *grpc_channel_credentials_ref( + grpc_channel_credentials *creds) { if (creds == NULL) return NULL; gpr_ref(&creds->refcount); return creds; } -void grpc_credentials_unref(grpc_credentials *creds) { +void grpc_channel_credentials_unref(grpc_channel_credentials *creds) { if (creds == NULL) return; if (gpr_unref(&creds->refcount)) { creds->vtable->destruct(creds); @@ -91,26 +92,34 @@ void grpc_credentials_unref(grpc_credentials *creds) { } } -void grpc_credentials_release(grpc_credentials *creds) { - GRPC_API_TRACE("grpc_credentials_release(creds=%p)", 1, (creds)); - grpc_credentials_unref(creds); +void grpc_channel_credentials_release(grpc_channel_credentials *creds) { + GRPC_API_TRACE("grpc_channel_credentials_release(creds=%p)", 1, (creds)); + grpc_channel_credentials_unref(creds); } -int grpc_credentials_has_request_metadata(grpc_credentials *creds) { - if (creds == NULL) return 0; - return creds->vtable->has_request_metadata(creds); +grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds) { + if (creds == NULL) return NULL; + gpr_ref(&creds->refcount); + return creds; } -int grpc_credentials_has_request_metadata_only(grpc_credentials *creds) { - if (creds == NULL) return 0; - return creds->vtable->has_request_metadata_only(creds); +void grpc_call_credentials_unref(grpc_call_credentials *creds) { + if (creds == NULL) return; + if (gpr_unref(&creds->refcount)) { + creds->vtable->destruct(creds); + gpr_free(creds); + } +} + +void grpc_call_credentials_release(grpc_call_credentials *creds) { + GRPC_API_TRACE("grpc_call_credentials_release(creds=%p)", 1, (creds)); + grpc_call_credentials_unref(creds); } void grpc_credentials_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { - if (creds == NULL || !grpc_credentials_has_request_metadata(creds) || - creds->vtable->get_request_metadata == NULL) { + if (creds == NULL || creds->vtable->get_request_metadata == NULL) { if (cb != NULL) { cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); } @@ -120,19 +129,19 @@ void grpc_credentials_get_request_metadata( user_data); } -grpc_security_status grpc_credentials_create_security_connector( - grpc_credentials *creds, const char *target, const grpc_channel_args *args, - grpc_credentials *request_metadata_creds, - grpc_channel_security_connector **sc, grpc_channel_args **new_args) { +grpc_security_status grpc_channel_credentials_create_security_connector( + grpc_channel_credentials *channel_creds, const char *target, + const grpc_channel_args *args, grpc_channel_security_connector **sc, + grpc_channel_args **new_args) { *new_args = NULL; - if (creds == NULL || creds->vtable->create_security_connector == NULL || - grpc_credentials_has_request_metadata_only(creds)) { + if (channel_creds == NULL || + channel_creds->vtable->create_security_connector == NULL) { gpr_log(GPR_ERROR, "Invalid credentials for creating a security connector."); return GRPC_SECURITY_ERROR; } - return creds->vtable->create_security_connector( - creds, target, args, request_metadata_creds, sc, new_args); + return channel_creds->vtable->create_security_connector(channel_creds, target, + args, sc, new_args); } grpc_server_credentials *grpc_server_credentials_ref( @@ -225,7 +234,7 @@ grpc_server_credentials *grpc_find_server_credentials_in_args( /* -- Ssl credentials. -- */ -static void ssl_destruct(grpc_credentials *creds) { +static void ssl_destruct(grpc_channel_credentials *creds) { grpc_ssl_credentials *c = (grpc_ssl_credentials *)creds; if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); if (c->config.pem_private_key != NULL) gpr_free(c->config.pem_private_key); @@ -254,15 +263,9 @@ static void ssl_server_destruct(grpc_server_credentials *creds) { if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); } -static int ssl_has_request_metadata(const grpc_credentials *creds) { return 0; } - -static int ssl_has_request_metadata_only(const grpc_credentials *creds) { - return 0; -} - static grpc_security_status ssl_create_security_connector( - grpc_credentials *creds, const char *target, const grpc_channel_args *args, - grpc_credentials *request_metadata_creds, + grpc_channel_credentials *creds, const char *target, + const grpc_channel_args *args, grpc_channel_security_connector **sc, grpc_channel_args **new_args) { grpc_ssl_credentials *c = (grpc_ssl_credentials *)creds; grpc_security_status status = GRPC_SECURITY_OK; @@ -279,7 +282,7 @@ static grpc_security_status ssl_create_security_connector( } } status = grpc_ssl_channel_security_connector_create( - request_metadata_creds, &c->config, target, overridden_target_name, sc); + creds->call_creds, &c->config, target, overridden_target_name, sc); if (status != GRPC_SECURITY_OK) { return status; } @@ -296,9 +299,8 @@ static grpc_security_status ssl_server_create_security_connector( return grpc_ssl_server_security_connector_create(&c->config, sc); } -static grpc_credentials_vtable ssl_vtable = { - ssl_destruct, ssl_has_request_metadata, ssl_has_request_metadata_only, NULL, - ssl_create_security_connector}; +static grpc_channel_credentials_vtable ssl_vtable = { + ssl_destruct, ssl_create_security_connector}; static grpc_server_credentials_vtable ssl_server_vtable = { ssl_server_destruct, ssl_server_create_security_connector}; @@ -363,7 +365,7 @@ static void ssl_build_server_config( } } -grpc_credentials *grpc_ssl_credentials_create( +grpc_channel_credentials *grpc_ssl_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, void *reserved) { grpc_ssl_credentials *c = gpr_malloc(sizeof(grpc_ssl_credentials)); @@ -374,7 +376,7 @@ grpc_credentials *grpc_ssl_credentials_create( 3, (pem_root_certs, pem_key_cert_pair, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_ssl_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_SSL; + c->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_SSL; c->base.vtable = &ssl_vtable; gpr_ref_init(&c->base.refcount, 1); ssl_build_config(pem_root_certs, pem_key_cert_pair, &c->config); @@ -394,7 +396,7 @@ grpc_server_credentials *grpc_ssl_server_credentials_create( force_client_auth, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_ssl_server_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_SSL; + c->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_SSL; gpr_ref_init(&c->base.refcount, 1); c->base.vtable = &ssl_server_vtable; ssl_build_server_config(pem_root_certs, pem_key_cert_pairs, @@ -416,7 +418,7 @@ static void jwt_reset_cache(grpc_service_account_jwt_access_credentials *c) { c->cached.jwt_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); } -static void jwt_destruct(grpc_credentials *creds) { +static void jwt_destruct(grpc_call_credentials *creds) { grpc_service_account_jwt_access_credentials *c = (grpc_service_account_jwt_access_credentials *)creds; grpc_auth_json_key_destruct(&c->key); @@ -424,14 +426,8 @@ static void jwt_destruct(grpc_credentials *creds) { gpr_mu_destroy(&c->cache_mu); } -static int jwt_has_request_metadata(const grpc_credentials *creds) { return 1; } - -static int jwt_has_request_metadata_only(const grpc_credentials *creds) { - return 1; -} - static void jwt_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { grpc_service_account_jwt_access_credentials *c = (grpc_service_account_jwt_access_credentials *)creds; @@ -484,11 +480,10 @@ static void jwt_get_request_metadata( } } -static grpc_credentials_vtable jwt_vtable = { - jwt_destruct, jwt_has_request_metadata, jwt_has_request_metadata_only, - jwt_get_request_metadata, NULL}; +static grpc_call_credentials_vtable jwt_vtable = {jwt_destruct, + jwt_get_request_metadata}; -grpc_credentials * +grpc_call_credentials * grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key key, gpr_timespec token_lifetime) { grpc_service_account_jwt_access_credentials *c; @@ -498,7 +493,7 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key( } c = gpr_malloc(sizeof(grpc_service_account_jwt_access_credentials)); memset(c, 0, sizeof(grpc_service_account_jwt_access_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_JWT; + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_JWT; gpr_ref_init(&c->base.refcount, 1); c->base.vtable = &jwt_vtable; c->key = key; @@ -508,7 +503,7 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key( return &c->base; } -grpc_credentials *grpc_service_account_jwt_access_credentials_create( +grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( const char *json_key, gpr_timespec token_lifetime, void *reserved) { GRPC_API_TRACE( "grpc_service_account_jwt_access_credentials_create(" @@ -525,7 +520,7 @@ grpc_credentials *grpc_service_account_jwt_access_credentials_create( /* -- Oauth2TokenFetcher credentials -- */ -static void oauth2_token_fetcher_destruct(grpc_credentials *creds) { +static void oauth2_token_fetcher_destruct(grpc_call_credentials *creds) { grpc_oauth2_token_fetcher_credentials *c = (grpc_oauth2_token_fetcher_credentials *)creds; grpc_credentials_md_store_unref(c->access_token_md); @@ -533,16 +528,6 @@ static void oauth2_token_fetcher_destruct(grpc_credentials *creds) { grpc_httpcli_context_destroy(&c->httpcli_context); } -static int oauth2_token_fetcher_has_request_metadata( - const grpc_credentials *creds) { - return 1; -} - -static int oauth2_token_fetcher_has_request_metadata_only( - const grpc_credentials *creds) { - return 1; -} - grpc_credentials_status grpc_oauth2_token_fetcher_credentials_parse_server_response( const grpc_httpcli_response *response, grpc_credentials_md_store **token_md, @@ -660,8 +645,9 @@ static void on_oauth2_token_fetcher_http_response( } static void oauth2_token_fetcher_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, + grpc_pollset *pollset, const char *service_url, + grpc_credentials_metadata_cb cb, void *user_data) { grpc_oauth2_token_fetcher_credentials *c = (grpc_oauth2_token_fetcher_credentials *)creds; gpr_timespec refresh_threshold = gpr_time_from_seconds( @@ -694,7 +680,7 @@ static void oauth2_token_fetcher_get_request_metadata( static void init_oauth2_token_fetcher(grpc_oauth2_token_fetcher_credentials *c, grpc_fetch_oauth2_func fetch_func) { memset(c, 0, sizeof(grpc_oauth2_token_fetcher_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_OAUTH2; + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; gpr_ref_init(&c->base.refcount, 1); gpr_mu_init(&c->mu); c->token_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); @@ -704,10 +690,8 @@ static void init_oauth2_token_fetcher(grpc_oauth2_token_fetcher_credentials *c, /* -- GoogleComputeEngine credentials. -- */ -static grpc_credentials_vtable compute_engine_vtable = { - oauth2_token_fetcher_destruct, oauth2_token_fetcher_has_request_metadata, - oauth2_token_fetcher_has_request_metadata_only, - oauth2_token_fetcher_get_request_metadata, NULL}; +static grpc_call_credentials_vtable compute_engine_vtable = { + oauth2_token_fetcher_destruct, oauth2_token_fetcher_get_request_metadata}; static void compute_engine_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, @@ -724,7 +708,7 @@ static void compute_engine_fetch_oauth2( response_cb, metadata_req); } -grpc_credentials *grpc_google_compute_engine_credentials_create( +grpc_call_credentials *grpc_google_compute_engine_credentials_create( void *reserved) { grpc_oauth2_token_fetcher_credentials *c = gpr_malloc(sizeof(grpc_oauth2_token_fetcher_credentials)); @@ -738,17 +722,15 @@ grpc_credentials *grpc_google_compute_engine_credentials_create( /* -- GoogleRefreshToken credentials. -- */ -static void refresh_token_destruct(grpc_credentials *creds) { +static void refresh_token_destruct(grpc_call_credentials *creds) { grpc_google_refresh_token_credentials *c = (grpc_google_refresh_token_credentials *)creds; grpc_auth_refresh_token_destruct(&c->refresh_token); oauth2_token_fetcher_destruct(&c->base.base); } -static grpc_credentials_vtable refresh_token_vtable = { - refresh_token_destruct, oauth2_token_fetcher_has_request_metadata, - oauth2_token_fetcher_has_request_metadata_only, - oauth2_token_fetcher_get_request_metadata, NULL}; +static grpc_call_credentials_vtable refresh_token_vtable = { + refresh_token_destruct, oauth2_token_fetcher_get_request_metadata}; static void refresh_token_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, @@ -774,7 +756,8 @@ static void refresh_token_fetch_oauth2( gpr_free(body); } -grpc_credentials *grpc_refresh_token_credentials_create_from_auth_refresh_token( +grpc_call_credentials * +grpc_refresh_token_credentials_create_from_auth_refresh_token( grpc_auth_refresh_token refresh_token) { grpc_google_refresh_token_credentials *c; if (!grpc_auth_refresh_token_is_valid(&refresh_token)) { @@ -789,7 +772,7 @@ grpc_credentials *grpc_refresh_token_credentials_create_from_auth_refresh_token( return &c->base.base; } -grpc_credentials *grpc_google_refresh_token_credentials_create( +grpc_call_credentials *grpc_google_refresh_token_credentials_create( const char *json_refresh_token, void *reserved) { GRPC_API_TRACE( "grpc_refresh_token_credentials_create(json_refresh_token=%s, " @@ -802,20 +785,11 @@ grpc_credentials *grpc_google_refresh_token_credentials_create( /* -- Metadata-only credentials. -- */ -static void md_only_test_destruct(grpc_credentials *creds) { +static void md_only_test_destruct(grpc_call_credentials *creds) { grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; grpc_credentials_md_store_unref(c->md_store); } -static int md_only_test_has_request_metadata(const grpc_credentials *creds) { - return 1; -} - -static int md_only_test_has_request_metadata_only( - const grpc_credentials *creds) { - return 1; -} - static void on_simulated_token_fetch_done(void *user_data) { grpc_credentials_metadata_request *r = (grpc_credentials_metadata_request *)user_data; @@ -828,7 +802,7 @@ static void on_simulated_token_fetch_done(void *user_data) { } static void md_only_test_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; @@ -842,18 +816,15 @@ static void md_only_test_get_request_metadata( } } -static grpc_credentials_vtable md_only_test_vtable = { - md_only_test_destruct, md_only_test_has_request_metadata, - md_only_test_has_request_metadata_only, md_only_test_get_request_metadata, - NULL}; +static grpc_call_credentials_vtable md_only_test_vtable = { + md_only_test_destruct, md_only_test_get_request_metadata}; -grpc_credentials *grpc_md_only_test_credentials_create(const char *md_key, - const char *md_value, - int is_async) { +grpc_call_credentials *grpc_md_only_test_credentials_create( + const char *md_key, const char *md_value, int is_async) { grpc_md_only_test_credentials *c = gpr_malloc(sizeof(grpc_md_only_test_credentials)); memset(c, 0, sizeof(grpc_md_only_test_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_OAUTH2; + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; c->base.vtable = &md_only_test_vtable; gpr_ref_init(&c->base.refcount, 1); c->md_store = grpc_credentials_md_store_create(1); @@ -864,34 +835,23 @@ grpc_credentials *grpc_md_only_test_credentials_create(const char *md_key, /* -- Oauth2 Access Token credentials. -- */ -static void access_token_destruct(grpc_credentials *creds) { +static void access_token_destruct(grpc_call_credentials *creds) { grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; grpc_credentials_md_store_unref(c->access_token_md); } -static int access_token_has_request_metadata(const grpc_credentials *creds) { - return 1; -} - -static int access_token_has_request_metadata_only( - const grpc_credentials *creds) { - return 1; -} - static void access_token_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK); } -static grpc_credentials_vtable access_token_vtable = { - access_token_destruct, access_token_has_request_metadata, - access_token_has_request_metadata_only, access_token_get_request_metadata, - NULL}; +static grpc_call_credentials_vtable access_token_vtable = { + access_token_destruct, access_token_get_request_metadata}; -grpc_credentials *grpc_access_token_credentials_create(const char *access_token, - void *reserved) { +grpc_call_credentials *grpc_access_token_credentials_create( + const char *access_token, void *reserved) { grpc_access_token_credentials *c = gpr_malloc(sizeof(grpc_access_token_credentials)); char *token_md_value; @@ -901,7 +861,7 @@ grpc_credentials *grpc_access_token_credentials_create(const char *access_token, 2, (access_token, reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(grpc_access_token_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_OAUTH2; + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; c->base.vtable = &access_token_vtable; gpr_ref_init(&c->base.refcount, 1); c->access_token_md = grpc_credentials_md_store_create(1); @@ -915,7 +875,7 @@ grpc_credentials *grpc_access_token_credentials_create(const char *access_token, /* -- Fake transport security credentials. -- */ static void fake_transport_security_credentials_destruct( - grpc_credentials *creds) { + grpc_channel_credentials *creds) { /* Nothing to do here. */ } @@ -924,21 +884,11 @@ static void fake_transport_security_server_credentials_destruct( /* Nothing to do here. */ } -static int fake_transport_security_has_request_metadata( - const grpc_credentials *creds) { - return 0; -} - -static int fake_transport_security_has_request_metadata_only( - const grpc_credentials *creds) { - return 0; -} - static grpc_security_status fake_transport_security_create_security_connector( - grpc_credentials *c, const char *target, const grpc_channel_args *args, - grpc_credentials *request_metadata_creds, - grpc_channel_security_connector **sc, grpc_channel_args **new_args) { - *sc = grpc_fake_channel_security_connector_create(request_metadata_creds, 1); + grpc_channel_credentials *c, const char *target, + const grpc_channel_args *args, grpc_channel_security_connector **sc, + grpc_channel_args **new_args) { + *sc = grpc_fake_channel_security_connector_create(c->call_creds, 1); return GRPC_SECURITY_OK; } @@ -949,21 +899,21 @@ fake_transport_security_server_create_security_connector( return GRPC_SECURITY_OK; } -static grpc_credentials_vtable fake_transport_security_credentials_vtable = { - fake_transport_security_credentials_destruct, - fake_transport_security_has_request_metadata, - fake_transport_security_has_request_metadata_only, NULL, - fake_transport_security_create_security_connector}; +static grpc_channel_credentials_vtable + fake_transport_security_credentials_vtable = { + fake_transport_security_credentials_destruct, + fake_transport_security_create_security_connector}; static grpc_server_credentials_vtable fake_transport_security_server_credentials_vtable = { fake_transport_security_server_credentials_destruct, fake_transport_security_server_create_security_connector}; -grpc_credentials *grpc_fake_transport_security_credentials_create(void) { - grpc_credentials *c = gpr_malloc(sizeof(grpc_credentials)); - memset(c, 0, sizeof(grpc_credentials)); - c->type = GRPC_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; +grpc_channel_credentials *grpc_fake_transport_security_credentials_create( + void) { + grpc_channel_credentials *c = gpr_malloc(sizeof(grpc_channel_credentials)); + memset(c, 0, sizeof(grpc_channel_credentials)); + c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; c->vtable = &fake_transport_security_credentials_vtable; gpr_ref_init(&c->refcount, 1); return c; @@ -973,7 +923,7 @@ grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( void) { grpc_server_credentials *c = gpr_malloc(sizeof(grpc_server_credentials)); memset(c, 0, sizeof(grpc_server_credentials)); - c->type = GRPC_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; + c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; gpr_ref_init(&c->refcount, 1); c->vtable = &fake_transport_security_server_credentials_vtable; return c; @@ -991,39 +941,15 @@ typedef struct { grpc_credentials_metadata_cb cb; } grpc_composite_credentials_metadata_context; -static void composite_destruct(grpc_credentials *creds) { +static void composite_destruct(grpc_call_credentials *creds) { grpc_composite_credentials *c = (grpc_composite_credentials *)creds; size_t i; for (i = 0; i < c->inner.num_creds; i++) { - grpc_credentials_unref(c->inner.creds_array[i]); + grpc_call_credentials_unref(c->inner.creds_array[i]); } gpr_free(c->inner.creds_array); } -static int composite_has_request_metadata(const grpc_credentials *creds) { - const grpc_composite_credentials *c = - (const grpc_composite_credentials *)creds; - size_t i; - for (i = 0; i < c->inner.num_creds; i++) { - if (grpc_credentials_has_request_metadata(c->inner.creds_array[i])) { - return 1; - } - } - return 0; -} - -static int composite_has_request_metadata_only(const grpc_credentials *creds) { - const grpc_composite_credentials *c = - (const grpc_composite_credentials *)creds; - size_t i; - for (i = 0; i < c->inner.num_creds; i++) { - if (!grpc_credentials_has_request_metadata_only(c->inner.creds_array[i])) { - return 0; - } - } - return 1; -} - static void composite_md_context_destroy( grpc_composite_credentials_metadata_context *ctx) { grpc_credentials_md_store_unref(ctx->md_elems); @@ -1051,15 +977,13 @@ static void composite_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, } /* See if we need to get some more metadata. */ - while (ctx->creds_index < ctx->composite_creds->inner.num_creds) { - grpc_credentials *inner_creds = + if (ctx->creds_index < ctx->composite_creds->inner.num_creds) { + grpc_call_credentials *inner_creds = ctx->composite_creds->inner.creds_array[ctx->creds_index++]; - if (grpc_credentials_has_request_metadata(inner_creds)) { - grpc_credentials_get_request_metadata(exec_ctx, inner_creds, ctx->pollset, - ctx->service_url, - composite_metadata_cb, ctx); - return; - } + grpc_credentials_get_request_metadata(exec_ctx, inner_creds, ctx->pollset, + ctx->service_url, + composite_metadata_cb, ctx); + return; } /* We're done!. */ @@ -1069,14 +993,11 @@ static void composite_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, } static void composite_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { grpc_composite_credentials *c = (grpc_composite_credentials *)creds; grpc_composite_credentials_metadata_context *ctx; - if (!grpc_credentials_has_request_metadata(creds)) { - cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); - return; - } + ctx = gpr_malloc(sizeof(grpc_composite_credentials_metadata_context)); memset(ctx, 0, sizeof(grpc_composite_credentials_metadata_context)); ctx->service_url = gpr_strdup(service_url); @@ -1085,55 +1006,33 @@ static void composite_get_request_metadata( ctx->composite_creds = c; ctx->pollset = pollset; ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); - while (ctx->creds_index < c->inner.num_creds) { - grpc_credentials *inner_creds = c->inner.creds_array[ctx->creds_index++]; - if (grpc_credentials_has_request_metadata(inner_creds)) { - grpc_credentials_get_request_metadata(exec_ctx, inner_creds, pollset, - service_url, composite_metadata_cb, - ctx); - return; - } - } - GPR_ASSERT(0); /* Should have exited before. */ + grpc_credentials_get_request_metadata( + exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset, service_url, + composite_metadata_cb, ctx); } -static grpc_security_status composite_create_security_connector( - grpc_credentials *creds, const char *target, const grpc_channel_args *args, - grpc_credentials *request_metadata_creds, - grpc_channel_security_connector **sc, grpc_channel_args **new_args) { - grpc_composite_credentials *c = (grpc_composite_credentials *)creds; - if (c->connector_creds == NULL) { - gpr_log(GPR_ERROR, - "Cannot create security connector, missing connector credentials."); - return GRPC_SECURITY_ERROR; - } - return grpc_credentials_create_security_connector(c->connector_creds, target, - args, creds, sc, new_args); -} +static grpc_call_credentials_vtable composite_credentials_vtable = { + composite_destruct, composite_get_request_metadata}; -static grpc_credentials_vtable composite_credentials_vtable = { - composite_destruct, composite_has_request_metadata, - composite_has_request_metadata_only, composite_get_request_metadata, - composite_create_security_connector}; - -static grpc_credentials_array get_creds_array(grpc_credentials **creds_addr) { - grpc_credentials_array result; - grpc_credentials *creds = *creds_addr; +static grpc_call_credentials_array get_creds_array( + grpc_call_credentials **creds_addr) { + grpc_call_credentials_array result; + grpc_call_credentials *creds = *creds_addr; result.creds_array = creds_addr; result.num_creds = 1; - if (strcmp(creds->type, GRPC_CREDENTIALS_TYPE_COMPOSITE) == 0) { + if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { result = *grpc_composite_credentials_get_credentials(creds); } return result; } -grpc_credentials *grpc_composite_credentials_create(grpc_credentials *creds1, - grpc_credentials *creds2, - void *reserved) { +grpc_call_credentials *grpc_composite_call_credentials_create( + grpc_call_credentials *creds1, grpc_call_credentials *creds2, + void *reserved) { size_t i; size_t creds_array_byte_size; - grpc_credentials_array creds1_array; - grpc_credentials_array creds2_array; + grpc_call_credentials_array creds1_array; + grpc_call_credentials_array creds2_array; grpc_composite_credentials *c; GRPC_API_TRACE( "grpc_composite_credentials_create(creds1=%p, creds2=%p, " @@ -1144,64 +1043,44 @@ grpc_credentials *grpc_composite_credentials_create(grpc_credentials *creds1, GPR_ASSERT(creds2 != NULL); c = gpr_malloc(sizeof(grpc_composite_credentials)); memset(c, 0, sizeof(grpc_composite_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_COMPOSITE; + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE; c->base.vtable = &composite_credentials_vtable; gpr_ref_init(&c->base.refcount, 1); creds1_array = get_creds_array(&creds1); creds2_array = get_creds_array(&creds2); c->inner.num_creds = creds1_array.num_creds + creds2_array.num_creds; - creds_array_byte_size = c->inner.num_creds * sizeof(grpc_credentials *); + creds_array_byte_size = c->inner.num_creds * sizeof(grpc_call_credentials *); c->inner.creds_array = gpr_malloc(creds_array_byte_size); memset(c->inner.creds_array, 0, creds_array_byte_size); for (i = 0; i < creds1_array.num_creds; i++) { - grpc_credentials *cur_creds = creds1_array.creds_array[i]; - if (!grpc_credentials_has_request_metadata_only(cur_creds)) { - if (c->connector_creds == NULL) { - c->connector_creds = cur_creds; - } else { - gpr_log(GPR_ERROR, "Cannot compose multiple connector credentials."); - goto fail; - } - } - c->inner.creds_array[i] = grpc_credentials_ref(cur_creds); + grpc_call_credentials *cur_creds = creds1_array.creds_array[i]; + c->inner.creds_array[i] = grpc_call_credentials_ref(cur_creds); } for (i = 0; i < creds2_array.num_creds; i++) { - grpc_credentials *cur_creds = creds2_array.creds_array[i]; - if (!grpc_credentials_has_request_metadata_only(cur_creds)) { - if (c->connector_creds == NULL) { - c->connector_creds = cur_creds; - } else { - gpr_log(GPR_ERROR, "Cannot compose multiple connector credentials."); - goto fail; - } - } + grpc_call_credentials *cur_creds = creds2_array.creds_array[i]; c->inner.creds_array[i + creds1_array.num_creds] = - grpc_credentials_ref(cur_creds); + grpc_call_credentials_ref(cur_creds); } return &c->base; - -fail: - grpc_credentials_unref(&c->base); - return NULL; } -const grpc_credentials_array *grpc_composite_credentials_get_credentials( - grpc_credentials *creds) { +const grpc_call_credentials_array *grpc_composite_credentials_get_credentials( + grpc_call_credentials *creds) { const grpc_composite_credentials *c = (const grpc_composite_credentials *)creds; - GPR_ASSERT(strcmp(creds->type, GRPC_CREDENTIALS_TYPE_COMPOSITE) == 0); + GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); return &c->inner; } -grpc_credentials *grpc_credentials_contains_type( - grpc_credentials *creds, const char *type, - grpc_credentials **composite_creds) { +grpc_call_credentials *grpc_credentials_contains_type( + grpc_call_credentials *creds, const char *type, + grpc_call_credentials **composite_creds) { size_t i; if (strcmp(creds->type, type) == 0) { if (composite_creds != NULL) *composite_creds = NULL; return creds; - } else if (strcmp(creds->type, GRPC_CREDENTIALS_TYPE_COMPOSITE) == 0) { - const grpc_credentials_array *inner_creds_array = + } else if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { + const grpc_call_credentials_array *inner_creds_array = grpc_composite_credentials_get_credentials(creds); for (i = 0; i < inner_creds_array->num_creds; i++) { if (strcmp(type, inner_creds_array->creds_array[i]->type) == 0) { @@ -1215,30 +1094,26 @@ grpc_credentials *grpc_credentials_contains_type( /* -- IAM credentials. -- */ -static void iam_destruct(grpc_credentials *creds) { +static void iam_destruct(grpc_call_credentials *creds) { grpc_google_iam_credentials *c = (grpc_google_iam_credentials *)creds; grpc_credentials_md_store_unref(c->iam_md); } -static int iam_has_request_metadata(const grpc_credentials *creds) { return 1; } - -static int iam_has_request_metadata_only(const grpc_credentials *creds) { - return 1; -} - -static void iam_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { +static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data) { grpc_google_iam_credentials *c = (grpc_google_iam_credentials *)creds; cb(exec_ctx, user_data, c->iam_md->entries, c->iam_md->num_entries, GRPC_CREDENTIALS_OK); } -static grpc_credentials_vtable iam_vtable = { - iam_destruct, iam_has_request_metadata, iam_has_request_metadata_only, - iam_get_request_metadata, NULL}; +static grpc_call_credentials_vtable iam_vtable = {iam_destruct, + iam_get_request_metadata}; -grpc_credentials *grpc_google_iam_credentials_create( +grpc_call_credentials *grpc_google_iam_credentials_create( const char *token, const char *authority_selector, void *reserved) { grpc_google_iam_credentials *c; GRPC_API_TRACE( @@ -1250,7 +1125,7 @@ grpc_credentials *grpc_google_iam_credentials_create( GPR_ASSERT(authority_selector != NULL); c = gpr_malloc(sizeof(grpc_google_iam_credentials)); memset(c, 0, sizeof(grpc_google_iam_credentials)); - c->base.type = GRPC_CREDENTIALS_TYPE_IAM; + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_IAM; c->base.vtable = &iam_vtable; gpr_ref_init(&c->base.refcount, 1); c->iam_md = grpc_credentials_md_store_create(2); @@ -1268,21 +1143,13 @@ typedef struct { grpc_credentials_metadata_cb cb; } grpc_metadata_plugin_request; -static void plugin_destruct(grpc_credentials *creds) { +static void plugin_destruct(grpc_call_credentials *creds) { grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds; if (c->plugin.state != NULL && c->plugin.destroy != NULL) { c->plugin.destroy(c->plugin.state); } } -static int plugin_has_request_metadata(const grpc_credentials *creds) { - return 1; -} - -static int plugin_has_request_metadata_only(const grpc_credentials *creds) { - return 1; -} - static void plugin_md_request_metadata_ready(void *request, const grpc_metadata *md, size_t num_md, @@ -1321,9 +1188,12 @@ static void plugin_md_request_metadata_ready(void *request, grpc_exec_ctx_finish(&exec_ctx); } -static void plugin_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { +static void plugin_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data) { grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds; if (c->plugin.get_metadata != NULL) { grpc_metadata_plugin_request *request = gpr_malloc(sizeof(*request)); @@ -1337,16 +1207,15 @@ static void plugin_get_request_metadata( } } -static grpc_credentials_vtable plugin_vtable = { - plugin_destruct, plugin_has_request_metadata, - plugin_has_request_metadata_only, plugin_get_request_metadata, NULL}; +static grpc_call_credentials_vtable plugin_vtable = { + plugin_destruct, plugin_get_request_metadata}; -grpc_credentials *grpc_metadata_credentials_create_from_plugin( +grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( grpc_metadata_credentials_plugin plugin, void *reserved) { grpc_plugin_credentials *c = gpr_malloc(sizeof(*c)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(*c)); - c->base.type = GRPC_CREDENTIALS_TYPE_METADATA_PLUGIN; + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_METADATA_PLUGIN; c->base.vtable = &plugin_vtable; gpr_ref_init(&c->base.refcount, 1); c->plugin = plugin; diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h index 81fa2ea10b..1218983e7b 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -98,10 +98,11 @@ char *grpc_get_well_known_google_credentials_file_path(void); typedef struct { void (*destruct)(grpc_channel_credentials *c); + grpc_security_status (*create_security_connector)( - grpc_channel_credentials *c, const char *target, const grpc_channel_args *args, - grpc_call_credentials *call_creds, - grpc_channel_security_connector **sc, grpc_channel_args **new_args); + grpc_channel_credentials *c, const char *target, + const grpc_channel_args *args, grpc_channel_security_connector **sc, + grpc_channel_args **new_args); } grpc_channel_credentials_vtable; struct grpc_channel_credentials { @@ -121,8 +122,8 @@ void grpc_channel_credentials_unref(grpc_channel_credentials *creds); new_args after channel creation. */ grpc_security_status grpc_channel_credentials_create_security_connector( grpc_channel_credentials *creds, const char *target, - const grpc_channel_args *args, grpc_call_credentials *call_creds, - grpc_channel_security_connector **sc, grpc_channel_args **new_args); + const grpc_channel_args *args, grpc_channel_security_connector **sc, + grpc_channel_args **new_args); /* --- grpc_credentials_md. --- */ @@ -160,7 +161,6 @@ typedef void (*grpc_credentials_metadata_cb)(grpc_exec_ctx *exec_ctx, typedef struct { void (*destruct)(grpc_call_credentials *c); - int (*has_request_metadata)(const grpc_call_credentials *c); void (*get_request_metadata)(grpc_exec_ctx *exec_ctx, grpc_call_credentials *c, grpc_pollset *pollset, const char *service_url, @@ -174,9 +174,8 @@ struct grpc_call_credentials { gpr_refcount refcount; }; -grpc_call_credentials *grpc_credentials_ref(grpc_call_credentials *creds); +grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds); void grpc_call_credentials_unref(grpc_call_credentials *creds); -int grpc_call_credentials_has_request_metadata(grpc_call_credentials *creds); void grpc_call_credentials_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, @@ -184,7 +183,6 @@ void grpc_call_credentials_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_cb cb, void *user_data); - typedef struct { grpc_call_credentials **creds_array; size_t num_creds; diff --git a/src/core/security/google_default_credentials.c b/src/core/security/google_default_credentials.c index 45135305b2..e5a810f23c 100644 --- a/src/core/security/google_default_credentials.c +++ b/src/core/security/google_default_credentials.c @@ -50,7 +50,7 @@ /* -- Default credentials. -- */ -static grpc_credentials *default_credentials = NULL; +static grpc_channel_credentials *default_credentials = NULL; static int compute_engine_detection_done = 0; static gpr_mu g_mu; static gpr_once g_once = GPR_ONCE_INIT; @@ -138,11 +138,11 @@ static int is_stack_running_on_compute_engine(void) { } /* Takes ownership of creds_path if not NULL. */ -static grpc_credentials *create_default_creds_from_path(char *creds_path) { +static grpc_call_credentials *create_default_creds_from_path(char *creds_path) { grpc_json *json = NULL; grpc_auth_json_key key; grpc_auth_refresh_token token; - grpc_credentials *result = NULL; + grpc_call_credentials *result = NULL; gpr_slice creds_data = gpr_empty_slice(); int file_ok = 0; if (creds_path == NULL) goto end; @@ -176,9 +176,9 @@ end: return result; } -grpc_credentials *grpc_google_default_credentials_create(void) { - grpc_credentials *result = NULL; - int serving_cached_credentials = 0; +grpc_channel_credentials *grpc_google_default_credentials_create(void) { + grpc_channel_credentials *result = NULL; + grpc_call_credentials *call_creds = NULL; GRPC_API_TRACE("grpc_google_default_credentials_create(void)", 0, ()); @@ -187,20 +187,19 @@ grpc_credentials *grpc_google_default_credentials_create(void) { gpr_mu_lock(&g_mu); if (default_credentials != NULL) { - result = grpc_credentials_ref(default_credentials); - serving_cached_credentials = 1; + result = grpc_channel_credentials_ref(default_credentials); goto end; } /* First, try the environment variable. */ - result = create_default_creds_from_path( + call_creds = create_default_creds_from_path( gpr_getenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR)); - if (result != NULL) goto end; + if (call_creds != NULL) goto end; /* Then the well-known file. */ - result = create_default_creds_from_path( + call_creds = create_default_creds_from_path( grpc_get_well_known_google_credentials_file_path()); - if (result != NULL) goto end; + if (call_creds != NULL) goto end; /* At last try to see if we're on compute engine (do the detection only once since it requires a network test). */ @@ -208,21 +207,27 @@ grpc_credentials *grpc_google_default_credentials_create(void) { int need_compute_engine_creds = is_stack_running_on_compute_engine(); compute_engine_detection_done = 1; if (need_compute_engine_creds) { - result = grpc_google_compute_engine_credentials_create(NULL); + call_creds = grpc_google_compute_engine_credentials_create(NULL); } } end: - if (!serving_cached_credentials && result != NULL) { - /* Blend with default ssl credentials and add a global reference so that it - can be cached and re-served. */ - grpc_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); - default_credentials = grpc_credentials_ref( - grpc_composite_credentials_create(ssl_creds, result, NULL)); - GPR_ASSERT(default_credentials != NULL); - grpc_credentials_unref(ssl_creds); - grpc_credentials_unref(result); - result = default_credentials; + if (result == NULL) { + if (call_creds != NULL) { + /* Blend with default ssl credentials and add a global reference so that it + can be cached and re-served. */ + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); + default_credentials = grpc_channel_credentials_ref( + grpc_composite_channel_credentials_create(ssl_creds, call_creds, + NULL)); + GPR_ASSERT(default_credentials != NULL); + grpc_channel_credentials_unref(ssl_creds); + grpc_call_credentials_unref(call_creds); + result = default_credentials; + } else { + gpr_log(GPR_ERROR, "Could not create google default credentials."); + } } gpr_mu_unlock(&g_mu); return result; @@ -232,7 +237,7 @@ void grpc_flush_cached_google_default_credentials(void) { gpr_once_init(&g_once, init_default_credentials); gpr_mu_lock(&g_mu); if (default_credentials != NULL) { - grpc_credentials_unref(default_credentials); + grpc_channel_credentials_unref(default_credentials); default_credentials = NULL; } gpr_mu_unlock(&g_mu); diff --git a/src/core/security/security_connector.c b/src/core/security/security_connector.c index 7c4cf6f04d..8dbacdd35e 100644 --- a/src/core/security/security_connector.c +++ b/src/core/security/security_connector.c @@ -203,16 +203,6 @@ grpc_security_connector *grpc_find_security_connector_in_args( return NULL; } -static int check_request_metadata_creds(grpc_credentials *creds) { - if (creds != NULL && !grpc_credentials_has_request_metadata(creds)) { - gpr_log(GPR_ERROR, - "Incompatible credentials for channel security connector: needs to " - "set request metadata."); - return 0; - } - return 1; -} - /* -- Fake implementation. -- */ typedef struct { @@ -222,7 +212,7 @@ typedef struct { static void fake_channel_destroy(grpc_security_connector *sc) { grpc_channel_security_connector *c = (grpc_channel_security_connector *)sc; - grpc_credentials_unref(c->request_metadata_creds); + grpc_call_credentials_unref(c->request_metadata_creds); GRPC_AUTH_CONTEXT_UNREF(sc->auth_context, "connector"); gpr_free(sc); } @@ -306,7 +296,8 @@ static grpc_security_connector_vtable fake_server_vtable = { fake_server_destroy, fake_server_do_handshake, fake_check_peer}; grpc_channel_security_connector *grpc_fake_channel_security_connector_create( - grpc_credentials *request_metadata_creds, int call_host_check_is_async) { + grpc_call_credentials *request_metadata_creds, + int call_host_check_is_async) { grpc_fake_channel_security_connector *c = gpr_malloc(sizeof(grpc_fake_channel_security_connector)); memset(c, 0, sizeof(grpc_fake_channel_security_connector)); @@ -314,8 +305,8 @@ grpc_channel_security_connector *grpc_fake_channel_security_connector_create( c->base.base.is_client_side = 1; c->base.base.url_scheme = GRPC_FAKE_SECURITY_URL_SCHEME; c->base.base.vtable = &fake_channel_vtable; - GPR_ASSERT(check_request_metadata_creds(request_metadata_creds)); - c->base.request_metadata_creds = grpc_credentials_ref(request_metadata_creds); + c->base.request_metadata_creds = + grpc_call_credentials_ref(request_metadata_creds); c->base.check_call_host = fake_channel_check_call_host; c->call_host_check_is_async = call_host_check_is_async; return &c->base; @@ -349,7 +340,7 @@ typedef struct { static void ssl_channel_destroy(grpc_security_connector *sc) { grpc_ssl_channel_security_connector *c = (grpc_ssl_channel_security_connector *)sc; - grpc_credentials_unref(c->base.request_metadata_creds); + grpc_call_credentials_unref(c->base.request_metadata_creds); if (c->handshaker_factory != NULL) { tsi_ssl_handshaker_factory_destroy(c->handshaker_factory); } @@ -580,7 +571,7 @@ size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) { } grpc_security_status grpc_ssl_channel_security_connector_create( - grpc_credentials *request_metadata_creds, const grpc_ssl_config *config, + grpc_call_credentials *request_metadata_creds, const grpc_ssl_config *config, const char *target_name, const char *overridden_target_name, grpc_channel_security_connector **sc) { size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions(); @@ -606,9 +597,6 @@ grpc_security_status grpc_ssl_channel_security_connector_create( gpr_log(GPR_ERROR, "An ssl channel needs a config and a target name."); goto error; } - if (!check_request_metadata_creds(request_metadata_creds)) { - goto error; - } if (config->pem_root_certs == NULL) { pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs); if (pem_root_certs == NULL || pem_root_certs_size == 0) { @@ -627,7 +615,8 @@ grpc_security_status grpc_ssl_channel_security_connector_create( c->base.base.vtable = &ssl_channel_vtable; c->base.base.is_client_side = 1; c->base.base.url_scheme = GRPC_SSL_URL_SCHEME; - c->base.request_metadata_creds = grpc_credentials_ref(request_metadata_creds); + c->base.request_metadata_creds = + grpc_call_credentials_ref(request_metadata_creds); c->base.check_call_host = ssl_channel_check_call_host; gpr_split_host_port(target_name, &c->target_name, &port); gpr_free(port); diff --git a/src/core/security/security_connector.h b/src/core/security/security_connector.h index 9218a3caab..c5f00c5563 100644 --- a/src/core/security/security_connector.h +++ b/src/core/security/security_connector.h @@ -145,7 +145,7 @@ typedef struct grpc_channel_security_connector grpc_channel_security_connector; struct grpc_channel_security_connector { grpc_security_connector base; /* requires is_client_side to be non 0. */ - grpc_credentials *request_metadata_creds; + grpc_call_credentials *request_metadata_creds; grpc_security_status (*check_call_host)(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, const char *host, @@ -167,7 +167,8 @@ grpc_security_status grpc_channel_security_connector_check_call_host( /* For TESTING ONLY! Creates a fake connector that emulates real channel security. */ grpc_channel_security_connector *grpc_fake_channel_security_connector_create( - grpc_credentials *request_metadata_creds, int call_host_check_is_async); + grpc_call_credentials *request_metadata_creds, + int call_host_check_is_async); /* For TESTING ONLY! Creates a fake connector that emulates real server security. */ @@ -197,9 +198,9 @@ typedef struct { specific error code otherwise. */ grpc_security_status grpc_ssl_channel_security_connector_create( - grpc_credentials *request_metadata_creds, const grpc_ssl_config *config, - const char *target_name, const char *overridden_target_name, - grpc_channel_security_connector **sc); + grpc_call_credentials *request_metadata_creds, + const grpc_ssl_config *config, const char *target_name, + const char *overridden_target_name, grpc_channel_security_connector **sc); /* Gets the default ssl roots. */ size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs); diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index f544c1d943..56c56a9506 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -46,7 +46,7 @@ /* --- grpc_call --- */ grpc_call_error grpc_call_set_credentials(grpc_call *call, - grpc_credentials *creds) { + grpc_call_credentials *creds) { grpc_client_security_context *ctx = NULL; GRPC_API_TRACE("grpc_call_set_credentials(call=%p, creds=%p)", 2, (call, creds)); @@ -54,20 +54,16 @@ grpc_call_error grpc_call_set_credentials(grpc_call *call, gpr_log(GPR_ERROR, "Method is client-side only."); return GRPC_CALL_ERROR_NOT_ON_SERVER; } - if (creds != NULL && !grpc_credentials_has_request_metadata_only(creds)) { - gpr_log(GPR_ERROR, "Incompatible credentials to set on a call."); - return GRPC_CALL_ERROR; - } ctx = (grpc_client_security_context *)grpc_call_context_get( call, GRPC_CONTEXT_SECURITY); if (ctx == NULL) { ctx = grpc_client_security_context_create(); - ctx->creds = grpc_credentials_ref(creds); + ctx->creds = grpc_call_credentials_ref(creds); grpc_call_context_set(call, GRPC_CONTEXT_SECURITY, ctx, grpc_client_security_context_destroy); } else { - grpc_credentials_unref(ctx->creds); - ctx->creds = grpc_credentials_ref(creds); + grpc_call_credentials_unref(ctx->creds); + ctx->creds = grpc_call_credentials_ref(creds); } return GRPC_CALL_OK; } @@ -101,7 +97,7 @@ grpc_client_security_context *grpc_client_security_context_create(void) { void grpc_client_security_context_destroy(void *ctx) { grpc_client_security_context *c = (grpc_client_security_context *)ctx; - grpc_credentials_unref(c->creds); + grpc_call_credentials_unref(c->creds); GRPC_AUTH_CONTEXT_UNREF(c->auth_context, "client_security_context"); gpr_free(ctx); } diff --git a/src/core/security/security_context.h b/src/core/security/security_context.h index 2bbdc4be97..794258edbc 100644 --- a/src/core/security/security_context.h +++ b/src/core/security/security_context.h @@ -85,7 +85,7 @@ void grpc_auth_property_reset(grpc_auth_property *property); Internal client-side security context. */ typedef struct { - grpc_credentials *creds; + grpc_call_credentials *creds; grpc_auth_context *auth_context; } grpc_client_security_context; diff --git a/src/core/surface/secure_channel_create.c b/src/core/surface/secure_channel_create.c index 1282ee99ed..0dd0a31169 100644 --- a/src/core/surface/secure_channel_create.c +++ b/src/core/surface/secure_channel_create.c @@ -230,7 +230,7 @@ static const grpc_subchannel_factory_vtable subchannel_factory_vtable = { Asynchronously: - resolve target - connect to it (trying alternatives as presented) - perform handshakes */ -grpc_channel *grpc_secure_channel_create(grpc_credentials *creds, +grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, const char *target, const grpc_channel_args *args, void *reserved) { @@ -261,9 +261,9 @@ grpc_channel *grpc_secure_channel_create(grpc_credentials *creds, "Security connector exists in channel args."); } - if (grpc_credentials_create_security_connector( - creds, target, args, NULL, &security_connector, - &new_args_from_connector) != GRPC_SECURITY_OK) { + if (grpc_channel_credentials_create_security_connector( + creds, target, args, &security_connector, &new_args_from_connector) != + GRPC_SECURITY_OK) { grpc_exec_ctx_finish(&exec_ctx); return grpc_lame_client_channel_create( target, GRPC_STATUS_INVALID_ARGUMENT, -- cgit v1.2.3 From 4e02e84062d81137496d00e6c5f895966aead92d Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Fri, 9 Oct 2015 22:49:42 -0700 Subject: Got the core test passing. --- src/core/security/credentials.c | 28 ++- src/core/security/credentials.h | 2 +- test/core/end2end/fixtures/h2_fakesec.c | 10 +- test/core/end2end/fixtures/h2_oauth2.c | 20 +- test/core/end2end/fixtures/h2_ssl+poll.c | 11 +- test/core/end2end/fixtures/h2_ssl.c | 11 +- test/core/end2end/fixtures/h2_ssl_proxy.c | 16 +- test/core/end2end/tests/call_creds.c | 32 +-- test/core/security/credentials_test.c | 272 +++++++++------------ test/core/security/fetch_oauth2.c | 6 +- test/core/security/oauth2_utils.c | 7 +- test/core/security/oauth2_utils.h | 3 +- .../security/print_google_default_creds_token.c | 10 +- 13 files changed, 193 insertions(+), 235 deletions(-) (limited to 'src/core') diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index a1fa457d1a..ef1f40633b 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -116,7 +116,7 @@ void grpc_call_credentials_release(grpc_call_credentials *creds) { grpc_call_credentials_unref(creds); } -void grpc_credentials_get_request_metadata( +void grpc_call_credentials_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { if (creds == NULL || creds->vtable->get_request_metadata == NULL) { @@ -980,9 +980,9 @@ static void composite_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, if (ctx->creds_index < ctx->composite_creds->inner.num_creds) { grpc_call_credentials *inner_creds = ctx->composite_creds->inner.creds_array[ctx->creds_index++]; - grpc_credentials_get_request_metadata(exec_ctx, inner_creds, ctx->pollset, - ctx->service_url, - composite_metadata_cb, ctx); + grpc_call_credentials_get_request_metadata(exec_ctx, inner_creds, + ctx->pollset, ctx->service_url, + composite_metadata_cb, ctx); return; } @@ -1006,7 +1006,7 @@ static void composite_get_request_metadata( ctx->composite_creds = c; ctx->pollset = pollset; ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset, service_url, composite_metadata_cb, ctx); } @@ -1092,6 +1092,24 @@ grpc_call_credentials *grpc_credentials_contains_type( return NULL; } +grpc_channel_credentials *grpc_composite_channel_credentials_create( + grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, + void *reserved) { + GPR_ASSERT(reserved == NULL); + if (channel_creds == NULL) return NULL; + if (channel_creds->call_creds == NULL) { + channel_creds->call_creds = grpc_call_credentials_ref(call_creds); + } else if (call_creds != NULL) { + grpc_call_credentials *composite_creds = + grpc_composite_call_credentials_create(channel_creds->call_creds, + call_creds, NULL); + if (composite_creds == NULL) return NULL; + grpc_call_credentials_unref(channel_creds->call_creds); + channel_creds->call_creds = composite_creds; + } + return grpc_channel_credentials_ref(channel_creds); +} + /* -- IAM credentials. -- */ static void iam_destruct(grpc_call_credentials *creds) { diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h index 1218983e7b..b507e2b178 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -64,7 +64,7 @@ typedef enum { #define GRPC_CALL_CREDENTIALS_TYPE_IAM "Iam" #define GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE "Composite" -#define GRPC_AUTHORIZATION_METADATA_KEY "Authorization" +#define GRPC_AUTHORIZATION_METADATA_KEY "authorization" #define GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY \ "x-goog-iam-authorization-token" #define GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY "x-goog-iam-authority-selector" diff --git a/test/core/end2end/fixtures/h2_fakesec.c b/test/core/end2end/fixtures/h2_fakesec.c index 3e64cc08e8..bc009e1df1 100644 --- a/test/core/end2end/fixtures/h2_fakesec.c +++ b/test/core/end2end/fixtures/h2_fakesec.c @@ -73,14 +73,14 @@ static void process_auth_failure(void *state, grpc_auth_context *ctx, cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL); } -static void chttp2_init_client_secure_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - grpc_credentials *creds) { +static void chttp2_init_client_secure_fullstack( + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + grpc_channel_credentials *creds) { fullstack_secure_fixture_data *ffd = f->fixture_data; f->client = grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client != NULL); - grpc_credentials_release(creds); + grpc_channel_credentials_release(creds); } static void chttp2_init_server_secure_fullstack( @@ -106,7 +106,7 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { static void chttp2_init_client_fake_secure_fullstack( grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { - grpc_credentials *fake_ts_creds = + grpc_channel_credentials *fake_ts_creds = grpc_fake_transport_security_credentials_create(); chttp2_init_client_secure_fullstack(f, client_args, fake_ts_creds); } diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c index 10db6c2c6a..7a34cc67d8 100644 --- a/test/core/end2end/fixtures/h2_oauth2.c +++ b/test/core/end2end/fixtures/h2_oauth2.c @@ -118,14 +118,14 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( return f; } -static void chttp2_init_client_secure_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - grpc_credentials *creds) { +static void chttp2_init_client_secure_fullstack( + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + grpc_channel_credentials *creds) { fullstack_secure_fixture_data *ffd = f->fixture_data; f->client = grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client != NULL); - grpc_credentials_release(creds); + grpc_channel_credentials_release(creds); } static void chttp2_init_server_secure_fullstack( @@ -151,12 +151,12 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack( grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { - grpc_credentials *ssl_creds = + grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(test_root_cert, NULL, NULL); - grpc_credentials *oauth2_creds = + grpc_call_credentials *oauth2_creds = grpc_md_only_test_credentials_create("Authorization", oauth2_md, 1); - grpc_credentials *ssl_oauth2_creds = - grpc_composite_credentials_create(ssl_creds, oauth2_creds, NULL); + grpc_channel_credentials *ssl_oauth2_creds = + grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, {"foo.test.google.fr"}}; @@ -164,8 +164,8 @@ static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack( grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); chttp2_init_client_secure_fullstack(f, new_client_args, ssl_oauth2_creds); grpc_channel_args_destroy(new_client_args); - grpc_credentials_release(ssl_creds); - grpc_credentials_release(oauth2_creds); + grpc_channel_credentials_release(ssl_creds); + grpc_call_credentials_release(oauth2_creds); } static int fail_server_auth_check(grpc_channel_args *server_args) { diff --git a/test/core/end2end/fixtures/h2_ssl+poll.c b/test/core/end2end/fixtures/h2_ssl+poll.c index c2f41f4886..37e1758f00 100644 --- a/test/core/end2end/fixtures/h2_ssl+poll.c +++ b/test/core/end2end/fixtures/h2_ssl+poll.c @@ -76,14 +76,14 @@ static void process_auth_failure(void *state, grpc_auth_context *ctx, cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL); } -static void chttp2_init_client_secure_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - grpc_credentials *creds) { +static void chttp2_init_client_secure_fullstack( + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + grpc_channel_credentials *creds) { fullstack_secure_fixture_data *ffd = f->fixture_data; f->client = grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client != NULL); - grpc_credentials_release(creds); + grpc_channel_credentials_release(creds); } static void chttp2_init_server_secure_fullstack( @@ -109,7 +109,8 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { static void chttp2_init_client_simple_ssl_secure_fullstack( grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { - grpc_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, {"foo.test.google.fr"}}; diff --git a/test/core/end2end/fixtures/h2_ssl.c b/test/core/end2end/fixtures/h2_ssl.c index 896c60c507..f5a006bd08 100644 --- a/test/core/end2end/fixtures/h2_ssl.c +++ b/test/core/end2end/fixtures/h2_ssl.c @@ -76,14 +76,14 @@ static void process_auth_failure(void *state, grpc_auth_context *ctx, cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL); } -static void chttp2_init_client_secure_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - grpc_credentials *creds) { +static void chttp2_init_client_secure_fullstack( + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + grpc_channel_credentials *creds) { fullstack_secure_fixture_data *ffd = f->fixture_data; f->client = grpc_secure_channel_create(creds, ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client != NULL); - grpc_credentials_release(creds); + grpc_channel_credentials_release(creds); } static void chttp2_init_server_secure_fullstack( @@ -109,7 +109,8 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { static void chttp2_init_client_simple_ssl_secure_fullstack( grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { - grpc_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, {"foo.test.google.fr"}}; diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c index 413a8b84cd..7233cdbe2d 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.c +++ b/test/core/end2end/fixtures/h2_ssl_proxy.c @@ -66,7 +66,8 @@ static grpc_server *create_proxy_server(const char *port) { static grpc_channel *create_proxy_client(const char *target) { grpc_channel *channel; - grpc_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, {"foo.test.google.fr"}}; @@ -74,7 +75,7 @@ static grpc_channel *create_proxy_client(const char *target) { client_args.num_args = 1; client_args.args = &ssl_name_override; channel = grpc_secure_channel_create(ssl_creds, target, &client_args, NULL); - grpc_credentials_release(ssl_creds); + grpc_channel_credentials_release(ssl_creds); return channel; } @@ -104,15 +105,15 @@ static void process_auth_failure(void *state, grpc_auth_context *ctx, cb(user_data, NULL, 0, NULL, 0, GRPC_STATUS_UNAUTHENTICATED, NULL); } -static void chttp2_init_client_secure_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args, - grpc_credentials *creds) { +static void chttp2_init_client_secure_fullstack( + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + grpc_channel_credentials *creds) { fullstack_secure_fixture_data *ffd = f->fixture_data; f->client = grpc_secure_channel_create( creds, grpc_end2end_proxy_get_client_target(ffd->proxy), client_args, NULL); GPR_ASSERT(f->client != NULL); - grpc_credentials_release(creds); + grpc_channel_credentials_release(creds); } static void chttp2_init_server_secure_fullstack( @@ -138,7 +139,8 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { static void chttp2_init_client_simple_ssl_secure_fullstack( grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { - grpc_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, {"foo.test.google.fr"}}; diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index 4aeade1336..bbfad21b62 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -132,27 +132,6 @@ static void print_auth_context(int is_client, const grpc_auth_context *ctx) { } } -static void test_call_creds_failure(grpc_end2end_test_config config) { - grpc_call *c; - grpc_credentials *creds = NULL; - grpc_end2end_test_fixture f = - begin_test(config, "test_call_creds_failure", 0); - gpr_timespec deadline = five_seconds_time(); - c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, - "/foo", "foo.test.google.fr", deadline, NULL); - GPR_ASSERT(c); - - /* Try with credentials unfit to be set on a call (channel creds). */ - creds = grpc_fake_transport_security_credentials_create(); - GPR_ASSERT(grpc_call_set_credentials(c, creds) != GRPC_CALL_OK); - grpc_credentials_release(creds); - - grpc_call_destroy(c); - - end_test(&f); - config.tear_down_data(&f); -} - static void request_response_with_payload_and_call_creds( const char *test_name, grpc_end2end_test_config config, override_mode mode) { @@ -180,7 +159,7 @@ static void request_response_with_payload_and_call_creds( char *details = NULL; size_t details_capacity = 0; int was_cancelled = 2; - grpc_credentials *creds = NULL; + grpc_call_credentials *creds = NULL; grpc_auth_context *s_auth_context = NULL; grpc_auth_context *c_auth_context = NULL; @@ -197,7 +176,7 @@ static void request_response_with_payload_and_call_creds( case NONE: break; case OVERRIDE: - grpc_credentials_release(creds); + grpc_call_credentials_release(creds); creds = grpc_google_iam_credentials_create(overridden_iam_token, overridden_iam_selector, NULL); GPR_ASSERT(creds != NULL); @@ -207,7 +186,7 @@ static void request_response_with_payload_and_call_creds( GPR_ASSERT(grpc_call_set_credentials(c, NULL) == GRPC_CALL_OK); break; } - grpc_credentials_release(creds); + grpc_call_credentials_release(creds); grpc_metadata_array_init(&initial_metadata_recv); grpc_metadata_array_init(&trailing_metadata_recv); @@ -412,7 +391,7 @@ static void test_request_with_server_rejecting_client_creds( gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); - grpc_credentials *creds; + grpc_call_credentials *creds; f = begin_test(config, "test_request_with_server_rejecting_client_creds", 1); cqv = cq_verifier_create(f.cq); @@ -424,7 +403,7 @@ static void test_request_with_server_rejecting_client_creds( creds = grpc_google_iam_credentials_create(iam_token, iam_selector, NULL); GPR_ASSERT(creds != NULL); GPR_ASSERT(grpc_call_set_credentials(c, creds) == GRPC_CALL_OK); - grpc_credentials_release(creds); + grpc_call_credentials_release(creds); grpc_metadata_array_init(&initial_metadata_recv); grpc_metadata_array_init(&trailing_metadata_recv); @@ -490,7 +469,6 @@ static void test_request_with_server_rejecting_client_creds( void grpc_end2end_tests(grpc_end2end_test_config config) { if (config.feature_mask & FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS) { - test_call_creds_failure(config); test_request_response_with_payload_and_call_creds(config); test_request_response_with_payload_and_overridden_call_creds(config); test_request_response_with_payload_and_deleted_call_creds(config); diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 5c1e0f4b94..03a82c09c0 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -219,7 +219,7 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { GPR_ASSERT(token_lifetime.tv_sec == 3599); GPR_ASSERT(token_lifetime.tv_nsec == 0); GPR_ASSERT(token_md->num_entries == 1); - GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].key, "Authorization") == 0); + GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].value, "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); @@ -319,7 +319,7 @@ static void check_google_iam_metadata(grpc_exec_ctx *exec_ctx, void *user_data, grpc_credentials_md *md_elems, size_t num_md, grpc_credentials_status status) { - grpc_credentials *c = (grpc_credentials *)user_data; + grpc_call_credentials *c = (grpc_call_credentials *)user_data; expected_md emd[] = {{GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, test_google_iam_authorization_token}, {GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, @@ -327,17 +327,15 @@ static void check_google_iam_metadata(grpc_exec_ctx *exec_ctx, void *user_data, GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(num_md == 2); check_metadata(emd, md_elems, num_md); - grpc_credentials_unref(c); + grpc_call_credentials_unref(c); } static void test_google_iam_creds(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *creds = grpc_google_iam_credentials_create( + grpc_call_credentials *creds = grpc_google_iam_credentials_create( test_google_iam_authorization_token, test_google_iam_authority_selector, NULL); - GPR_ASSERT(grpc_credentials_has_request_metadata(creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(creds)); - grpc_credentials_get_request_metadata(&exec_ctx, creds, NULL, + grpc_call_credentials_get_request_metadata(&exec_ctx, creds, NULL, test_service_url, check_google_iam_metadata, creds); grpc_exec_ctx_finish(&exec_ctx); @@ -348,81 +346,44 @@ static void check_access_token_metadata(grpc_exec_ctx *exec_ctx, grpc_credentials_md *md_elems, size_t num_md, grpc_credentials_status status) { - grpc_credentials *c = (grpc_credentials *)user_data; + grpc_call_credentials *c = (grpc_call_credentials *)user_data; expected_md emd[] = {{GRPC_AUTHORIZATION_METADATA_KEY, "Bearer blah"}}; GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(num_md == 1); check_metadata(emd, md_elems, num_md); - grpc_credentials_unref(c); + grpc_call_credentials_unref(c); } static void test_access_token_creds(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *creds = grpc_access_token_credentials_create("blah", NULL); - GPR_ASSERT(grpc_credentials_has_request_metadata(creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(creds)); - GPR_ASSERT(strcmp(creds->type, GRPC_CREDENTIALS_TYPE_OAUTH2) == 0); - grpc_credentials_get_request_metadata(&exec_ctx, creds, NULL, - test_service_url, - check_access_token_metadata, creds); + grpc_call_credentials *creds = + grpc_access_token_credentials_create("blah", NULL); + GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); + grpc_call_credentials_get_request_metadata( + &exec_ctx, creds, NULL, test_service_url, check_access_token_metadata, + creds); grpc_exec_ctx_finish(&exec_ctx); } -static void check_ssl_oauth2_composite_metadata( - grpc_exec_ctx *exec_ctx, void *user_data, grpc_credentials_md *md_elems, - size_t num_md, grpc_credentials_status status) { - grpc_credentials *c = (grpc_credentials *)user_data; - expected_md emd[] = { - {GRPC_AUTHORIZATION_METADATA_KEY, test_oauth2_bearer_token}}; - GPR_ASSERT(status == GRPC_CREDENTIALS_OK); - GPR_ASSERT(num_md == 1); - check_metadata(emd, md_elems, num_md); - grpc_credentials_unref(c); -} - static void test_ssl_oauth2_composite_creds(void) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *ssl_creds = - grpc_ssl_credentials_create(test_root_cert, NULL, NULL); - const grpc_credentials_array *creds_array; - grpc_credentials *oauth2_creds = grpc_md_only_test_credentials_create( - "Authorization", test_oauth2_bearer_token, 0); - grpc_credentials *composite_creds = - grpc_composite_credentials_create(ssl_creds, oauth2_creds, NULL); - grpc_credentials_unref(ssl_creds); - grpc_credentials_unref(oauth2_creds); - GPR_ASSERT(strcmp(composite_creds->type, GRPC_CREDENTIALS_TYPE_COMPOSITE) == - 0); - GPR_ASSERT(grpc_credentials_has_request_metadata(composite_creds)); - GPR_ASSERT(!grpc_credentials_has_request_metadata_only(composite_creds)); - creds_array = grpc_composite_credentials_get_credentials(composite_creds); - GPR_ASSERT(creds_array->num_creds == 2); - GPR_ASSERT(strcmp(creds_array->creds_array[0]->type, - GRPC_CREDENTIALS_TYPE_SSL) == 0); - GPR_ASSERT(strcmp(creds_array->creds_array[1]->type, - GRPC_CREDENTIALS_TYPE_OAUTH2) == 0); - grpc_credentials_get_request_metadata( - &exec_ctx, composite_creds, NULL, test_service_url, - check_ssl_oauth2_composite_metadata, composite_creds); - grpc_exec_ctx_finish(&exec_ctx); -} - -void test_ssl_fake_transport_security_composite_creds_failure(void) { - grpc_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); - grpc_credentials *fake_transport_security_creds = - grpc_fake_transport_security_credentials_create(); - - /* 2 connector credentials: should not work. */ - GPR_ASSERT(grpc_composite_credentials_create( - ssl_creds, fake_transport_security_creds, NULL) == NULL); - grpc_credentials_unref(ssl_creds); - grpc_credentials_unref(fake_transport_security_creds); -} - -static void check_ssl_oauth2_google_iam_composite_metadata( + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_call_credentials *oauth2_creds = + grpc_access_token_credentials_create("blah", NULL); + grpc_channel_credentials *ssl_oauth2_creds = + grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds, NULL); + grpc_channel_credentials_release(ssl_creds); + grpc_call_credentials_release(oauth2_creds); + GPR_ASSERT(ssl_oauth2_creds->call_creds != NULL); + GPR_ASSERT(strcmp(ssl_oauth2_creds->call_creds->type, + GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); + grpc_channel_credentials_release(ssl_oauth2_creds); +} + +static void check_oauth2_google_iam_composite_metadata( grpc_exec_ctx *exec_ctx, void *user_data, grpc_credentials_md *md_elems, size_t num_md, grpc_credentials_status status) { - grpc_credentials *c = (grpc_credentials *)user_data; + grpc_call_credentials *c = (grpc_call_credentials *)user_data; expected_md emd[] = { {GRPC_AUTHORIZATION_METADATA_KEY, test_oauth2_bearer_token}, {GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, @@ -432,51 +393,72 @@ static void check_ssl_oauth2_google_iam_composite_metadata( GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(num_md == 3); check_metadata(emd, md_elems, num_md); - grpc_credentials_unref(c); + grpc_call_credentials_unref(c); } -static void test_ssl_oauth2_google_iam_composite_creds(void) { +static void test_oauth2_google_iam_composite_creds(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *ssl_creds = - grpc_ssl_credentials_create(test_root_cert, NULL, NULL); - const grpc_credentials_array *creds_array; - grpc_credentials *oauth2_creds = grpc_md_only_test_credentials_create( - "Authorization", test_oauth2_bearer_token, 0); - grpc_credentials *aux_creds = - grpc_composite_credentials_create(ssl_creds, oauth2_creds, NULL); - grpc_credentials *google_iam_creds = grpc_google_iam_credentials_create( + const grpc_call_credentials_array *creds_array; + grpc_call_credentials *oauth2_creds = grpc_md_only_test_credentials_create( + "authorization", test_oauth2_bearer_token, 0); + grpc_call_credentials *google_iam_creds = grpc_google_iam_credentials_create( test_google_iam_authorization_token, test_google_iam_authority_selector, NULL); - grpc_credentials *composite_creds = - grpc_composite_credentials_create(aux_creds, google_iam_creds, NULL); - grpc_credentials_unref(ssl_creds); - grpc_credentials_unref(oauth2_creds); - grpc_credentials_unref(aux_creds); - grpc_credentials_unref(google_iam_creds); - GPR_ASSERT(strcmp(composite_creds->type, GRPC_CREDENTIALS_TYPE_COMPOSITE) == - 0); - GPR_ASSERT(grpc_credentials_has_request_metadata(composite_creds)); - GPR_ASSERT(!grpc_credentials_has_request_metadata_only(composite_creds)); + grpc_call_credentials *composite_creds = + grpc_composite_call_credentials_create(oauth2_creds, google_iam_creds, NULL); + grpc_call_credentials_unref(oauth2_creds); + grpc_call_credentials_unref(google_iam_creds); + GPR_ASSERT( + strcmp(composite_creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); creds_array = grpc_composite_credentials_get_credentials(composite_creds); - GPR_ASSERT(creds_array->num_creds == 3); + GPR_ASSERT(creds_array->num_creds == 2); GPR_ASSERT(strcmp(creds_array->creds_array[0]->type, - GRPC_CREDENTIALS_TYPE_SSL) == 0); + GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); GPR_ASSERT(strcmp(creds_array->creds_array[1]->type, - GRPC_CREDENTIALS_TYPE_OAUTH2) == 0); - GPR_ASSERT(strcmp(creds_array->creds_array[2]->type, - GRPC_CREDENTIALS_TYPE_IAM) == 0); - grpc_credentials_get_request_metadata( + GRPC_CALL_CREDENTIALS_TYPE_IAM) == 0); + grpc_call_credentials_get_request_metadata( &exec_ctx, composite_creds, NULL, test_service_url, - check_ssl_oauth2_google_iam_composite_metadata, composite_creds); + check_oauth2_google_iam_composite_metadata, composite_creds); grpc_exec_ctx_finish(&exec_ctx); } +static void test_ssl_oauth2_google_iam_composite_creds(void) { + const grpc_call_credentials_array *creds_array; + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_call_credentials *oauth2_creds = + grpc_access_token_credentials_create("blah", NULL); + grpc_channel_credentials *ssl_oauth2_creds = + grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds, NULL); + grpc_call_credentials *google_iam_creds = grpc_google_iam_credentials_create( + test_google_iam_authorization_token, test_google_iam_authority_selector, + NULL); + grpc_channel_credentials *ssl_oauth2_iam_creds = + grpc_composite_channel_credentials_create(ssl_oauth2_creds, + google_iam_creds, NULL); + grpc_channel_credentials_release(ssl_creds); + grpc_call_credentials_release(oauth2_creds); + grpc_channel_credentials_release(ssl_oauth2_creds); + grpc_call_credentials_release(google_iam_creds); + + GPR_ASSERT(ssl_oauth2_iam_creds->call_creds != NULL); + GPR_ASSERT(strcmp(ssl_oauth2_iam_creds->call_creds->type, + GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); + creds_array = grpc_composite_credentials_get_credentials( + ssl_oauth2_iam_creds->call_creds); + GPR_ASSERT(strcmp(creds_array->creds_array[0]->type, + GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); + GPR_ASSERT(strcmp(creds_array->creds_array[1]->type, + GRPC_CALL_CREDENTIALS_TYPE_IAM) == 0); + grpc_channel_credentials_release(ssl_oauth2_iam_creds); +} + static void on_oauth2_creds_get_metadata_success( grpc_exec_ctx *exec_ctx, void *user_data, grpc_credentials_md *md_elems, size_t num_md, grpc_credentials_status status) { GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "Authorization") == 0); + GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); @@ -545,15 +527,13 @@ static int httpcli_get_should_not_be_called( static void test_compute_engine_creds_success(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *compute_engine_creds = + grpc_call_credentials *compute_engine_creds = grpc_google_compute_engine_credentials_create(NULL); - GPR_ASSERT(grpc_credentials_has_request_metadata(compute_engine_creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(compute_engine_creds)); /* First request: http get should be called. */ grpc_httpcli_set_override(compute_engine_httpcli_get_success_override, httpcli_post_should_not_be_called); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, compute_engine_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *)test_user_data); grpc_exec_ctx_flush(&exec_ctx); @@ -561,27 +541,25 @@ static void test_compute_engine_creds_success(void) { /* Second request: the cached token should be served directly. */ grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, compute_engine_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *)test_user_data); grpc_exec_ctx_finish(&exec_ctx); - grpc_credentials_unref(compute_engine_creds); + grpc_call_credentials_unref(compute_engine_creds); grpc_httpcli_set_override(NULL, NULL); } static void test_compute_engine_creds_failure(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *compute_engine_creds = + grpc_call_credentials *compute_engine_creds = grpc_google_compute_engine_credentials_create(NULL); grpc_httpcli_set_override(compute_engine_httpcli_get_failure_override, httpcli_post_should_not_be_called); - GPR_ASSERT(grpc_credentials_has_request_metadata(compute_engine_creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(compute_engine_creds)); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, compute_engine_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_failure, (void *)test_user_data); - grpc_credentials_unref(compute_engine_creds); + grpc_call_credentials_unref(compute_engine_creds); grpc_httpcli_set_override(NULL, NULL); grpc_exec_ctx_finish(&exec_ctx); } @@ -631,16 +609,14 @@ static int refresh_token_httpcli_post_failure( static void test_refresh_token_creds_success(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *refresh_token_creds = + grpc_call_credentials *refresh_token_creds = grpc_google_refresh_token_credentials_create(test_refresh_token_str, NULL); - GPR_ASSERT(grpc_credentials_has_request_metadata(refresh_token_creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(refresh_token_creds)); /* First request: http get should be called. */ grpc_httpcli_set_override(httpcli_get_should_not_be_called, refresh_token_httpcli_post_success); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, refresh_token_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *)test_user_data); grpc_exec_ctx_flush(&exec_ctx); @@ -648,29 +624,27 @@ static void test_refresh_token_creds_success(void) { /* Second request: the cached token should be served directly. */ grpc_httpcli_set_override(httpcli_get_should_not_be_called, httpcli_post_should_not_be_called); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, refresh_token_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_success, (void *)test_user_data); grpc_exec_ctx_flush(&exec_ctx); - grpc_credentials_unref(refresh_token_creds); + grpc_call_credentials_unref(refresh_token_creds); grpc_httpcli_set_override(NULL, NULL); grpc_exec_ctx_finish(&exec_ctx); } static void test_refresh_token_creds_failure(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *refresh_token_creds = + grpc_call_credentials *refresh_token_creds = grpc_google_refresh_token_credentials_create(test_refresh_token_str, NULL); grpc_httpcli_set_override(httpcli_get_should_not_be_called, refresh_token_httpcli_post_failure); - GPR_ASSERT(grpc_credentials_has_request_metadata(refresh_token_creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(refresh_token_creds)); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, refresh_token_creds, NULL, test_service_url, on_oauth2_creds_get_metadata_failure, (void *)test_user_data); - grpc_credentials_unref(refresh_token_creds); + grpc_call_credentials_unref(refresh_token_creds); grpc_httpcli_set_override(NULL, NULL); grpc_exec_ctx_finish(&exec_ctx); } @@ -730,7 +704,7 @@ static void on_jwt_creds_get_metadata_success(grpc_exec_ctx *exec_ctx, gpr_asprintf(&expected_md_value, "Bearer %s", test_signed_jwt); GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "Authorization") == 0); + GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, expected_md_value) == 0); GPR_ASSERT(user_data != NULL); GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0); @@ -751,15 +725,13 @@ static void on_jwt_creds_get_metadata_failure(grpc_exec_ctx *exec_ctx, static void test_jwt_creds_success(void) { char *json_key_string = test_json_key_str(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *jwt_creds = + grpc_call_credentials *jwt_creds = grpc_service_account_jwt_access_credentials_create( json_key_string, grpc_max_auth_token_lifetime, NULL); - GPR_ASSERT(grpc_credentials_has_request_metadata(jwt_creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(jwt_creds)); /* First request: jwt_encode_and_sign should be called. */ grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, jwt_creds, NULL, test_service_url, on_jwt_creds_get_metadata_success, (void *)test_user_data); grpc_exec_ctx_flush(&exec_ctx); @@ -767,7 +739,7 @@ static void test_jwt_creds_success(void) { /* Second request: the cached token should be served directly. */ grpc_jwt_encode_and_sign_set_override( encode_and_sign_jwt_should_not_be_called); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, jwt_creds, NULL, test_service_url, on_jwt_creds_get_metadata_success, (void *)test_user_data); grpc_exec_ctx_flush(&exec_ctx); @@ -775,32 +747,30 @@ static void test_jwt_creds_success(void) { /* Third request: Different service url so jwt_encode_and_sign should be called again (no caching). */ grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_success); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, jwt_creds, NULL, other_test_service_url, on_jwt_creds_get_metadata_success, (void *)test_user_data); grpc_exec_ctx_flush(&exec_ctx); gpr_free(json_key_string); - grpc_credentials_unref(jwt_creds); + grpc_call_credentials_unref(jwt_creds); grpc_jwt_encode_and_sign_set_override(NULL); } static void test_jwt_creds_signing_failure(void) { char *json_key_string = test_json_key_str(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_credentials *jwt_creds = + grpc_call_credentials *jwt_creds = grpc_service_account_jwt_access_credentials_create( json_key_string, grpc_max_auth_token_lifetime, NULL); - GPR_ASSERT(grpc_credentials_has_request_metadata(jwt_creds)); - GPR_ASSERT(grpc_credentials_has_request_metadata_only(jwt_creds)); grpc_jwt_encode_and_sign_set_override(encode_and_sign_jwt_failure); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, jwt_creds, NULL, test_service_url, on_jwt_creds_get_metadata_failure, (void *)test_user_data); gpr_free(json_key_string); - grpc_credentials_unref(jwt_creds); + grpc_call_credentials_unref(jwt_creds); grpc_jwt_encode_and_sign_set_override(NULL); grpc_exec_ctx_finish(&exec_ctx); } @@ -818,22 +788,9 @@ static void set_google_default_creds_env_var_with_file_contents( gpr_free(creds_file_name); } -static grpc_credentials *composite_inner_creds(grpc_credentials *creds, - const char *inner_creds_type) { - size_t i; - grpc_composite_credentials *composite; - GPR_ASSERT(strcmp(creds->type, GRPC_CREDENTIALS_TYPE_COMPOSITE) == 0); - composite = (grpc_composite_credentials *)creds; - for (i = 0; i < composite->inner.num_creds; i++) { - grpc_credentials *c = composite->inner.creds_array[i]; - if (strcmp(c->type, inner_creds_type) == 0) return c; - } - GPR_ASSERT(0); /* Not found. */ -} - static void test_google_default_creds_auth_key(void) { grpc_service_account_jwt_access_credentials *jwt; - grpc_credentials *creds; + grpc_channel_credentials *creds; char *json_key = test_json_key_str(); grpc_flush_cached_google_default_credentials(); set_google_default_creds_env_var_with_file_contents( @@ -841,29 +798,27 @@ static void test_google_default_creds_auth_key(void) { gpr_free(json_key); creds = grpc_google_default_credentials_create(); GPR_ASSERT(creds != NULL); - jwt = (grpc_service_account_jwt_access_credentials *)composite_inner_creds( - creds, GRPC_CREDENTIALS_TYPE_JWT); + jwt = (grpc_service_account_jwt_access_credentials *)creds->call_creds; GPR_ASSERT( strcmp(jwt->key.client_id, "777-abaslkan11hlb6nmim3bpspl31ud.apps.googleusercontent.com") == 0); - grpc_credentials_unref(creds); + grpc_channel_credentials_unref(creds); gpr_setenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR, ""); /* Reset. */ } static void test_google_default_creds_access_token(void) { grpc_google_refresh_token_credentials *refresh; - grpc_credentials *creds; + grpc_channel_credentials *creds; grpc_flush_cached_google_default_credentials(); set_google_default_creds_env_var_with_file_contents( "refresh_token_google_default_creds", test_refresh_token_str); creds = grpc_google_default_credentials_create(); GPR_ASSERT(creds != NULL); - refresh = (grpc_google_refresh_token_credentials *)composite_inner_creds( - creds, GRPC_CREDENTIALS_TYPE_OAUTH2); + refresh = (grpc_google_refresh_token_credentials *)creds->call_creds; GPR_ASSERT(strcmp(refresh->refresh_token.client_id, "32555999999.apps.googleusercontent.com") == 0); - grpc_credentials_unref(creds); + grpc_channel_credentials_unref(creds); gpr_setenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR, ""); /* Reset. */ } @@ -935,7 +890,7 @@ static void plugin_destroy(void *state) { } static void test_metadata_plugin_success(void) { - grpc_credentials *creds; + grpc_call_credentials *creds; plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -946,17 +901,17 @@ static void test_metadata_plugin_success(void) { creds = grpc_metadata_credentials_create_from_plugin(plugin, NULL); GPR_ASSERT(state == PLUGIN_INITIAL_STATE); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, creds, NULL, test_service_url, on_plugin_metadata_received_success, NULL); GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE); - grpc_credentials_release(creds); + grpc_call_credentials_release(creds); GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE); grpc_exec_ctx_finish(&exec_ctx); } static void test_metadata_plugin_failure(void) { - grpc_credentials *creds; + grpc_call_credentials *creds; plugin_state state = PLUGIN_INITIAL_STATE; grpc_metadata_credentials_plugin plugin; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -967,11 +922,11 @@ static void test_metadata_plugin_failure(void) { creds = grpc_metadata_credentials_create_from_plugin(plugin, NULL); GPR_ASSERT(state == PLUGIN_INITIAL_STATE); - grpc_credentials_get_request_metadata( + grpc_call_credentials_get_request_metadata( &exec_ctx, creds, NULL, test_service_url, on_plugin_metadata_received_failure, NULL); GPR_ASSERT(state == PLUGIN_GET_METADATA_CALLED_STATE); - grpc_credentials_release(creds); + grpc_call_credentials_release(creds); GPR_ASSERT(state == PLUGIN_DESTROY_CALLED_STATE); grpc_exec_ctx_finish(&exec_ctx); } @@ -994,6 +949,7 @@ int main(int argc, char **argv) { test_google_iam_creds(); test_access_token_creds(); test_ssl_oauth2_composite_creds(); + test_oauth2_google_iam_composite_creds(); test_ssl_oauth2_google_iam_composite_creds(); test_compute_engine_creds_success(); test_compute_engine_creds_failure(); diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 764d8da9b6..ee1178cbdd 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -46,7 +46,7 @@ #include "src/core/support/file.h" #include "test/core/security/oauth2_utils.h" -static grpc_credentials *create_refresh_token_creds( +static grpc_call_credentials *create_refresh_token_creds( const char *json_refresh_token_file_path) { int success; gpr_slice refresh_token = @@ -60,7 +60,7 @@ static grpc_credentials *create_refresh_token_creds( } int main(int argc, char **argv) { - grpc_credentials *creds = NULL; + grpc_call_credentials *creds = NULL; char *json_key_file_path = NULL; char *json_refresh_token_file_path = NULL; char *token = NULL; @@ -115,7 +115,7 @@ int main(int argc, char **argv) { printf("Got token: %s.\n", token); gpr_free(token); } - grpc_credentials_release(creds); + grpc_call_credentials_release(creds); gpr_cmdline_destroy(cl); grpc_shutdown(); return 0; diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index f99d170592..fcfe8a6377 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -75,7 +75,8 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, static void do_nothing(grpc_exec_ctx *exec_ctx, void *unused, int success) {} -char *grpc_test_fetch_oauth2_token_with_credentials(grpc_credentials *creds) { +char *grpc_test_fetch_oauth2_token_with_credentials( + grpc_call_credentials *creds) { oauth2_request request; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_closure do_nothing_closure; @@ -84,8 +85,8 @@ char *grpc_test_fetch_oauth2_token_with_credentials(grpc_credentials *creds) { grpc_closure_init(&do_nothing_closure, do_nothing, NULL); - grpc_credentials_get_request_metadata(&exec_ctx, creds, &request.pollset, "", - on_oauth2_response, &request); + grpc_call_credentials_get_request_metadata(&exec_ctx, creds, &request.pollset, + "", on_oauth2_response, &request); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/security/oauth2_utils.h b/test/core/security/oauth2_utils.h index 8082351b8a..b35fe7987f 100644 --- a/test/core/security/oauth2_utils.h +++ b/test/core/security/oauth2_utils.h @@ -42,7 +42,8 @@ extern "C" { /* Fetch oauth2 access token with a credentials object. Does not take ownership. Returns NULL on a failure. The caller should call gpr_free on the token. */ -char *grpc_test_fetch_oauth2_token_with_credentials(grpc_credentials *creds); +char *grpc_test_fetch_oauth2_token_with_credentials( + grpc_call_credentials *creds); #ifdef __cplusplus } diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index f207e05794..3b6b07638f 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -72,7 +72,7 @@ int main(int argc, char **argv) { int result = 0; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; synchronizer sync; - grpc_credentials *creds = NULL; + grpc_channel_credentials *creds = NULL; char *service_url = "https://test.foo.google.com/Foo"; gpr_cmdline *cl = gpr_cmdline_create("print_google_default_creds_token"); gpr_cmdline_add_string(cl, "service_url", @@ -91,9 +91,9 @@ int main(int argc, char **argv) { grpc_pollset_init(&sync.pollset); sync.is_done = 0; - grpc_credentials_get_request_metadata(&exec_ctx, creds, &sync.pollset, - service_url, on_metadata_response, - &sync); + grpc_call_credentials_get_request_metadata(&exec_ctx, creds->call_creds, + &sync.pollset, service_url, + on_metadata_response, &sync); gpr_mu_lock(GRPC_POLLSET_MU(&sync.pollset)); while (!sync.is_done) { @@ -107,7 +107,7 @@ int main(int argc, char **argv) { } gpr_mu_unlock(GRPC_POLLSET_MU(&sync.pollset)); - grpc_credentials_release(creds); + grpc_channel_credentials_release(creds); end: gpr_cmdline_destroy(cl); -- cgit v1.2.3 From 26bf71ce37d39bb3dd2c1ae01fa837db8a082799 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Sat, 10 Oct 2015 00:21:05 -0700 Subject: Fixing mem leak and compilation error in tsan. --- src/core/security/credentials.c | 1 + test/core/security/credentials_test.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index ef1f40633b..2674003962 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -88,6 +88,7 @@ void grpc_channel_credentials_unref(grpc_channel_credentials *creds) { if (creds == NULL) return; if (gpr_unref(&creds->refcount)) { creds->vtable->destruct(creds); + grpc_call_credentials_unref(creds->call_creds); gpr_free(creds); } } diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 03a82c09c0..876a5192a4 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -54,7 +54,6 @@ static const char test_google_iam_authorization_token[] = "blahblahblhahb"; static const char test_google_iam_authority_selector[] = "respectmyauthoritah"; static const char test_oauth2_bearer_token[] = "Bearer blaaslkdjfaslkdfasdsfasf"; -static const char test_root_cert[] = "I am the root!"; /* This JSON key was generated with the GCE console and revoked immediately. The identifiers have been changed as well. -- cgit v1.2.3 From b73cbc27091090d1213485cf5dd2ad097b2ebd20 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Tue, 20 Oct 2015 21:52:54 -0700 Subject: Addressing comments. The composite channel credentials creation does not change the passed-in channel creds anymore. --- src/core/security/credentials.c | 191 ++++++++++++--------- src/core/security/credentials.h | 19 +- test/core/security/credentials_test.c | 126 ++++++++++---- .../security/print_google_default_creds_token.c | 6 +- 4 files changed, 213 insertions(+), 129 deletions(-) (limited to 'src/core') diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index 2674003962..5c9d89c764 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -87,8 +87,7 @@ grpc_channel_credentials *grpc_channel_credentials_ref( void grpc_channel_credentials_unref(grpc_channel_credentials *creds) { if (creds == NULL) return; if (gpr_unref(&creds->refcount)) { - creds->vtable->destruct(creds); - grpc_call_credentials_unref(creds->call_creds); + if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); gpr_free(creds); } } @@ -107,7 +106,7 @@ grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds) { void grpc_call_credentials_unref(grpc_call_credentials *creds) { if (creds == NULL) return; if (gpr_unref(&creds->refcount)) { - creds->vtable->destruct(creds); + if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); gpr_free(creds); } } @@ -135,14 +134,12 @@ grpc_security_status grpc_channel_credentials_create_security_connector( const grpc_channel_args *args, grpc_channel_security_connector **sc, grpc_channel_args **new_args) { *new_args = NULL; - if (channel_creds == NULL || - channel_creds->vtable->create_security_connector == NULL) { - gpr_log(GPR_ERROR, - "Invalid credentials for creating a security connector."); + if (channel_creds == NULL) { return GRPC_SECURITY_ERROR; } - return channel_creds->vtable->create_security_connector(channel_creds, target, - args, sc, new_args); + GPR_ASSERT(channel_creds->vtable->create_security_connector != NULL); + return channel_creds->vtable->create_security_connector( + channel_creds, NULL, target, args, sc, new_args); } grpc_server_credentials *grpc_server_credentials_ref( @@ -155,7 +152,7 @@ grpc_server_credentials *grpc_server_credentials_ref( void grpc_server_credentials_unref(grpc_server_credentials *creds) { if (creds == NULL) return; if (gpr_unref(&creds->refcount)) { - creds->vtable->destruct(creds); + if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); if (creds->processor.destroy != NULL && creds->processor.state != NULL) { creds->processor.destroy(creds->processor.state); } @@ -265,8 +262,8 @@ static void ssl_server_destruct(grpc_server_credentials *creds) { } static grpc_security_status ssl_create_security_connector( - grpc_channel_credentials *creds, const char *target, - const grpc_channel_args *args, + grpc_channel_credentials *creds, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, grpc_channel_security_connector **sc, grpc_channel_args **new_args) { grpc_ssl_credentials *c = (grpc_ssl_credentials *)creds; grpc_security_status status = GRPC_SECURITY_OK; @@ -283,7 +280,7 @@ static grpc_security_status ssl_create_security_connector( } } status = grpc_ssl_channel_security_connector_create( - creds->call_creds, &c->config, target, overridden_target_name, sc); + call_creds, &c->config, target, overridden_target_name, sc); if (status != GRPC_SECURITY_OK) { return status; } @@ -875,21 +872,11 @@ grpc_call_credentials *grpc_access_token_credentials_create( /* -- Fake transport security credentials. -- */ -static void fake_transport_security_credentials_destruct( - grpc_channel_credentials *creds) { - /* Nothing to do here. */ -} - -static void fake_transport_security_server_credentials_destruct( - grpc_server_credentials *creds) { - /* Nothing to do here. */ -} - static grpc_security_status fake_transport_security_create_security_connector( - grpc_channel_credentials *c, const char *target, - const grpc_channel_args *args, grpc_channel_security_connector **sc, - grpc_channel_args **new_args) { - *sc = grpc_fake_channel_security_connector_create(c->call_creds, 1); + grpc_channel_credentials *c, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args) { + *sc = grpc_fake_channel_security_connector_create(call_creds, 1); return GRPC_SECURITY_OK; } @@ -902,13 +889,11 @@ fake_transport_security_server_create_security_connector( static grpc_channel_credentials_vtable fake_transport_security_credentials_vtable = { - fake_transport_security_credentials_destruct, - fake_transport_security_create_security_connector}; + NULL, fake_transport_security_create_security_connector}; static grpc_server_credentials_vtable fake_transport_security_server_credentials_vtable = { - fake_transport_security_server_credentials_destruct, - fake_transport_security_server_create_security_connector}; + NULL, fake_transport_security_server_create_security_connector}; grpc_channel_credentials *grpc_fake_transport_security_credentials_create( void) { @@ -930,20 +915,20 @@ grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( return c; } -/* -- Composite credentials. -- */ +/* -- Composite call credentials. -- */ typedef struct { - grpc_composite_credentials *composite_creds; + grpc_composite_call_credentials *composite_creds; size_t creds_index; grpc_credentials_md_store *md_elems; char *service_url; void *user_data; grpc_pollset *pollset; grpc_credentials_metadata_cb cb; -} grpc_composite_credentials_metadata_context; +} grpc_composite_call_credentials_metadata_context; -static void composite_destruct(grpc_call_credentials *creds) { - grpc_composite_credentials *c = (grpc_composite_credentials *)creds; +static void composite_call_destruct(grpc_call_credentials *creds) { + grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; size_t i; for (i = 0; i < c->inner.num_creds; i++) { grpc_call_credentials_unref(c->inner.creds_array[i]); @@ -951,18 +936,19 @@ static void composite_destruct(grpc_call_credentials *creds) { gpr_free(c->inner.creds_array); } -static void composite_md_context_destroy( - grpc_composite_credentials_metadata_context *ctx) { +static void composite_call_md_context_destroy( + grpc_composite_call_credentials_metadata_context *ctx) { grpc_credentials_md_store_unref(ctx->md_elems); if (ctx->service_url != NULL) gpr_free(ctx->service_url); gpr_free(ctx); } -static void composite_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_credentials_md *md_elems, size_t num_md, - grpc_credentials_status status) { - grpc_composite_credentials_metadata_context *ctx = - (grpc_composite_credentials_metadata_context *)user_data; +static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_credentials_md *md_elems, + size_t num_md, + grpc_credentials_status status) { + grpc_composite_call_credentials_metadata_context *ctx = + (grpc_composite_call_credentials_metadata_context *)user_data; if (status != GRPC_CREDENTIALS_OK) { ctx->cb(exec_ctx, ctx->user_data, NULL, 0, status); return; @@ -983,24 +969,24 @@ static void composite_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, ctx->composite_creds->inner.creds_array[ctx->creds_index++]; grpc_call_credentials_get_request_metadata(exec_ctx, inner_creds, ctx->pollset, ctx->service_url, - composite_metadata_cb, ctx); + composite_call_metadata_cb, ctx); return; } /* We're done!. */ ctx->cb(exec_ctx, ctx->user_data, ctx->md_elems->entries, ctx->md_elems->num_entries, GRPC_CREDENTIALS_OK); - composite_md_context_destroy(ctx); + composite_call_md_context_destroy(ctx); } -static void composite_get_request_metadata( +static void composite_call_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { - grpc_composite_credentials *c = (grpc_composite_credentials *)creds; - grpc_composite_credentials_metadata_context *ctx; + grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; + grpc_composite_call_credentials_metadata_context *ctx; - ctx = gpr_malloc(sizeof(grpc_composite_credentials_metadata_context)); - memset(ctx, 0, sizeof(grpc_composite_credentials_metadata_context)); + ctx = gpr_malloc(sizeof(grpc_composite_call_credentials_metadata_context)); + memset(ctx, 0, sizeof(grpc_composite_call_credentials_metadata_context)); ctx->service_url = gpr_strdup(service_url); ctx->user_data = user_data; ctx->cb = cb; @@ -1009,11 +995,11 @@ static void composite_get_request_metadata( ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); grpc_call_credentials_get_request_metadata( exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset, service_url, - composite_metadata_cb, ctx); + composite_call_metadata_cb, ctx); } -static grpc_call_credentials_vtable composite_credentials_vtable = { - composite_destruct, composite_get_request_metadata}; +static grpc_call_credentials_vtable composite_call_credentials_vtable = { + composite_call_destruct, composite_call_get_request_metadata}; static grpc_call_credentials_array get_creds_array( grpc_call_credentials **creds_addr) { @@ -1022,7 +1008,7 @@ static grpc_call_credentials_array get_creds_array( result.creds_array = creds_addr; result.num_creds = 1; if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { - result = *grpc_composite_credentials_get_credentials(creds); + result = *grpc_composite_call_credentials_get_credentials(creds); } return result; } @@ -1034,18 +1020,18 @@ grpc_call_credentials *grpc_composite_call_credentials_create( size_t creds_array_byte_size; grpc_call_credentials_array creds1_array; grpc_call_credentials_array creds2_array; - grpc_composite_credentials *c; + grpc_composite_call_credentials *c; GRPC_API_TRACE( - "grpc_composite_credentials_create(creds1=%p, creds2=%p, " + "grpc_composite_call_credentials_create(creds1=%p, creds2=%p, " "reserved=%p)", 3, (creds1, creds2, reserved)); GPR_ASSERT(reserved == NULL); GPR_ASSERT(creds1 != NULL); GPR_ASSERT(creds2 != NULL); - c = gpr_malloc(sizeof(grpc_composite_credentials)); - memset(c, 0, sizeof(grpc_composite_credentials)); + c = gpr_malloc(sizeof(grpc_composite_call_credentials)); + memset(c, 0, sizeof(grpc_composite_call_credentials)); c->base.type = GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE; - c->base.vtable = &composite_credentials_vtable; + c->base.vtable = &composite_call_credentials_vtable; gpr_ref_init(&c->base.refcount, 1); creds1_array = get_creds_array(&creds1); creds2_array = get_creds_array(&creds2); @@ -1065,10 +1051,10 @@ grpc_call_credentials *grpc_composite_call_credentials_create( return &c->base; } -const grpc_call_credentials_array *grpc_composite_credentials_get_credentials( - grpc_call_credentials *creds) { - const grpc_composite_credentials *c = - (const grpc_composite_credentials *)creds; +const grpc_call_credentials_array * +grpc_composite_call_credentials_get_credentials(grpc_call_credentials *creds) { + const grpc_composite_call_credentials *c = + (const grpc_composite_call_credentials *)creds; GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); return &c->inner; } @@ -1082,7 +1068,7 @@ grpc_call_credentials *grpc_credentials_contains_type( return creds; } else if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { const grpc_call_credentials_array *inner_creds_array = - grpc_composite_credentials_get_credentials(creds); + grpc_composite_call_credentials_get_credentials(creds); for (i = 0; i < inner_creds_array->num_creds; i++) { if (strcmp(type, inner_creds_array->creds_array[i]->type) == 0) { if (composite_creds != NULL) *composite_creds = creds; @@ -1093,24 +1079,6 @@ grpc_call_credentials *grpc_credentials_contains_type( return NULL; } -grpc_channel_credentials *grpc_composite_channel_credentials_create( - grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, - void *reserved) { - GPR_ASSERT(reserved == NULL); - if (channel_creds == NULL) return NULL; - if (channel_creds->call_creds == NULL) { - channel_creds->call_creds = grpc_call_credentials_ref(call_creds); - } else if (call_creds != NULL) { - grpc_call_credentials *composite_creds = - grpc_composite_call_credentials_create(channel_creds->call_creds, - call_creds, NULL); - if (composite_creds == NULL) return NULL; - grpc_call_credentials_unref(channel_creds->call_creds); - channel_creds->call_creds = composite_creds; - } - return grpc_channel_credentials_ref(channel_creds); -} - /* -- IAM credentials. -- */ static void iam_destruct(grpc_call_credentials *creds) { @@ -1232,6 +1200,8 @@ static grpc_call_credentials_vtable plugin_vtable = { grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( grpc_metadata_credentials_plugin plugin, void *reserved) { grpc_plugin_credentials *c = gpr_malloc(sizeof(*c)); + GRPC_API_TRACE("grpc_metadata_credentials_create_from_plugin(reserved=%p)", 1, + (reserved)); GPR_ASSERT(reserved == NULL); memset(c, 0, sizeof(*c)); c->base.type = GRPC_CALL_CREDENTIALS_TYPE_METADATA_PLUGIN; @@ -1240,3 +1210,60 @@ grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( c->plugin = plugin; return &c->base; } + +/* -- Composite channel credentials. -- */ + +static void composite_channel_destruct(grpc_channel_credentials *creds) { + grpc_composite_channel_credentials *c = + (grpc_composite_channel_credentials *)creds; + grpc_channel_credentials_unref(c->inner_creds); + grpc_call_credentials_unref(c->call_creds); +} + +static grpc_security_status composite_channel_create_security_connector( + grpc_channel_credentials *creds, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args) { + grpc_composite_channel_credentials *c = + (grpc_composite_channel_credentials *)creds; + grpc_security_status status = GRPC_SECURITY_ERROR; + + GPR_ASSERT(c->inner_creds != NULL && c->call_creds != NULL && + c->inner_creds->vtable != NULL && + c->inner_creds->vtable->create_security_connector != NULL); + /* If we are passed a call_creds, create a call composite to pass it + downstream. */ + if (call_creds != NULL) { + grpc_call_credentials *composite_call_creds = + grpc_composite_call_credentials_create(c->call_creds, call_creds, NULL); + status = c->inner_creds->vtable->create_security_connector( + c->inner_creds, composite_call_creds, target, args, sc, new_args); + grpc_call_credentials_unref(composite_call_creds); + } else { + status = c->inner_creds->vtable->create_security_connector( + c->inner_creds, c->call_creds, target, args, sc, new_args); + } + return status; +} + +static grpc_channel_credentials_vtable composite_channel_credentials_vtable = { + composite_channel_destruct, composite_channel_create_security_connector}; + +grpc_channel_credentials *grpc_composite_channel_credentials_create( + grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, + void *reserved) { + grpc_composite_channel_credentials *c = gpr_malloc(sizeof(*c)); + memset(c, 0, sizeof(*c)); + GPR_ASSERT(channel_creds != NULL && call_creds != NULL && reserved == NULL); + GRPC_API_TRACE( + "grpc_composite_channel_credentials_create(channel_creds=%p, " + "call_creds=%p, reserved=%p)", + 3, (channel_creds, call_creds, reserved)); + c->base.type = channel_creds->type; + c->base.vtable = &composite_channel_credentials_vtable; + gpr_ref_init(&c->base.refcount, 1); + c->inner_creds = grpc_channel_credentials_ref(channel_creds); + c->call_creds = grpc_call_credentials_ref(call_creds); + return &c->base; +} + diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h index b507e2b178..5189a6d816 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -100,16 +100,15 @@ typedef struct { void (*destruct)(grpc_channel_credentials *c); grpc_security_status (*create_security_connector)( - grpc_channel_credentials *c, const char *target, - const grpc_channel_args *args, grpc_channel_security_connector **sc, - grpc_channel_args **new_args); + grpc_channel_credentials *c, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args); } grpc_channel_credentials_vtable; struct grpc_channel_credentials { const grpc_channel_credentials_vtable *vtable; const char *type; gpr_refcount refcount; - grpc_call_credentials *call_creds; }; grpc_channel_credentials *grpc_channel_credentials_ref( @@ -188,7 +187,7 @@ typedef struct { size_t num_creds; } grpc_call_credentials_array; -const grpc_call_credentials_array *grpc_composite_credentials_get_credentials( +const grpc_call_credentials_array *grpc_composite_call_credentials_get_credentials( grpc_call_credentials *composite_creds); /* Returns creds if creds is of the specified type or the inner creds of the @@ -273,6 +272,14 @@ typedef struct { grpc_ssl_server_config config; } grpc_ssl_server_credentials; +/* -- Channel composite credentials. -- */ + +typedef struct { + grpc_channel_credentials base; + grpc_channel_credentials *inner_creds; + grpc_call_credentials *call_creds; +} grpc_composite_channel_credentials; + /* -- Jwt credentials -- */ typedef struct { @@ -349,7 +356,7 @@ typedef struct { typedef struct { grpc_call_credentials base; grpc_call_credentials_array inner; -} grpc_composite_credentials; +} grpc_composite_call_credentials; /* -- Plugin credentials. -- */ diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 876a5192a4..dcb35e5309 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -50,6 +50,20 @@ #include +/* -- Mock channel credentials. -- */ + +static grpc_channel_credentials *grpc_mock_channel_credentials_create( + const grpc_channel_credentials_vtable *vtable) { + grpc_channel_credentials *c = gpr_malloc(sizeof(*c)); + memset(c, 0, sizeof(*c)); + c->type = "mock"; + c->vtable = vtable; + gpr_ref_init(&c->refcount, 1); + return c; +} + +/* -- Constants. -- */ + static const char test_google_iam_authorization_token[] = "blahblahblhahb"; static const char test_google_iam_authority_selector[] = "respectmyauthoritah"; static const char test_oauth2_bearer_token[] = @@ -112,6 +126,8 @@ static const char test_signed_jwt[] = static const char test_service_url[] = "https://foo.com/foo.v1"; static const char other_test_service_url[] = "https://bar.com/bar.v1"; +/* -- Utils. -- */ + static char *test_json_key_str(void) { size_t result_len = strlen(test_json_key_str_part1) + strlen(test_json_key_str_part2) + @@ -140,6 +156,8 @@ static grpc_httpcli_response http_response(int status, const char *body) { return response; } +/* -- Tests. -- */ + static void test_empty_md_store(void) { grpc_credentials_md_store *store = grpc_credentials_md_store_create(0); GPR_ASSERT(store->num_entries == 0); @@ -364,19 +382,33 @@ static void test_access_token_creds(void) { grpc_exec_ctx_finish(&exec_ctx); } -static void test_ssl_oauth2_composite_creds(void) { - grpc_channel_credentials *ssl_creds = - grpc_ssl_credentials_create(NULL, NULL, NULL); +static grpc_security_status check_channel_oauth2_create_security_connector( + grpc_channel_credentials *c, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args) { + GPR_ASSERT(strcmp(c->type, "mock") == 0); + GPR_ASSERT(call_creds != NULL); + GPR_ASSERT(strcmp(call_creds->type, GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); + return GRPC_SECURITY_OK; +} + +static void test_channel_oauth2_composite_creds(void) { + grpc_channel_args *new_args; + grpc_channel_credentials_vtable vtable = { + NULL, check_channel_oauth2_create_security_connector}; + grpc_channel_credentials *channel_creds = + grpc_mock_channel_credentials_create(&vtable); grpc_call_credentials *oauth2_creds = grpc_access_token_credentials_create("blah", NULL); - grpc_channel_credentials *ssl_oauth2_creds = - grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds, NULL); - grpc_channel_credentials_release(ssl_creds); + grpc_channel_credentials *channel_oauth2_creds = + grpc_composite_channel_credentials_create(channel_creds, oauth2_creds, + NULL); + grpc_channel_credentials_release(channel_creds); grpc_call_credentials_release(oauth2_creds); - GPR_ASSERT(ssl_oauth2_creds->call_creds != NULL); - GPR_ASSERT(strcmp(ssl_oauth2_creds->call_creds->type, - GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); - grpc_channel_credentials_release(ssl_oauth2_creds); + GPR_ASSERT(grpc_channel_credentials_create_security_connector( + channel_oauth2_creds, NULL, NULL, NULL, &new_args) == + GRPC_SECURITY_OK); + grpc_channel_credentials_release(channel_oauth2_creds); } static void check_oauth2_google_iam_composite_metadata( @@ -409,7 +441,8 @@ static void test_oauth2_google_iam_composite_creds(void) { grpc_call_credentials_unref(google_iam_creds); GPR_ASSERT( strcmp(composite_creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); - creds_array = grpc_composite_credentials_get_credentials(composite_creds); + creds_array = + grpc_composite_call_credentials_get_credentials(composite_creds); GPR_ASSERT(creds_array->num_creds == 2); GPR_ASSERT(strcmp(creds_array->creds_array[0]->type, GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); @@ -421,35 +454,50 @@ static void test_oauth2_google_iam_composite_creds(void) { grpc_exec_ctx_finish(&exec_ctx); } -static void test_ssl_oauth2_google_iam_composite_creds(void) { +static grpc_security_status +check_channel_oauth2_google_iam_create_security_connector( + grpc_channel_credentials *c, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args) { const grpc_call_credentials_array *creds_array; - grpc_channel_credentials *ssl_creds = - grpc_ssl_credentials_create(NULL, NULL, NULL); + GPR_ASSERT(strcmp(c->type, "mock") == 0); + GPR_ASSERT(call_creds != NULL); + GPR_ASSERT(strcmp(call_creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == + 0); + creds_array = grpc_composite_call_credentials_get_credentials(call_creds); + GPR_ASSERT(strcmp(creds_array->creds_array[0]->type, + GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); + GPR_ASSERT(strcmp(creds_array->creds_array[1]->type, + GRPC_CALL_CREDENTIALS_TYPE_IAM) == 0); + return GRPC_SECURITY_OK; +} + +static void test_channel_oauth2_google_iam_composite_creds(void) { + grpc_channel_args *new_args; + grpc_channel_credentials_vtable vtable = { + NULL, check_channel_oauth2_google_iam_create_security_connector}; + grpc_channel_credentials *channel_creds = + grpc_mock_channel_credentials_create(&vtable); grpc_call_credentials *oauth2_creds = grpc_access_token_credentials_create("blah", NULL); - grpc_channel_credentials *ssl_oauth2_creds = - grpc_composite_channel_credentials_create(ssl_creds, oauth2_creds, NULL); + grpc_channel_credentials *channel_oauth2_creds = + grpc_composite_channel_credentials_create(channel_creds, oauth2_creds, NULL); grpc_call_credentials *google_iam_creds = grpc_google_iam_credentials_create( test_google_iam_authorization_token, test_google_iam_authority_selector, NULL); - grpc_channel_credentials *ssl_oauth2_iam_creds = - grpc_composite_channel_credentials_create(ssl_oauth2_creds, + grpc_channel_credentials *channel_oauth2_iam_creds = + grpc_composite_channel_credentials_create(channel_oauth2_creds, google_iam_creds, NULL); - grpc_channel_credentials_release(ssl_creds); + grpc_channel_credentials_release(channel_creds); grpc_call_credentials_release(oauth2_creds); - grpc_channel_credentials_release(ssl_oauth2_creds); + grpc_channel_credentials_release(channel_oauth2_creds); grpc_call_credentials_release(google_iam_creds); - GPR_ASSERT(ssl_oauth2_iam_creds->call_creds != NULL); - GPR_ASSERT(strcmp(ssl_oauth2_iam_creds->call_creds->type, - GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); - creds_array = grpc_composite_credentials_get_credentials( - ssl_oauth2_iam_creds->call_creds); - GPR_ASSERT(strcmp(creds_array->creds_array[0]->type, - GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); - GPR_ASSERT(strcmp(creds_array->creds_array[1]->type, - GRPC_CALL_CREDENTIALS_TYPE_IAM) == 0); - grpc_channel_credentials_release(ssl_oauth2_iam_creds); + GPR_ASSERT(grpc_channel_credentials_create_security_connector( + channel_oauth2_iam_creds, NULL, NULL, NULL, &new_args) == + GRPC_SECURITY_OK); + + grpc_channel_credentials_release(channel_oauth2_iam_creds); } static void on_oauth2_creds_get_metadata_success( @@ -789,35 +837,37 @@ static void set_google_default_creds_env_var_with_file_contents( static void test_google_default_creds_auth_key(void) { grpc_service_account_jwt_access_credentials *jwt; - grpc_channel_credentials *creds; + grpc_composite_channel_credentials *creds; char *json_key = test_json_key_str(); grpc_flush_cached_google_default_credentials(); set_google_default_creds_env_var_with_file_contents( "json_key_google_default_creds", json_key); gpr_free(json_key); - creds = grpc_google_default_credentials_create(); + creds = (grpc_composite_channel_credentials *) + grpc_google_default_credentials_create(); GPR_ASSERT(creds != NULL); jwt = (grpc_service_account_jwt_access_credentials *)creds->call_creds; GPR_ASSERT( strcmp(jwt->key.client_id, "777-abaslkan11hlb6nmim3bpspl31ud.apps.googleusercontent.com") == 0); - grpc_channel_credentials_unref(creds); + grpc_channel_credentials_unref(&creds->base); gpr_setenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR, ""); /* Reset. */ } static void test_google_default_creds_access_token(void) { grpc_google_refresh_token_credentials *refresh; - grpc_channel_credentials *creds; + grpc_composite_channel_credentials *creds; grpc_flush_cached_google_default_credentials(); set_google_default_creds_env_var_with_file_contents( "refresh_token_google_default_creds", test_refresh_token_str); - creds = grpc_google_default_credentials_create(); + creds = (grpc_composite_channel_credentials *) + grpc_google_default_credentials_create(); GPR_ASSERT(creds != NULL); refresh = (grpc_google_refresh_token_credentials *)creds->call_creds; GPR_ASSERT(strcmp(refresh->refresh_token.client_id, "32555999999.apps.googleusercontent.com") == 0); - grpc_channel_credentials_unref(creds); + grpc_channel_credentials_unref(&creds->base); gpr_setenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR, ""); /* Reset. */ } @@ -947,9 +997,9 @@ int main(int argc, char **argv) { test_oauth2_token_fetcher_creds_parsing_missing_token_lifetime(); test_google_iam_creds(); test_access_token_creds(); - test_ssl_oauth2_composite_creds(); + test_channel_oauth2_composite_creds(); test_oauth2_google_iam_composite_creds(); - test_ssl_oauth2_google_iam_composite_creds(); + test_channel_oauth2_google_iam_composite_creds(); test_compute_engine_creds_success(); test_compute_engine_creds_failure(); test_refresh_token_creds_success(); diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 3b6b07638f..eb63724715 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -91,9 +91,9 @@ int main(int argc, char **argv) { grpc_pollset_init(&sync.pollset); sync.is_done = 0; - grpc_call_credentials_get_request_metadata(&exec_ctx, creds->call_creds, - &sync.pollset, service_url, - on_metadata_response, &sync); + grpc_call_credentials_get_request_metadata( + &exec_ctx, ((grpc_composite_channel_credentials *)creds)->call_creds, + &sync.pollset, service_url, on_metadata_response, &sync); gpr_mu_lock(GRPC_POLLSET_MU(&sync.pollset)); while (!sync.is_done) { -- cgit v1.2.3 From 04f4054546ccc794fa59e8e989bba14142d50495 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 Nov 2015 11:12:52 -0800 Subject: use QueryPerformanceCounter as precise clock for windows --- src/core/support/time_win32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/support/time_win32.c b/src/core/support/time_win32.c index bc0586d069..623a8d9233 100644 --- a/src/core/support/time_win32.c +++ b/src/core/support/time_win32.c @@ -66,14 +66,12 @@ gpr_timespec gpr_now(gpr_clock_type clock) { now_tv.tv_nsec = now_tb.millitm * 1000000; break; case GPR_CLOCK_MONOTONIC: + case GPR_CLOCK_PRECISE: QueryPerformanceCounter(×tamp); now_dbl = (timestamp.QuadPart - g_start_time.QuadPart) * g_time_scale; now_tv.tv_sec = (time_t)now_dbl; now_tv.tv_nsec = (int)((now_dbl - (double)now_tv.tv_sec) * 1e9); break; - case GPR_CLOCK_PRECISE: - gpr_precise_clock_now(&now_tv); - break; } return now_tv; } -- cgit v1.2.3 From 795f1de3256ac5f51590e79aa4501a7e673f35b0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 Nov 2015 14:10:28 -0800 Subject: Temporary patch for max table size not being implemented yet --- src/core/transport/chttp2/hpack_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index 6eebfc3ce4..ccfaece936 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -901,8 +901,8 @@ static int parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, static int finish_max_tbl_size(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { gpr_log(GPR_INFO, "MAX TABLE SIZE: %d", p->index); - abort(); /* not implemented */ - return parse_begin(p, cur, end); + /* not implemented */ + return 0; } /* parse a max table size change, max size < 15 */ -- cgit v1.2.3 From 334314b8887da1b082777c69945dead45182af7f Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 9 Nov 2015 14:29:14 -0800 Subject: Updating the server1 cert so that it can be used with Go. The encoding of the issuer field in this cert is now a PRINTABLESTRING as opposed to UTF8STRING in the previous server1.pem which was causing the Go issue. Fixes #4086. --- src/core/tsi/test_creds/server1.pem | 28 ++--- .../Grpc.IntegrationTesting/data/server1.pem | 28 ++--- src/node/test/data/server1.pem | 28 ++--- src/php/tests/data/server1.pem | 28 ++--- .../grpc_interop/credentials/server1.pem | 28 ++--- .../grpcio_test/grpc_test/credentials/server1.pem | 28 ++--- src/ruby/spec/testdata/server1.pem | 28 ++--- test/core/end2end/data/server1_cert.c | 132 ++++++++++----------- 8 files changed, 164 insertions(+), 164 deletions(-) (limited to 'src/core') diff --git a/src/core/tsi/test_creds/server1.pem b/src/core/tsi/test_creds/server1.pem index 8e582e571f..f3d43fcc5b 100644 --- a/src/core/tsi/test_creds/server1.pem +++ b/src/core/tsi/test_creds/server1.pem @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE----- -MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET -MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ -dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 -MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV -BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl -c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs -JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO -RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 -3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 -b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ -KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS -wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e -aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx +MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 +ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco +LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg +zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd +9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw +CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy +em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G +CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 +hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh +y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 -----END CERTIFICATE----- diff --git a/src/csharp/Grpc.IntegrationTesting/data/server1.pem b/src/csharp/Grpc.IntegrationTesting/data/server1.pem index 8e582e571f..f3d43fcc5b 100644 --- a/src/csharp/Grpc.IntegrationTesting/data/server1.pem +++ b/src/csharp/Grpc.IntegrationTesting/data/server1.pem @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE----- -MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET -MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ -dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 -MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV -BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl -c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs -JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO -RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 -3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 -b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ -KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS -wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e -aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx +MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 +ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco +LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg +zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd +9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw +CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy +em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G +CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 +hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh +y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 -----END CERTIFICATE----- diff --git a/src/node/test/data/server1.pem b/src/node/test/data/server1.pem index 8e582e571f..f3d43fcc5b 100644 --- a/src/node/test/data/server1.pem +++ b/src/node/test/data/server1.pem @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE----- -MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET -MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ -dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 -MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV -BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl -c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs -JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO -RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 -3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 -b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ -KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS -wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e -aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx +MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 +ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco +LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg +zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd +9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw +CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy +em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G +CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 +hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh +y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 -----END CERTIFICATE----- diff --git a/src/php/tests/data/server1.pem b/src/php/tests/data/server1.pem index 8e582e571f..f3d43fcc5b 100755 --- a/src/php/tests/data/server1.pem +++ b/src/php/tests/data/server1.pem @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE----- -MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET -MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ -dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 -MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV -BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl -c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs -JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO -RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 -3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 -b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ -KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS -wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e -aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx +MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 +ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco +LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg +zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd +9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw +CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy +em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G +CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 +hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh +y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 -----END CERTIFICATE----- diff --git a/src/python/grpcio_test/grpc_interop/credentials/server1.pem b/src/python/grpcio_test/grpc_interop/credentials/server1.pem index 8e582e571f..f3d43fcc5b 100755 --- a/src/python/grpcio_test/grpc_interop/credentials/server1.pem +++ b/src/python/grpcio_test/grpc_interop/credentials/server1.pem @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE----- -MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET -MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ -dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 -MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV -BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl -c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs -JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO -RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 -3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 -b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ -KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS -wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e -aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx +MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 +ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco +LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg +zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd +9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw +CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy +em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G +CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 +hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh +y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 -----END CERTIFICATE----- diff --git a/src/python/grpcio_test/grpc_test/credentials/server1.pem b/src/python/grpcio_test/grpc_test/credentials/server1.pem index 8e582e571f..f3d43fcc5b 100755 --- a/src/python/grpcio_test/grpc_test/credentials/server1.pem +++ b/src/python/grpcio_test/grpc_test/credentials/server1.pem @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE----- -MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET -MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ -dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 -MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV -BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl -c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs -JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO -RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 -3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 -b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ -KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS -wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e -aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx +MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 +ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco +LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg +zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd +9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw +CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy +em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G +CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 +hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh +y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 -----END CERTIFICATE----- diff --git a/src/ruby/spec/testdata/server1.pem b/src/ruby/spec/testdata/server1.pem index 8e582e571f..f3d43fcc5b 100755 --- a/src/ruby/spec/testdata/server1.pem +++ b/src/ruby/spec/testdata/server1.pem @@ -1,16 +1,16 @@ -----BEGIN CERTIFICATE----- -MIICmzCCAgSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJBVTET -MBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQ -dHkgTHRkMQ8wDQYDVQQDDAZ0ZXN0Y2EwHhcNMTQwNzIyMDYwMDU3WhcNMjQwNzE5 -MDYwMDU3WjBkMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV -BAcTB0NoaWNhZ28xFDASBgNVBAoTC0dvb2dsZSBJbmMuMRowGAYDVQQDFBEqLnRl -c3QuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA4cMVJygs -JUmlgMMzgdi0h1XoCR7+ww1pop04OMMyy7H/i0PJ2W6Y35+b4CM8QrkYeEafUGDO -RYX6yV/cHGGsD/x02ye6ey1UDtkGAD/mpDEx8YCrjAc1Vfvt8Fk6Cn1WVIxV/J30 -3xjBsFgByQ55RBp1OLZfVLo6AleBDSbcxaECAwEAAaNrMGkwCQYDVR0TBAIwADAL -BgNVHQ8EBAMCBeAwTwYDVR0RBEgwRoIQKi50ZXN0Lmdvb2dsZS5mcoIYd2F0ZXJ6 -b29pLnRlc3QuZ29vZ2xlLmJlghIqLnRlc3QueW91dHViZS5jb22HBMCoAQMwDQYJ -KoZIhvcNAQEFBQADgYEAM2Ii0LgTGbJ1j4oqX9bxVcxm+/R5Yf8oi0aZqTJlnLYS -wXcBykxTx181s7WyfJ49WwrYXo78zTDAnf1ma0fPq3e4mpspvyndLh1a+OarHa1e -aT0DIIYk7qeEa1YcVljx2KyLd0r1BBAfrwyGaEPVeJQVYWaOJRU2we/KD4ojf9s= +MIICnDCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJBVTET +MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ +dHkgTHRkMQ8wDQYDVQQDEwZ0ZXN0Y2EwHhcNMTUxMTA0MDIyMDI0WhcNMjUxMTAx +MDIyMDI0WjBlMQswCQYDVQQGEwJVUzERMA8GA1UECBMISWxsaW5vaXMxEDAOBgNV +BAcTB0NoaWNhZ28xFTATBgNVBAoTDEV4YW1wbGUsIENvLjEaMBgGA1UEAxQRKi50 +ZXN0Lmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOHDFSco +LCVJpYDDM4HYtIdV6Ake/sMNaaKdODjDMsux/4tDydlumN+fm+AjPEK5GHhGn1Bg +zkWF+slf3BxhrA/8dNsnunstVA7ZBgA/5qQxMfGAq4wHNVX77fBZOgp9VlSMVfyd +9N8YwbBYAckOeUQadTi2X1S6OgJXgQ0m3MWhAgMBAAGjazBpMAkGA1UdEwQCMAAw +CwYDVR0PBAQDAgXgME8GA1UdEQRIMEaCECoudGVzdC5nb29nbGUuZnKCGHdhdGVy +em9vaS50ZXN0Lmdvb2dsZS5iZYISKi50ZXN0LnlvdXR1YmUuY29thwTAqAEDMA0G +CSqGSIb3DQEBCwUAA4GBAJFXVifQNub1LUP4JlnX5lXNlo8FxZ2a12AFQs+bzoJ6 +hM044EDjqyxUqSbVePK0ni3w1fHQB5rY9yYC5f8G7aqqTY1QOhoUk8ZTSTRpnkTh +y4jjdvTZeLDVBlueZUTDRmy2feY5aZIU18vFDK08dTG0A87pppuv1LNIR3loveU8 -----END CERTIFICATE----- diff --git a/test/core/end2end/data/server1_cert.c b/test/core/end2end/data/server1_cert.c index d31f2e2d0e..4f018d81b8 100644 --- a/test/core/end2end/data/server1_cert.c +++ b/test/core/end2end/data/server1_cert.c @@ -34,82 +34,82 @@ const char test_server1_cert[] = { 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, - 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43, 0x6d, 0x7a, 0x43, 0x43, - 0x41, 0x67, 0x53, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, - 0x41, 0x7a, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, - 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x55, 0x46, 0x41, 0x44, 0x42, 0x57, + 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x43, 0x6e, 0x44, 0x43, 0x43, + 0x41, 0x67, 0x57, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, + 0x42, 0x7a, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, + 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x47, 0x45, 0x77, 0x4a, 0x42, 0x56, 0x54, 0x45, 0x54, 0x0a, 0x4d, 0x42, 0x45, - 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x41, 0x77, 0x4b, 0x55, 0x32, 0x39, + 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x42, 0x4d, 0x4b, 0x55, 0x32, 0x39, 0x74, 0x5a, 0x53, 0x31, 0x54, 0x64, 0x47, 0x46, 0x30, 0x5a, 0x54, 0x45, - 0x68, 0x4d, 0x42, 0x38, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x67, 0x77, + 0x68, 0x4d, 0x42, 0x38, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x68, 0x4d, 0x59, 0x53, 0x57, 0x35, 0x30, 0x5a, 0x58, 0x4a, 0x75, 0x5a, 0x58, 0x51, 0x67, 0x56, 0x32, 0x6c, 0x6b, 0x5a, 0x32, 0x6c, 0x30, 0x63, 0x79, 0x42, 0x51, 0x0a, 0x64, 0x48, 0x6b, 0x67, 0x54, 0x48, 0x52, 0x6b, 0x4d, 0x51, - 0x38, 0x77, 0x44, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, + 0x38, 0x77, 0x44, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x45, 0x77, 0x5a, 0x30, 0x5a, 0x58, 0x4e, 0x30, 0x59, 0x32, 0x45, 0x77, 0x48, 0x68, - 0x63, 0x4e, 0x4d, 0x54, 0x51, 0x77, 0x4e, 0x7a, 0x49, 0x79, 0x4d, 0x44, - 0x59, 0x77, 0x4d, 0x44, 0x55, 0x33, 0x57, 0x68, 0x63, 0x4e, 0x4d, 0x6a, - 0x51, 0x77, 0x4e, 0x7a, 0x45, 0x35, 0x0a, 0x4d, 0x44, 0x59, 0x77, 0x4d, - 0x44, 0x55, 0x33, 0x57, 0x6a, 0x42, 0x6b, 0x4d, 0x51, 0x73, 0x77, 0x43, + 0x63, 0x4e, 0x4d, 0x54, 0x55, 0x78, 0x4d, 0x54, 0x41, 0x30, 0x4d, 0x44, + 0x49, 0x79, 0x4d, 0x44, 0x49, 0x30, 0x57, 0x68, 0x63, 0x4e, 0x4d, 0x6a, + 0x55, 0x78, 0x4d, 0x54, 0x41, 0x78, 0x0a, 0x4d, 0x44, 0x49, 0x79, 0x4d, + 0x44, 0x49, 0x30, 0x57, 0x6a, 0x42, 0x6c, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x47, 0x45, 0x77, 0x4a, 0x56, 0x55, 0x7a, 0x45, 0x52, 0x4d, 0x41, 0x38, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x42, 0x4d, 0x49, 0x53, 0x57, 0x78, 0x73, 0x61, 0x57, 0x35, 0x76, 0x61, 0x58, 0x4d, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x0a, 0x42, 0x41, 0x63, 0x54, 0x42, 0x30, 0x4e, 0x6f, 0x61, 0x57, 0x4e, 0x68, - 0x5a, 0x32, 0x38, 0x78, 0x46, 0x44, 0x41, 0x53, 0x42, 0x67, 0x4e, 0x56, - 0x42, 0x41, 0x6f, 0x54, 0x43, 0x30, 0x64, 0x76, 0x62, 0x32, 0x64, 0x73, - 0x5a, 0x53, 0x42, 0x4a, 0x62, 0x6d, 0x4d, 0x75, 0x4d, 0x52, 0x6f, 0x77, - 0x47, 0x41, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x46, 0x42, 0x45, 0x71, - 0x4c, 0x6e, 0x52, 0x6c, 0x0a, 0x63, 0x33, 0x51, 0x75, 0x5a, 0x32, 0x39, - 0x76, 0x5a, 0x32, 0x78, 0x6c, 0x4c, 0x6d, 0x4e, 0x76, 0x62, 0x54, 0x43, - 0x42, 0x6e, 0x7a, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, - 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x4f, - 0x42, 0x6a, 0x51, 0x41, 0x77, 0x67, 0x59, 0x6b, 0x43, 0x67, 0x59, 0x45, - 0x41, 0x34, 0x63, 0x4d, 0x56, 0x4a, 0x79, 0x67, 0x73, 0x0a, 0x4a, 0x55, - 0x6d, 0x6c, 0x67, 0x4d, 0x4d, 0x7a, 0x67, 0x64, 0x69, 0x30, 0x68, 0x31, - 0x58, 0x6f, 0x43, 0x52, 0x37, 0x2b, 0x77, 0x77, 0x31, 0x70, 0x6f, 0x70, - 0x30, 0x34, 0x4f, 0x4d, 0x4d, 0x79, 0x79, 0x37, 0x48, 0x2f, 0x69, 0x30, - 0x50, 0x4a, 0x32, 0x57, 0x36, 0x59, 0x33, 0x35, 0x2b, 0x62, 0x34, 0x43, - 0x4d, 0x38, 0x51, 0x72, 0x6b, 0x59, 0x65, 0x45, 0x61, 0x66, 0x55, 0x47, - 0x44, 0x4f, 0x0a, 0x52, 0x59, 0x58, 0x36, 0x79, 0x56, 0x2f, 0x63, 0x48, - 0x47, 0x47, 0x73, 0x44, 0x2f, 0x78, 0x30, 0x32, 0x79, 0x65, 0x36, 0x65, - 0x79, 0x31, 0x55, 0x44, 0x74, 0x6b, 0x47, 0x41, 0x44, 0x2f, 0x6d, 0x70, - 0x44, 0x45, 0x78, 0x38, 0x59, 0x43, 0x72, 0x6a, 0x41, 0x63, 0x31, 0x56, - 0x66, 0x76, 0x74, 0x38, 0x46, 0x6b, 0x36, 0x43, 0x6e, 0x31, 0x57, 0x56, - 0x49, 0x78, 0x56, 0x2f, 0x4a, 0x33, 0x30, 0x0a, 0x33, 0x78, 0x6a, 0x42, - 0x73, 0x46, 0x67, 0x42, 0x79, 0x51, 0x35, 0x35, 0x52, 0x42, 0x70, 0x31, - 0x4f, 0x4c, 0x5a, 0x66, 0x56, 0x4c, 0x6f, 0x36, 0x41, 0x6c, 0x65, 0x42, - 0x44, 0x53, 0x62, 0x63, 0x78, 0x61, 0x45, 0x43, 0x41, 0x77, 0x45, 0x41, - 0x41, 0x61, 0x4e, 0x72, 0x4d, 0x47, 0x6b, 0x77, 0x43, 0x51, 0x59, 0x44, - 0x56, 0x52, 0x30, 0x54, 0x42, 0x41, 0x49, 0x77, 0x41, 0x44, 0x41, 0x4c, - 0x0a, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, - 0x43, 0x42, 0x65, 0x41, 0x77, 0x54, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, - 0x52, 0x42, 0x45, 0x67, 0x77, 0x52, 0x6f, 0x49, 0x51, 0x4b, 0x69, 0x35, - 0x30, 0x5a, 0x58, 0x4e, 0x30, 0x4c, 0x6d, 0x64, 0x76, 0x62, 0x32, 0x64, - 0x73, 0x5a, 0x53, 0x35, 0x6d, 0x63, 0x6f, 0x49, 0x59, 0x64, 0x32, 0x46, - 0x30, 0x5a, 0x58, 0x4a, 0x36, 0x0a, 0x62, 0x32, 0x39, 0x70, 0x4c, 0x6e, - 0x52, 0x6c, 0x63, 0x33, 0x51, 0x75, 0x5a, 0x32, 0x39, 0x76, 0x5a, 0x32, - 0x78, 0x6c, 0x4c, 0x6d, 0x4a, 0x6c, 0x67, 0x68, 0x49, 0x71, 0x4c, 0x6e, - 0x52, 0x6c, 0x63, 0x33, 0x51, 0x75, 0x65, 0x57, 0x39, 0x31, 0x64, 0x48, - 0x56, 0x69, 0x5a, 0x53, 0x35, 0x6a, 0x62, 0x32, 0x32, 0x48, 0x42, 0x4d, - 0x43, 0x6f, 0x41, 0x51, 0x4d, 0x77, 0x44, 0x51, 0x59, 0x4a, 0x0a, 0x4b, - 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51, 0x45, 0x46, 0x42, - 0x51, 0x41, 0x44, 0x67, 0x59, 0x45, 0x41, 0x4d, 0x32, 0x49, 0x69, 0x30, - 0x4c, 0x67, 0x54, 0x47, 0x62, 0x4a, 0x31, 0x6a, 0x34, 0x6f, 0x71, 0x58, - 0x39, 0x62, 0x78, 0x56, 0x63, 0x78, 0x6d, 0x2b, 0x2f, 0x52, 0x35, 0x59, - 0x66, 0x38, 0x6f, 0x69, 0x30, 0x61, 0x5a, 0x71, 0x54, 0x4a, 0x6c, 0x6e, - 0x4c, 0x59, 0x53, 0x0a, 0x77, 0x58, 0x63, 0x42, 0x79, 0x6b, 0x78, 0x54, - 0x78, 0x31, 0x38, 0x31, 0x73, 0x37, 0x57, 0x79, 0x66, 0x4a, 0x34, 0x39, - 0x57, 0x77, 0x72, 0x59, 0x58, 0x6f, 0x37, 0x38, 0x7a, 0x54, 0x44, 0x41, - 0x6e, 0x66, 0x31, 0x6d, 0x61, 0x30, 0x66, 0x50, 0x71, 0x33, 0x65, 0x34, - 0x6d, 0x70, 0x73, 0x70, 0x76, 0x79, 0x6e, 0x64, 0x4c, 0x68, 0x31, 0x61, - 0x2b, 0x4f, 0x61, 0x72, 0x48, 0x61, 0x31, 0x65, 0x0a, 0x61, 0x54, 0x30, - 0x44, 0x49, 0x49, 0x59, 0x6b, 0x37, 0x71, 0x65, 0x45, 0x61, 0x31, 0x59, - 0x63, 0x56, 0x6c, 0x6a, 0x78, 0x32, 0x4b, 0x79, 0x4c, 0x64, 0x30, 0x72, - 0x31, 0x42, 0x42, 0x41, 0x66, 0x72, 0x77, 0x79, 0x47, 0x61, 0x45, 0x50, - 0x56, 0x65, 0x4a, 0x51, 0x56, 0x59, 0x57, 0x61, 0x4f, 0x4a, 0x52, 0x55, - 0x32, 0x77, 0x65, 0x2f, 0x4b, 0x44, 0x34, 0x6f, 0x6a, 0x66, 0x39, 0x73, - 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, + 0x5a, 0x32, 0x38, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, + 0x42, 0x41, 0x6f, 0x54, 0x44, 0x45, 0x56, 0x34, 0x59, 0x57, 0x31, 0x77, + 0x62, 0x47, 0x55, 0x73, 0x49, 0x45, 0x4e, 0x76, 0x4c, 0x6a, 0x45, 0x61, + 0x4d, 0x42, 0x67, 0x47, 0x41, 0x31, 0x55, 0x45, 0x41, 0x78, 0x51, 0x52, + 0x4b, 0x69, 0x35, 0x30, 0x0a, 0x5a, 0x58, 0x4e, 0x30, 0x4c, 0x6d, 0x64, + 0x76, 0x62, 0x32, 0x64, 0x73, 0x5a, 0x53, 0x35, 0x6a, 0x62, 0x32, 0x30, + 0x77, 0x67, 0x5a, 0x38, 0x77, 0x44, 0x51, 0x59, 0x4a, 0x4b, 0x6f, 0x5a, + 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51, 0x45, 0x42, 0x42, 0x51, 0x41, + 0x44, 0x67, 0x59, 0x30, 0x41, 0x4d, 0x49, 0x47, 0x4a, 0x41, 0x6f, 0x47, + 0x42, 0x41, 0x4f, 0x48, 0x44, 0x46, 0x53, 0x63, 0x6f, 0x0a, 0x4c, 0x43, + 0x56, 0x4a, 0x70, 0x59, 0x44, 0x44, 0x4d, 0x34, 0x48, 0x59, 0x74, 0x49, + 0x64, 0x56, 0x36, 0x41, 0x6b, 0x65, 0x2f, 0x73, 0x4d, 0x4e, 0x61, 0x61, + 0x4b, 0x64, 0x4f, 0x44, 0x6a, 0x44, 0x4d, 0x73, 0x75, 0x78, 0x2f, 0x34, + 0x74, 0x44, 0x79, 0x64, 0x6c, 0x75, 0x6d, 0x4e, 0x2b, 0x66, 0x6d, 0x2b, + 0x41, 0x6a, 0x50, 0x45, 0x4b, 0x35, 0x47, 0x48, 0x68, 0x47, 0x6e, 0x31, + 0x42, 0x67, 0x0a, 0x7a, 0x6b, 0x57, 0x46, 0x2b, 0x73, 0x6c, 0x66, 0x33, + 0x42, 0x78, 0x68, 0x72, 0x41, 0x2f, 0x38, 0x64, 0x4e, 0x73, 0x6e, 0x75, + 0x6e, 0x73, 0x74, 0x56, 0x41, 0x37, 0x5a, 0x42, 0x67, 0x41, 0x2f, 0x35, + 0x71, 0x51, 0x78, 0x4d, 0x66, 0x47, 0x41, 0x71, 0x34, 0x77, 0x48, 0x4e, + 0x56, 0x58, 0x37, 0x37, 0x66, 0x42, 0x5a, 0x4f, 0x67, 0x70, 0x39, 0x56, + 0x6c, 0x53, 0x4d, 0x56, 0x66, 0x79, 0x64, 0x0a, 0x39, 0x4e, 0x38, 0x59, + 0x77, 0x62, 0x42, 0x59, 0x41, 0x63, 0x6b, 0x4f, 0x65, 0x55, 0x51, 0x61, + 0x64, 0x54, 0x69, 0x32, 0x58, 0x31, 0x53, 0x36, 0x4f, 0x67, 0x4a, 0x58, + 0x67, 0x51, 0x30, 0x6d, 0x33, 0x4d, 0x57, 0x68, 0x41, 0x67, 0x4d, 0x42, + 0x41, 0x41, 0x47, 0x6a, 0x61, 0x7a, 0x42, 0x70, 0x4d, 0x41, 0x6b, 0x47, + 0x41, 0x31, 0x55, 0x64, 0x45, 0x77, 0x51, 0x43, 0x4d, 0x41, 0x41, 0x77, + 0x0a, 0x43, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x50, 0x42, 0x41, 0x51, + 0x44, 0x41, 0x67, 0x58, 0x67, 0x4d, 0x45, 0x38, 0x47, 0x41, 0x31, 0x55, + 0x64, 0x45, 0x51, 0x52, 0x49, 0x4d, 0x45, 0x61, 0x43, 0x45, 0x43, 0x6f, + 0x75, 0x64, 0x47, 0x56, 0x7a, 0x64, 0x43, 0x35, 0x6e, 0x62, 0x32, 0x39, + 0x6e, 0x62, 0x47, 0x55, 0x75, 0x5a, 0x6e, 0x4b, 0x43, 0x47, 0x48, 0x64, + 0x68, 0x64, 0x47, 0x56, 0x79, 0x0a, 0x65, 0x6d, 0x39, 0x76, 0x61, 0x53, + 0x35, 0x30, 0x5a, 0x58, 0x4e, 0x30, 0x4c, 0x6d, 0x64, 0x76, 0x62, 0x32, + 0x64, 0x73, 0x5a, 0x53, 0x35, 0x69, 0x5a, 0x59, 0x49, 0x53, 0x4b, 0x69, + 0x35, 0x30, 0x5a, 0x58, 0x4e, 0x30, 0x4c, 0x6e, 0x6c, 0x76, 0x64, 0x58, + 0x52, 0x31, 0x59, 0x6d, 0x55, 0x75, 0x59, 0x32, 0x39, 0x74, 0x68, 0x77, + 0x54, 0x41, 0x71, 0x41, 0x45, 0x44, 0x4d, 0x41, 0x30, 0x47, 0x0a, 0x43, + 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x43, + 0x77, 0x55, 0x41, 0x41, 0x34, 0x47, 0x42, 0x41, 0x4a, 0x46, 0x58, 0x56, + 0x69, 0x66, 0x51, 0x4e, 0x75, 0x62, 0x31, 0x4c, 0x55, 0x50, 0x34, 0x4a, + 0x6c, 0x6e, 0x58, 0x35, 0x6c, 0x58, 0x4e, 0x6c, 0x6f, 0x38, 0x46, 0x78, + 0x5a, 0x32, 0x61, 0x31, 0x32, 0x41, 0x46, 0x51, 0x73, 0x2b, 0x62, 0x7a, + 0x6f, 0x4a, 0x36, 0x0a, 0x68, 0x4d, 0x30, 0x34, 0x34, 0x45, 0x44, 0x6a, + 0x71, 0x79, 0x78, 0x55, 0x71, 0x53, 0x62, 0x56, 0x65, 0x50, 0x4b, 0x30, + 0x6e, 0x69, 0x33, 0x77, 0x31, 0x66, 0x48, 0x51, 0x42, 0x35, 0x72, 0x59, + 0x39, 0x79, 0x59, 0x43, 0x35, 0x66, 0x38, 0x47, 0x37, 0x61, 0x71, 0x71, + 0x54, 0x59, 0x31, 0x51, 0x4f, 0x68, 0x6f, 0x55, 0x6b, 0x38, 0x5a, 0x54, + 0x53, 0x54, 0x52, 0x70, 0x6e, 0x6b, 0x54, 0x68, 0x0a, 0x79, 0x34, 0x6a, + 0x6a, 0x64, 0x76, 0x54, 0x5a, 0x65, 0x4c, 0x44, 0x56, 0x42, 0x6c, 0x75, + 0x65, 0x5a, 0x55, 0x54, 0x44, 0x52, 0x6d, 0x79, 0x32, 0x66, 0x65, 0x59, + 0x35, 0x61, 0x5a, 0x49, 0x55, 0x31, 0x38, 0x76, 0x46, 0x44, 0x4b, 0x30, + 0x38, 0x64, 0x54, 0x47, 0x30, 0x41, 0x38, 0x37, 0x70, 0x70, 0x70, 0x75, + 0x76, 0x31, 0x4c, 0x4e, 0x49, 0x52, 0x33, 0x6c, 0x6f, 0x76, 0x65, 0x55, + 0x38, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, - 0x2d, 0x2d, 0x2d, 0x0a, 0x00}; + 0x2d, 0x2d, 0x2d, 0x0a}; -- cgit v1.2.3 From 027a74cd3b3ce350ba5890d0fd8f6399a200227f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 08:37:46 +0000 Subject: First round changes to handle dynamic hpack table size --- include/grpc/grpc.h | 5 + src/core/transport/chttp2/hpack_encoder.c | 92 +++- src/core/transport/chttp2/hpack_encoder.h | 22 +- src/core/transport/chttp2/hpack_parser.c | 67 +-- src/core/transport/chttp2/hpack_table.c | 95 +++- src/core/transport/chttp2/hpack_table.h | 29 +- src/core/transport/chttp2/internal.h | 6 +- src/core/transport/chttp2/parsing.c | 3 + src/core/transport/chttp2/writing.c | 8 +- src/core/transport/chttp2_transport.c | 23 +- test/core/end2end/gen_build_yaml.py | 1 + test/core/end2end/tests/hpack_size.c | 467 +++++++++++++++++ tools/run_tests/sources_and_headers.json | 384 ++++++++++++++ tools/run_tests/tests.json | 407 +++++++++++++++ vsprojects/buildtests_c.sln | 560 +++++++++++++++++++++ .../end2end_test_hpack_size.vcxproj | 167 ++++++ .../end2end_test_hpack_size.vcxproj.filters | 32 ++ .../h2_compress_hpack_size_nosec_test.vcxproj | 190 +++++++ ..._compress_hpack_size_nosec_test.vcxproj.filters | 7 + .../h2_compress_hpack_size_test.vcxproj | 193 +++++++ .../h2_compress_hpack_size_test.vcxproj.filters | 7 + .../h2_fakesec_hpack_size_test.vcxproj | 193 +++++++ .../h2_fakesec_hpack_size_test.vcxproj.filters | 7 + .../h2_full_hpack_size_nosec_test.vcxproj | 190 +++++++ .../h2_full_hpack_size_nosec_test.vcxproj.filters | 7 + .../h2_full_hpack_size_test.vcxproj | 193 +++++++ .../h2_full_hpack_size_test.vcxproj.filters | 7 + .../h2_oauth2_hpack_size_test.vcxproj | 193 +++++++ .../h2_oauth2_hpack_size_test.vcxproj.filters | 7 + .../h2_proxy_hpack_size_nosec_test.vcxproj | 190 +++++++ .../h2_proxy_hpack_size_nosec_test.vcxproj.filters | 7 + .../h2_proxy_hpack_size_test.vcxproj | 193 +++++++ .../h2_proxy_hpack_size_test.vcxproj.filters | 7 + ...h2_sockpair+trace_hpack_size_nosec_test.vcxproj | 190 +++++++ ...air+trace_hpack_size_nosec_test.vcxproj.filters | 7 + .../h2_sockpair+trace_hpack_size_test.vcxproj | 193 +++++++ ..._sockpair+trace_hpack_size_test.vcxproj.filters | 7 + ...h2_sockpair_1byte_hpack_size_nosec_test.vcxproj | 190 +++++++ ...air_1byte_hpack_size_nosec_test.vcxproj.filters | 7 + .../h2_sockpair_1byte_hpack_size_test.vcxproj | 193 +++++++ ..._sockpair_1byte_hpack_size_test.vcxproj.filters | 7 + .../h2_sockpair_hpack_size_nosec_test.vcxproj | 190 +++++++ ..._sockpair_hpack_size_nosec_test.vcxproj.filters | 7 + .../h2_sockpair_hpack_size_test.vcxproj | 193 +++++++ .../h2_sockpair_hpack_size_test.vcxproj.filters | 7 + .../h2_ssl_hpack_size_test.vcxproj | 193 +++++++ .../h2_ssl_hpack_size_test.vcxproj.filters | 7 + .../h2_ssl_proxy_hpack_size_test.vcxproj | 193 +++++++ .../h2_ssl_proxy_hpack_size_test.vcxproj.filters | 7 + .../h2_uchannel_hpack_size_nosec_test.vcxproj | 190 +++++++ ..._uchannel_hpack_size_nosec_test.vcxproj.filters | 7 + .../h2_uchannel_hpack_size_test.vcxproj | 193 +++++++ .../h2_uchannel_hpack_size_test.vcxproj.filters | 7 + 53 files changed, 5871 insertions(+), 76 deletions(-) create mode 100644 test/core/end2end/tests/hpack_size.c create mode 100644 vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj create mode 100644 vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj create mode 100644 vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj.filters (limited to 'src/core') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 191ad5db1e..a8abd1ad1b 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -127,6 +127,11 @@ typedef struct { /** Initial sequence number for http2 transports */ #define GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER \ "grpc.http2.initial_sequence_number" +/** How much memory to use for hpack decoding */ +#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER \ + "grpc.http2.hpack_table_size.decoder" +#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \ + "grpc.http2.hpack_table_size.encoder" /** Default authority to pass if none specified on call construction */ #define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority" /** Primary user agent: goes at the start of the user-agent metadata diff --git a/src/core/transport/chttp2/hpack_encoder.c b/src/core/transport/chttp2/hpack_encoder.c index 6c7c00b7c3..7ec5a4fb2d 100644 --- a/src/core/transport/chttp2/hpack_encoder.c +++ b/src/core/transport/chttp2/hpack_encoder.c @@ -36,8 +36,10 @@ #include #include +#include #include #include + #include "src/core/transport/chttp2/bin_encoder.h" #include "src/core/transport/chttp2/hpack_table.h" #include "src/core/transport/chttp2/timeout_encoding.h" @@ -154,6 +156,20 @@ static gpr_uint8 *add_tiny_header_data(framer_state *st, size_t len) { return gpr_slice_buffer_tiny_add(st->output, len); } +static void evict_entry(grpc_chttp2_hpack_compressor *c) { + c->tail_remote_index++; + GPR_ASSERT(c->tail_remote_index > 0); + GPR_ASSERT(c->table_size >= + c->table_elem_size[c->tail_remote_index % + c->cap_table_elems]); + GPR_ASSERT(c->table_elems > 0); + c->table_size = + (gpr_uint16)(c->table_size - + c->table_elem_size[c->tail_remote_index % + c->cap_table_elems]); + c->table_elems--; +} + /* add an element to the decoder table */ static void add_elem(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem) { gpr_uint32 key_hash = elem->key->hash; @@ -164,25 +180,21 @@ static void add_elem(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem) { GPR_ASSERT(elem_size < 65536); + if (elem_size > c->max_table_size) { + while (c->table_size > 0) { + evict_entry(c); + } + return; + } + /* Reserve space for this element in the remote table: if this overflows the current table, drop elements until it fits, matching the decompressor algorithm */ - /* TODO(ctiller): constant */ - while (c->table_size + elem_size > 4096) { - c->tail_remote_index++; - GPR_ASSERT(c->tail_remote_index > 0); - GPR_ASSERT(c->table_size >= - c->table_elem_size[c->tail_remote_index % - GRPC_CHTTP2_HPACKC_MAX_TABLE_ELEMS]); - GPR_ASSERT(c->table_elems > 0); - c->table_size = - (gpr_uint16)(c->table_size - - c->table_elem_size[c->tail_remote_index % - GRPC_CHTTP2_HPACKC_MAX_TABLE_ELEMS]); - c->table_elems--; + while (c->table_size + elem_size > c->max_table_size) { + evict_entry(c); } - GPR_ASSERT(c->table_elems < GRPC_CHTTP2_HPACKC_MAX_TABLE_ELEMS); - c->table_elem_size[new_index % GRPC_CHTTP2_HPACKC_MAX_TABLE_ELEMS] = + GPR_ASSERT(c->table_elems < c->max_table_size); + c->table_elem_size[new_index % c->cap_table_elems] = (gpr_uint16)elem_size; c->table_size = (gpr_uint16)(c->table_size + elem_size); c->table_elems++; @@ -329,6 +341,12 @@ static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, add_header_data(st, gpr_slice_ref(value_slice)); } +static void emit_advertise_table_size_change(grpc_chttp2_hpack_compressor *c, framer_state *st) { + gpr_uint32 len = GRPC_CHTTP2_VARINT_LENGTH(c->max_table_size, 3); + GRPC_CHTTP2_WRITE_VARINT(c->max_table_size, 3, 0x20, add_tiny_header_data(st, len), len); + c->advertise_table_size_change = 0; +} + static gpr_uint32 dynidx(grpc_chttp2_hpack_compressor *c, gpr_uint32 elem_index) { return 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY + c->tail_remote_index + @@ -447,11 +465,20 @@ gpr_slice grpc_chttp2_data_frame_create_empty_close(gpr_uint32 id) { return slice; } +static gpr_uint32 elems_for_bytes(gpr_uint32 bytes) { + return (bytes + 31) / 32; +} + void grpc_chttp2_hpack_compressor_init(grpc_chttp2_hpack_compressor *c, grpc_mdctx *ctx) { memset(c, 0, sizeof(*c)); c->mdctx = ctx; c->timeout_key_str = grpc_mdstr_from_string(ctx, "grpc-timeout"); + c->max_table_size = GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE; + c->cap_table_elems = c->max_table_elems = elems_for_bytes(c->max_table_size); + c->max_usable_size = GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE; + c->table_elem_size = gpr_malloc(sizeof(*c->table_elem_size) * c->cap_table_elems); + memset(c->table_elem_size, 0, sizeof(*c->table_elem_size) * c->cap_table_elems); } void grpc_chttp2_hpack_compressor_destroy(grpc_chttp2_hpack_compressor *c) { @@ -461,6 +488,38 @@ void grpc_chttp2_hpack_compressor_destroy(grpc_chttp2_hpack_compressor *c) { if (c->entries_elems[i]) GRPC_MDELEM_UNREF(c->entries_elems[i]); } GRPC_MDSTR_UNREF(c->timeout_key_str); + gpr_free(c->table_elem_size); +} + +void grpc_chttp2_hpack_compressor_set_max_usable_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size) { + c->max_usable_size = max_table_size; + grpc_chttp2_hpack_compressor_set_max_table_size(c, GPR_MIN(c->max_table_size, max_table_size)); +} + +static void rebuild_elems(grpc_chttp2_hpack_compressor *c, gpr_uint32 new_cap) { + +} + +void grpc_chttp2_hpack_compressor_set_max_table_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size) { + max_table_size = GPR_MIN(max_table_size, c->max_usable_size); + if (max_table_size == c->max_table_size) { + return; + } + while (c->table_size > 0 && c->table_size > max_table_size) { + evict_entry(c); + } + c->max_table_size = max_table_size; + c->max_table_elems = elems_for_bytes(max_table_size); + if (c->max_table_elems > c->cap_table_elems) { + rebuild_elems(c, GPR_MAX(c->max_table_elems, 2 * c->cap_table_elems)); + } else if (c->max_table_elems < c->cap_table_elems / 3) { + gpr_uint32 new_cap = GPR_MIN(c->max_table_elems, 16); + if (new_cap != c->cap_table_elems) { + rebuild_elems(c, new_cap); + } + } + c->advertise_table_size_change = 1; + gpr_log(GPR_DEBUG, "set max table size from encoder to %d", max_table_size); } void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, @@ -483,6 +542,9 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, slot. THIS MAY NOT BE THE SAME ELEMENT (if a decoder table slot got updated). After this loop, we'll do a batch unref of elements. */ begin_frame(&st); + if (c->advertise_table_size_change != 0) { + emit_advertise_table_size_change(c, &st); + } grpc_metadata_batch_assert_ok(metadata); for (l = metadata->list.head; l; l = l->next) { hpack_enc(c, l->md, &st); diff --git a/src/core/transport/chttp2/hpack_encoder.h b/src/core/transport/chttp2/hpack_encoder.h index 59b122dfda..ff32b08d60 100644 --- a/src/core/transport/chttp2/hpack_encoder.h +++ b/src/core/transport/chttp2/hpack_encoder.h @@ -43,14 +43,26 @@ #define GRPC_CHTTP2_HPACKC_NUM_FILTERS 256 #define GRPC_CHTTP2_HPACKC_NUM_VALUES 256 -#define GRPC_CHTTP2_HPACKC_MAX_TABLE_ELEMS (4096 / 32) +/* initial table size, per spec */ +#define GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE 4096 +/* maximum table size we'll actually use */ +#define GRPC_CHTTP2_HPACKC_MAX_TABLE_SIZE (1024*1024) typedef struct { gpr_uint32 filter_elems_sum; + gpr_uint32 max_table_size; + gpr_uint32 max_table_elems; + gpr_uint32 cap_table_elems; + /** if non-zero, advertise to the decoder that we'll start using a table + of this size */ + gpr_uint8 advertise_table_size_change; + /** maximum number of bytes we'll use for the decode table (to guard against + peers ooming us by setting decode table size high) */ + gpr_uint32 max_usable_size; /* one before the lowest usable table index */ gpr_uint32 tail_remote_index; - gpr_uint16 table_size; - gpr_uint16 table_elems; + gpr_uint32 table_size; + gpr_uint32 table_elems; /* filter tables for elems: this tables provides an approximate popularity count for particular hashes, and are used to determine whether @@ -71,12 +83,14 @@ typedef struct { gpr_uint32 indices_keys[GRPC_CHTTP2_HPACKC_NUM_VALUES]; gpr_uint32 indices_elems[GRPC_CHTTP2_HPACKC_NUM_VALUES]; - gpr_uint16 table_elem_size[GRPC_CHTTP2_HPACKC_MAX_TABLE_ELEMS]; + gpr_uint16 *table_elem_size; } grpc_chttp2_hpack_compressor; void grpc_chttp2_hpack_compressor_init(grpc_chttp2_hpack_compressor *c, grpc_mdctx *mdctx); void grpc_chttp2_hpack_compressor_destroy(grpc_chttp2_hpack_compressor *c); +void grpc_chttp2_hpack_compressor_set_max_table_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size); +void grpc_chttp2_hpack_compressor_set_max_usable_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size); void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, gpr_uint32 id, grpc_metadata_batch *metadata, int is_eof, diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index ccfaece936..6d3c340a8a 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -74,6 +74,8 @@ static int parse_begin(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end); static int parse_error(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end); +static int parse_illegal_op(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, + const gpr_uint8 *end); static int parse_string_prefix(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end); @@ -156,7 +158,7 @@ static const grpc_chttp2_hpack_parser_state first_byte_action[] = { parse_lithdr_incidx_x, parse_lithdr_incidx_v, parse_lithdr_notidx, parse_lithdr_notidx_x, parse_lithdr_notidx_v, parse_lithdr_nvridx, parse_lithdr_nvridx_x, parse_lithdr_nvridx_v, parse_max_tbl_size, - parse_max_tbl_size_x, parse_error}; + parse_max_tbl_size_x, parse_illegal_op}; /* indexes the first byte to a parse state function - generated by gen_hpack_tables.c */ @@ -169,7 +171,7 @@ static const gpr_uint8 first_byte_lut[256] = { LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX, LITHDR_NVRIDX_X, - ILLEGAL, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, + MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, MAX_TBL_SIZE, @@ -622,13 +624,16 @@ static const gpr_uint8 inverse_base64[256] = { }; /* emission helpers */ -static void on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, +static int on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, int add_to_table) { if (add_to_table) { GRPC_MDELEM_REF(md); - grpc_chttp2_hptbl_add(&p->table, md); + if (!grpc_chttp2_hptbl_add(&p->table, md)) { + return 0; + } } p->on_header(p->on_header_user_data, md); + return 1; } static grpc_mdstr *take_string(grpc_chttp2_hpack_parser *p, @@ -714,9 +719,12 @@ static int parse_stream_dep0(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, static int finish_indexed_field(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); + if (md == NULL) { + gpr_log(GPR_ERROR, "Invalid HPACK index received: %d", p->index); + return 0; + } GRPC_MDELEM_REF(md); - on_hdr(p, md, 0); - return parse_begin(p, cur, end); + return on_hdr(p, md, 0) && parse_begin(p, cur, end); } /* parse an indexed field with index < 127 */ @@ -742,21 +750,20 @@ static int parse_indexed_field_x(grpc_chttp2_hpack_parser *p, static int finish_lithdr_incidx(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); - on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, + return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, GRPC_MDSTR_REF(md->key), take_string(p, &p->value)), - 1); - return parse_begin(p, cur, end); + 1) && parse_begin(p, cur, end); } /* finish a literal header with incremental indexing with no index */ static int finish_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { - on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, + return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, take_string(p, &p->key), take_string(p, &p->value)), - 1); - return parse_begin(p, cur, end); + 1) && + parse_begin(p, cur, end); } /* parse a literal header with incremental indexing; index < 63 */ @@ -795,21 +802,20 @@ static int parse_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, static int finish_lithdr_notidx(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); - on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, + return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, GRPC_MDSTR_REF(md->key), take_string(p, &p->value)), - 0); - return parse_begin(p, cur, end); + 0) && + parse_begin(p, cur, end); } /* finish a literal header without incremental indexing with index = 0 */ static int finish_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { - on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, + return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, take_string(p, &p->key), take_string(p, &p->value)), - 0); - return parse_begin(p, cur, end); + 0) && parse_begin(p, cur, end); } /* parse a literal header without incremental indexing; index < 15 */ @@ -848,21 +854,21 @@ static int parse_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, static int finish_lithdr_nvridx(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); - on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, + return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, GRPC_MDSTR_REF(md->key), take_string(p, &p->value)), - 0); - return parse_begin(p, cur, end); + 0) && + parse_begin(p, cur, end); } /* finish a literal header that is never indexed with an extra value */ static int finish_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { - on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, + return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, take_string(p, &p->key), take_string(p, &p->value)), - 0); - return parse_begin(p, cur, end); + 0) && + parse_begin(p, cur, end); } /* parse a literal header that is never indexed; index < 15 */ @@ -901,14 +907,13 @@ static int parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, static int finish_max_tbl_size(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { gpr_log(GPR_INFO, "MAX TABLE SIZE: %d", p->index); - /* not implemented */ - return 0; + return grpc_chttp2_hptbl_set_current_table_size(&p->table, p->index) && parse_begin(p, cur, end); } /* parse a max table size change, max size < 15 */ static int parse_max_tbl_size(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { - p->index = (*cur) & 0xf; + p->index = (*cur) & 0x1f; return finish_max_tbl_size(p, cur + 1, end); } @@ -918,7 +923,7 @@ static int parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, static const grpc_chttp2_hpack_parser_state and_then[] = { finish_max_tbl_size}; p->next_state = and_then; - p->index = 0xf; + p->index = 0x1f; p->parsing.value = &p->index; return parse_value0(p, cur + 1, end); } @@ -930,6 +935,12 @@ static int parse_error(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, return 0; } +static int parse_illegal_op(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { + GPR_ASSERT(cur != end); + gpr_log(GPR_DEBUG, "Illegal hpack op code %d", *cur); + return parse_error(p, cur, end); +} + /* parse the 1st byte of a varint into p->parsing.value no overflow is possible */ static int parse_value0(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index c442c2c341..fde74b3acd 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -36,7 +36,9 @@ #include #include +#include #include + #include "src/core/support/murmur_hash.h" static struct { @@ -169,12 +171,19 @@ static struct { {"www-authenticate", ""}, }; +static gpr_uint32 entries_for_bytes(gpr_uint32 bytes) { + return (bytes + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD - 1) / GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; +} + void grpc_chttp2_hptbl_init(grpc_chttp2_hptbl *tbl, grpc_mdctx *mdctx) { size_t i; memset(tbl, 0, sizeof(*tbl)); tbl->mdctx = mdctx; - tbl->max_bytes = GRPC_CHTTP2_INITIAL_HPACK_TABLE_SIZE; + tbl->current_table_bytes = tbl->max_bytes = GRPC_CHTTP2_INITIAL_HPACK_TABLE_SIZE; + tbl->max_entries = tbl->cap_entries = entries_for_bytes(tbl->current_table_bytes); + tbl->ents = gpr_malloc(sizeof(*tbl->ents) * tbl->cap_entries); + memset(tbl->ents, 0, sizeof(*tbl->ents) * tbl->cap_entries); for (i = 1; i <= GRPC_CHTTP2_LAST_STATIC_ENTRY; i++) { tbl->static_ents[i - 1] = grpc_mdelem_from_strings( mdctx, static_table[i].key, static_table[i].value); @@ -188,7 +197,7 @@ void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl *tbl) { } for (i = 0; i < tbl->num_ents; i++) { GRPC_MDELEM_UNREF( - tbl->ents[(tbl->first_ent + i) % GRPC_CHTTP2_MAX_TABLE_COUNT]); + tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]); } } @@ -202,7 +211,7 @@ grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, tbl_index -= (GRPC_CHTTP2_LAST_STATIC_ENTRY + 1); if (tbl_index < tbl->num_ents) { gpr_uint32 offset = (tbl->num_ents - 1u - tbl_index + tbl->first_ent) % - GRPC_CHTTP2_MAX_TABLE_COUNT; + tbl->cap_entries; return tbl->ents[offset]; } /* Invalid entry: return error */ @@ -216,21 +225,74 @@ static void evict1(grpc_chttp2_hptbl *tbl) { GPR_SLICE_LENGTH(first_ent->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; GPR_ASSERT(elem_bytes <= tbl->mem_used); - tbl->mem_used = (gpr_uint16)(tbl->mem_used - elem_bytes); + tbl->mem_used -= elem_bytes; tbl->first_ent = - (gpr_uint16)((tbl->first_ent + 1) % GRPC_CHTTP2_MAX_TABLE_COUNT); + ((tbl->first_ent + 1) % tbl->cap_entries); tbl->num_ents--; GRPC_MDELEM_UNREF(first_ent); } -void grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { +static void rebuild_ents(grpc_chttp2_hptbl *tbl, gpr_uint32 new_cap) { + grpc_mdelem **ents = gpr_malloc(sizeof(*ents) * new_cap); + gpr_uint32 i; + + for (i = 0; i < tbl->num_ents; i++) { + ents[i] = tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]; + } + gpr_free(tbl->ents); + tbl->cap_entries = new_cap; + tbl->first_ent = 0; +} + +void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, gpr_uint32 max_bytes) { + if (tbl->max_bytes == max_bytes) { + return; + } + gpr_log(GPR_DEBUG, "Update hpack parser max size to %d", max_bytes); + while (tbl->mem_used > max_bytes) { + evict1(tbl); + } + tbl->max_bytes = max_bytes; +} + +int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, gpr_uint32 bytes) { + if (tbl->current_table_bytes == bytes) { + return 1; + } + if (bytes > tbl->max_bytes) { + gpr_log(GPR_ERROR, "Attempt to make hpack table %d bytes when max is %d bytes", bytes, tbl->max_bytes); + return 0; + } + gpr_log(GPR_DEBUG, "Update hpack parser table size to %d", bytes); + while (tbl->mem_used > bytes) { + evict1(tbl); + } + tbl->current_table_bytes = bytes; + tbl->max_entries = entries_for_bytes(bytes); + if (tbl->max_entries > tbl->cap_entries) { + rebuild_ents(tbl, GPR_MAX(tbl->max_entries, 2 * tbl->cap_entries)); + } else if (tbl->max_entries < tbl->cap_entries / 3) { + gpr_uint32 new_cap = GPR_MAX(tbl->max_entries, 16u); + if (new_cap != tbl->cap_entries) { + rebuild_ents(tbl, new_cap); + } + } + return 1; +} + +int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { /* determine how many bytes of buffer this entry represents */ size_t elem_bytes = GPR_SLICE_LENGTH(md->key->slice) + GPR_SLICE_LENGTH(md->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; + if (tbl->current_table_bytes > tbl->max_bytes) { + gpr_log(GPR_ERROR, "HPACK max table size reduced to %d but not reflected by hpack stream", tbl->max_bytes); + return 0; + } + /* we can't add elements bigger than the max table size */ - if (elem_bytes > tbl->max_bytes) { + if (elem_bytes > tbl->current_table_bytes) { /* HPACK draft 10 section 4.4 states: * If the size of the new entry is less than or equal to the maximum * size, that entry is added to the table. It is not an error to @@ -243,11 +305,11 @@ void grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { while (tbl->num_ents) { evict1(tbl); } - return; + return 1; } /* evict entries to ensure no overflow */ - while (elem_bytes > (size_t)tbl->max_bytes - tbl->mem_used) { + while (elem_bytes > (size_t)tbl->current_table_bytes - tbl->mem_used) { evict1(tbl); } @@ -256,31 +318,32 @@ void grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { /* update accounting values */ tbl->last_ent = - (gpr_uint16)((tbl->last_ent + 1) % GRPC_CHTTP2_MAX_TABLE_COUNT); + ((tbl->last_ent + 1) % tbl->cap_entries); tbl->num_ents++; - tbl->mem_used = (gpr_uint16)(tbl->mem_used + elem_bytes); + tbl->mem_used += elem_bytes; + return 1; } grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( const grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { grpc_chttp2_hptbl_find_result r = {0, 0}; - gpr_uint16 i; + gpr_uint32 i; /* See if the string is in the static table */ for (i = 0; i < GRPC_CHTTP2_LAST_STATIC_ENTRY; i++) { grpc_mdelem *ent = tbl->static_ents[i]; if (md->key != ent->key) continue; - r.index = (gpr_uint16)(i + 1); + r.index = i + 1u; r.has_value = md->value == ent->value; if (r.has_value) return r; } /* Scan the dynamic table */ for (i = 0; i < tbl->num_ents; i++) { - gpr_uint16 idx = - (gpr_uint16)(tbl->num_ents - i + GRPC_CHTTP2_LAST_STATIC_ENTRY); + gpr_uint32 idx = + (gpr_uint32)(tbl->num_ents - i + GRPC_CHTTP2_LAST_STATIC_ENTRY); grpc_mdelem *ent = - tbl->ents[(tbl->first_ent + i) % GRPC_CHTTP2_MAX_TABLE_COUNT]; + tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]; if (md->key != ent->key) continue; r.index = idx; r.has_value = md->value == ent->value; diff --git a/src/core/transport/chttp2/hpack_table.h b/src/core/transport/chttp2/hpack_table.h index 4f882e2e03..d3560d34e0 100644 --- a/src/core/transport/chttp2/hpack_table.h +++ b/src/core/transport/chttp2/hpack_table.h @@ -49,47 +49,58 @@ #define GRPC_CHTTP2_MAX_HPACK_TABLE_SIZE GRPC_CHTTP2_INITIAL_HPACK_TABLE_SIZE /* Per entry overhead bytes as per the spec */ #define GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD 32 +#if 0 /* Maximum number of entries we could possibly fit in the table, given defined overheads */ #define GRPC_CHTTP2_MAX_TABLE_COUNT \ ((GRPC_CHTTP2_MAX_HPACK_TABLE_SIZE + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD - 1) / \ GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD) +#endif /* hpack decoder table */ typedef struct { grpc_mdctx *mdctx; /* the first used entry in ents */ - gpr_uint16 first_ent; + gpr_uint32 first_ent; /* the last used entry in ents */ - gpr_uint16 last_ent; + gpr_uint32 last_ent; /* how many entries are in the table */ - gpr_uint16 num_ents; + gpr_uint32 num_ents; /* the amount of memory used by the table, according to the hpack algorithm */ - gpr_uint16 mem_used; + gpr_uint32 mem_used; /* the max memory allowed to be used by the table, according to the hpack algorithm */ - gpr_uint16 max_bytes; + gpr_uint32 max_bytes; + /* the currently agreed size of the table, according to the hpack algorithm */ + gpr_uint32 current_table_bytes; + /* Maximum number of entries we could possibly fit in the table, given defined + overheads */ + gpr_uint32 max_entries; + /* Number of entries allocated in ents */ + gpr_uint32 cap_entries; /* a circular buffer of headers - this is stored in the opposite order to what hpack specifies, in order to simplify table management a little... meaning lookups need to SUBTRACT from the end position */ - grpc_mdelem *ents[GRPC_CHTTP2_MAX_TABLE_COUNT]; + grpc_mdelem **ents; grpc_mdelem *static_ents[GRPC_CHTTP2_LAST_STATIC_ENTRY]; } grpc_chttp2_hptbl; /* initialize a hpack table */ void grpc_chttp2_hptbl_init(grpc_chttp2_hptbl *tbl, grpc_mdctx *mdctx); void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl *tbl); +void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, gpr_uint32 max_bytes); +int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, gpr_uint32 bytes); /* lookup a table entry based on its hpack index */ grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, gpr_uint32 index); /* add a table entry to the index */ -void grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md); +int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) GRPC_MUST_USE_RESULT; /* Find a key/value pair in the table... returns the index in the table of the most similar entry, or 0 if the value was not found */ typedef struct { - gpr_uint16 index; - gpr_uint8 has_value; + gpr_uint32 index; + int has_value; } grpc_chttp2_hptbl_find_result; grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( const grpc_chttp2_hptbl *tbl, grpc_mdelem *md); diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 2d0cb4abdb..216439549c 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -227,6 +227,9 @@ struct grpc_chttp2_transport_parsing { /** was a goaway frame received? */ gpr_uint8 goaway_received; + /** the last sent max_table_size setting */ + gpr_uint32 last_sent_max_table_size; + /** initial window change */ gpr_int64 initial_window_update; @@ -483,7 +486,8 @@ struct grpc_chttp2_stream { /** Someone is unlocking the transport mutex: check to see if writes are required, and schedule them if so */ int grpc_chttp2_unlocking_check_writes(grpc_chttp2_transport_global *global, - grpc_chttp2_transport_writing *writing); + grpc_chttp2_transport_writing *writing, + int is_parsing); void grpc_chttp2_perform_writes( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint); diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 8cef8fbb77..9a96a8ef4d 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -78,6 +78,7 @@ void grpc_chttp2_prepare_to_read( GPR_TIMER_BEGIN("grpc_chttp2_prepare_to_read", 0); transport_parsing->next_stream_id = transport_global->next_stream_id; + transport_parsing->last_sent_max_table_size = transport_global->settings[GRPC_SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -127,6 +128,7 @@ void grpc_chttp2_publish_reads( transport_global->settings[GRPC_SENT_SETTINGS], GRPC_CHTTP2_NUM_SETTINGS * sizeof(gpr_uint32)); transport_parsing->settings_ack_received = 0; + transport_global->sent_local_settings = 0; } /* move goaway to the global state if we received one (it will be @@ -819,6 +821,7 @@ static int init_settings_frame_parser( } if (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_FLAG_ACK) { transport_parsing->settings_ack_received = 1; + grpc_chttp2_hptbl_set_max_bytes(&transport_parsing->hpack_parser.table, transport_parsing->last_sent_max_table_size); } transport_parsing->parser = grpc_chttp2_settings_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.settings; diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 353e476e40..7fe4d0b6bc 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -45,7 +45,8 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx, int grpc_chttp2_unlocking_check_writes( grpc_chttp2_transport_global *transport_global, - grpc_chttp2_transport_writing *transport_writing) { + grpc_chttp2_transport_writing *transport_writing, + int is_parsing) { grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_writing *stream_writing; @@ -55,8 +56,11 @@ int grpc_chttp2_unlocking_check_writes( gpr_slice_buffer_swap(&transport_global->qbuf, &transport_writing->outbuf); GPR_ASSERT(transport_global->qbuf.count == 0); + grpc_chttp2_hpack_compressor_set_max_table_size(&transport_writing->hpack_compressor, transport_global->settings[GRPC_PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]); + if (transport_global->dirtied_local_settings && - !transport_global->sent_local_settings) { + !transport_global->sent_local_settings && + !is_parsing) { gpr_slice_buffer_add( &transport_writing->outbuf, grpc_chttp2_settings_create( diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index f62294c7c5..3aa2ef9892 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -338,6 +338,22 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->global.next_stream_id = (gpr_uint32)channel_args->args[i].value.integer; } + } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER)) { + if (channel_args->args[i].type != GRPC_ARG_INTEGER) { + gpr_log(GPR_ERROR, "%s: must be an integer", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER); + } else if (channel_args->args[i].value.integer < 0) { + gpr_log(GPR_DEBUG, "%s: must be non-negative", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER); + } else { + push_setting(t, GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE, (gpr_uint32)channel_args->args[i].value.integer); + } + } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER)) { + if (channel_args->args[i].type != GRPC_ARG_INTEGER) { + gpr_log(GPR_ERROR, "%s: must be an integer", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER); + } else if (channel_args->args[i].value.integer < 0) { + gpr_log(GPR_DEBUG, "%s: must be non-negative", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER); + } else { + grpc_chttp2_hpack_compressor_set_max_usable_size(&t->writing.hpack_compressor, (gpr_uint32)channel_args->args[i].value.integer); + } } } } @@ -563,7 +579,7 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { GPR_TIMER_BEGIN("unlock", 0); if (!t->writing_active && !t->closed && - grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { + grpc_chttp2_unlocking_check_writes(&t->global, &t->writing, t->parsing_active)) { t->writing_active = 1; REF_TRANSPORT(t, "writing"); grpc_exec_ctx_enqueue(exec_ctx, &t->writing_action, 1); @@ -735,6 +751,8 @@ static int contains_non_ok_status( return 0; } +static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, int success) {} + static void perform_stream_op_locked( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_transport_stream_op *op) { @@ -743,6 +761,9 @@ static void perform_stream_op_locked( GPR_TIMER_BEGIN("perform_stream_op_locked", 0); on_complete = op->on_complete; + if (on_complete == NULL) { + on_complete = grpc_closure_create(do_nothing, NULL); + } /* use final_data as a barrier until enqueue time; the inital counter is dropped at the end of this function */ on_complete->final_data = 2; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 38d3b2218a..0e946b0ae3 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -85,6 +85,7 @@ END2END_TESTS = { 'disappearing_server': connectivity_test_options, 'empty_batch': default_test_options, 'graceful_server_shutdown': default_test_options, + 'hpack_size': default_test_options, 'high_initial_seqno': default_test_options, 'invoke_large_request': default_test_options, 'large_metadata': default_test_options, diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c new file mode 100644 index 0000000000..3aa69ff996 --- /dev/null +++ b/test/core/end2end/tests/hpack_size.c @@ -0,0 +1,467 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "src/core/support/string.h" +#include "test/core/end2end/cq_verifier.h" + +static void *tag(gpr_intptr t) { return (void *)t; } + +const char *hobbits[][2] = { + {"Adaldrida", "Brandybuck"}, + {"Adamanta", "Took"}, + {"Adalgrim", "Took"}, + {"Adelard", "Took"}, + {"Amaranth", "Brandybuck"}, + {"Andwise", "Roper"}, + {"Angelica", "Baggins"}, + {"Asphodel", "Burrows"}, + {"Balbo", "Baggins"}, + {"Bandobras", "Took"}, + {"Belba", "Bolger"}, + {"Bell", "Gamgee"}, + {"Belladonna", "Baggins"}, + {"Berylla", "Baggins"}, + {"Bilbo", "Baggins"}, + {"Bilbo", "Gardner"}, + {"Bill", "Butcher"}, + {"Bingo", "Baggins"}, + {"Bodo", "Proudfoot"}, + {"Bowman", "Cotton"}, + {"Bungo", "Baggins"}, + {"Camellia", "Sackville"}, + {"Carl", "Cotton"}, + {"Celandine", "Brandybuck"}, + {"Chica", "Baggins"}, + {"Daddy", "Twofoot"}, + {"Daisy", "Boffin"}, + {"Diamond", "Took"}, + {"Dinodas", "Brandybuck"}, + {"Doderic", "Brandybuck"}, + {"Dodinas", "Brandybuck"}, + {"Donnamira", "Boffin"}, + {"Dora", "Baggins"}, + {"Drogo", "Baggins"}, + {"Dudo", "Baggins"}, + {"Eglantine", "Took"}, + {"Elanor", "Fairbairn"}, + {"Elfstan", "Fairbairn"}, + {"Esmeralda", "Brandybuck"}, + {"Estella", "Brandybuck"}, + {"Everard", "Took"}, + {"Falco", "Chubb-Baggins"}, + {"Faramir", "Took"}, + {"Farmer", "Maggot"}, + {"Fastolph", "Bolger"}, + {"Ferdibrand", "Took"}, + {"Ferdinand", "Took"}, + {"Ferumbras", "Took"}, + {"Ferumbras", "Took"}, + {"Filibert", "Bolger"}, + {"Firiel", "Fairbairn"}, + {"Flambard", "Took"}, + {"Folco", "Boffin"}, + {"Fortinbras", "Took"}, + {"Fortinbras", "Took"}, + {"Fosco", "Baggins"}, + {"Fredegar", "Bolger"}, + {"Frodo", "Baggins"}, + {"Frodo", "Gardner"}, + {"Gerontius", "Took"}, + {"Gilly", "Baggins"}, + {"Goldilocks", "Took"}, + {"Gorbadoc", "Brandybuck"}, + {"Gorbulas", "Brandybuck"}, + {"Gorhendad", "Brandybuck"}, + {"Gormadoc", "Brandybuck"}, + {"Griffo", "Boffin"}, + {"Halfast", "Gamgee"}, + {"Halfred", "Gamgee"}, + {"Halfred", "Greenhand"}, + {"Hanna", "Brandybuck"}, + {"Hamfast", "Gamgee"}, + {"Hamfast", "Gardner"}, + {"Hamson", "Gamgee"}, + {"Harding", "Gardner"}, + {"Hilda", "Brandybuck"}, + {"Hildibrand", "Took"}, + {"Hildifons", "Took"}, + {"Hildigard", "Took"}, + {"Hildigrim", "Took"}, + {"Hob", "Gammidge"}, + {"Hob", "Hayward"}, + {"Hobson", "Gamgee"}, + {"Holfast", "Gardner"}, + {"Holman", "Cotton"}, + {"Holman", "Greenhand"}, + {"Hugo", "Boffin"}, + {"Hugo", "Bracegirdle"}, + {"Ilberic", "Brandybuck"}, + {"Isembard", "Took"}, + {"Isembold", "Took"}, + {"Isengar", "Took"}, + {"Isengrim", "Took"}, + {"Isengrim", "Took"}, + {"Isumbras", "Took"}, + {"Isumbras", "Took"}, + {"Jolly", "Cotton"}, + {"Lalia", "Took"}, + {"Largo", "Baggins"}, + {"Laura", "Baggins"}, + {"Lily", "Goodbody"}, + {"Lily", "Cotton"}, + {"Linda", "Proudfoot"}, + {"Lobelia", "Sackville-Baggins"}, + {"Longo", "Baggins"}, + {"Lotho", "Sackville-Baggins"}, + {"Madoc", "Brandybuck"}, + {"Malva", "Brandybuck"}, + {"Marigold", "Cotton"}, + {"Marmadas", "Brandybuck"}, + {"Marmadoc", "Brandybuck"}, + {"Marroc", "Brandybuck"}, + {"May", "Gamgee"}, + {"Melilot", "Brandybuck"}, + {"Menegilda", "Brandybuck"}, + {"Mentha", "Brandybuck"}, + {"Meriadoc", "Brandybuck"}, + {"Merimac", "Brandybuck"}, + {"Merimas", "Brandybuck"}, + {"Merry", "Gardner"}, + {"Milo", "Burrows"}, + {"Mimosa", "Baggins"}, + {"Minto", "Burrows"}, + {"Mirabella", "Brandybuck"}, + {"Moro", "Burrows"}, + {"Mosco", "Burrows"}, + {"Mungo", "Baggins"}, + {"Myrtle", "Burrows"}, + {"Odo", "Proudfoot"}, + {"Odovacar", "Bolger"}, + {"Olo", "Proudfoot"}, + {"Orgulas", "Brandybuck"}, + {"Otho", "Sackville-Baggins"}, + {"Paladin", "Took"}, + {"Pansy", "Bolger"}, + {"Pearl", "Took"}, + {"Peony", "Burrows"}, + {"Peregrin", "Took"}, + {"Pervinca", "Took"}, + {"Pimpernel", "Took"}, + {"Pippin", "Gardner"}, + {"Polo", "Baggins"}, + {"Ponto", "Baggins"}, + {"Porto", "Baggins"}, + {"Posco", "Baggins"}, + {"Poppy", "Bolger"}, + {"Primrose", "Gardner"}, + {"Primula", "Baggins"}, + {"Prisca", "Bolger"}, + {"Reginard", "Took"}, + {"Robin", "Smallburrow"}, + {"Robin", "Gardner"}, + {"Rorimac", "Brandybuck"}, + {"Rosa", "Took"}, + {"Rosamunda", "Bolger"}, + {"Rose", "Gardner"}, + {"Ruby", "Baggins"}, + {"Ruby", "Gardner"}, + {"Rudigar", "Bolger"}, + {"Rufus", "Burrows"}, + {"Sadoc", "Brandybuck"}, + {"Salvia", "Bolger"}, + {"Samwise", "Gamgee"}, + {"Sancho", "Proudfoot"}, + {"Saradas", "Brandybuck"}, + {"Saradoc", "Brandybuck"}, + {"Seredic", "Brandybuck"}, + {"Sigismond", "Took"}, + {"Smeagol", "Gollum"}, + {"Tanta", "Baggins"}, + {"Ted", "Sandyman"}, + {"Tobold", "Hornblower"}, + {"Togo", "Goodbody"}, + {"Tolman", "Cotton"}, + {"Tolman", "Gardner"}, + {"Widow", "Rumble"}, + {"Wilcome", "Cotton"}, + {"Wilcome", "Cotton"}, + {"Wilibald", "Bolger"}, + {"Will", "Whitfoot"}, + {"Wiseman", "Gamwich"} +}; + +const char *dragons[] = { + "Ancalagon", + "Glaurung", + "Scatha", + "Smaug the Magnificent" +}; + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_client(&f, client_args); + config.init_server(&f, server_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(1000), + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), + NULL).type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +static void simple_request_body(grpc_end2end_test_fixture f, size_t index) { + grpc_call *c; + grpc_call *s; + gpr_timespec deadline = five_seconds_time(); + cq_verifier *cqv = cq_verifier_create(f.cq); + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + grpc_metadata extra_metadata[3]; + char *details = NULL; + size_t details_capacity = 0; + int was_cancelled = 2; + + memset(extra_metadata, 0, sizeof(extra_metadata)); + extra_metadata[0].key = "hobbit-first-name"; + extra_metadata[0].value = hobbits[index % GPR_ARRAY_SIZE(hobbits)][0]; + extra_metadata[0].value_length = strlen(extra_metadata[0].value); + extra_metadata[1].key = "hobbit-second-name"; + extra_metadata[1].value = hobbits[index % GPR_ARRAY_SIZE(hobbits)][1]; + extra_metadata[1].value_length = strlen(extra_metadata[1].value); + extra_metadata[2].key = "dragon"; + extra_metadata[2].value = dragons[index % GPR_ARRAY_SIZE(dragons)]; + extra_metadata[2].value_length = strlen(extra_metadata[2].value); + + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, + "/foo", "foo.test.google.fr:1234", deadline, + NULL); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = GPR_ARRAY_SIZE(extra_metadata); + op->data.send_initial_metadata.metadata = extra_metadata; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op->data.recv_status_on_client.status_details_capacity = &details_capacity; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(101), 1); + cq_verify(cqv); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED; + op->data.send_status_from_server.status_details = "xyz"; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(102), 1); + cq_expect_completion(cqv, tag(1), 1); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED); + GPR_ASSERT(0 == strcmp(details, "xyz")); + GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); + GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234")); + GPR_ASSERT(was_cancelled == 1); + + gpr_free(details); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + + grpc_call_destroy(c); + grpc_call_destroy(s); + + cq_verifier_destroy(cqv); +} + +static void test_size(grpc_end2end_test_config config, int encode_size, int decode_size) { + size_t i; + grpc_end2end_test_fixture f; + grpc_arg server_arg; + grpc_channel_args server_args; + grpc_arg client_arg; + grpc_channel_args client_args; + char *name; + + server_arg.type = GRPC_ARG_INTEGER; + server_arg.key = GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER; + server_arg.value.integer = decode_size; + server_args.num_args = 1; + server_args.args = &server_arg; + + client_arg.type = GRPC_ARG_INTEGER; + client_arg.key = GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER; + client_arg.value.integer = encode_size; + client_args.num_args = 1; + client_args.args = &client_arg; + + gpr_asprintf(&name, "test_size:e=%d:d=%d", encode_size, decode_size); + f = begin_test(config, name, encode_size != 4096 ? &client_args : NULL, decode_size != 4096 ? &server_args : NULL); + for (i = 0; i < 4 * GPR_ARRAY_SIZE(hobbits); i++) { + simple_request_body(f, i); + } + end_test(&f); + config.tear_down_data(&f); + gpr_free(name); +} + +void grpc_end2end_tests(grpc_end2end_test_config config) { + static const int interesting_sizes[] = { + 4096, + 0, + 1, + 32, + 100, + 1000, + 4095, + 4097, + 8192, + 16384, + 32768, + 1024*1024-1, + 1024*1024, + 1024*1024+1, + 2*1024*1024, + 3*1024*1024, + 4*1024*1024 + }; + size_t i, j; + + for (i = 0; i < GPR_ARRAY_SIZE(interesting_sizes); i++) { + for (j = 0; j < GPR_ARRAY_SIZE(interesting_sizes); j++) { + test_size(config, interesting_sizes[i], interesting_sizes[j]); + } + } +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index d3493bbe2c..bd027e6e61 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2023,6 +2023,21 @@ "name": "h2_compress_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_compress", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_compress_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -2548,6 +2563,21 @@ "name": "h2_fakesec_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_fakesec", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_fakesec_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -3073,6 +3103,21 @@ "name": "h2_full_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_full", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_full_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -3598,6 +3643,21 @@ "name": "h2_full+poll_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_full+poll", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_full+poll_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -4123,6 +4183,21 @@ "name": "h2_oauth2_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_oauth2", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_oauth2_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -4618,6 +4693,21 @@ "name": "h2_proxy_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_proxy", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_proxy_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -5068,6 +5158,21 @@ "name": "h2_sockpair_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_sockpair", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_sockpair_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -5533,6 +5638,21 @@ "name": "h2_sockpair+trace_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_sockpair+trace", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_sockpair+trace_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -5998,6 +6118,21 @@ "name": "h2_sockpair_1byte_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_sockpair_1byte", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_sockpair_1byte_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -6508,6 +6643,21 @@ "name": "h2_ssl_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_ssl", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_ssl_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -7033,6 +7183,21 @@ "name": "h2_ssl+poll_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_ssl+poll", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_ssl+poll_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -7528,6 +7693,21 @@ "name": "h2_ssl_proxy_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_ssl_proxy", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_ssl_proxy_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -8023,6 +8203,21 @@ "name": "h2_uchannel_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_uchannel", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_uchannel_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -8533,6 +8728,21 @@ "name": "h2_uds_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_uds", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_uds_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -9043,6 +9253,21 @@ "name": "h2_uds+poll_high_initial_seqno_test", "src": [] }, + { + "deps": [ + "end2end_certs", + "end2end_fixture_h2_uds+poll", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_uds+poll_hpack_size_test", + "src": [] + }, { "deps": [ "end2end_certs", @@ -9537,6 +9762,20 @@ "name": "h2_compress_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_compress", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_compress_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_compress", @@ -10013,6 +10252,20 @@ "name": "h2_full_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_full", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_full_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_full", @@ -10489,6 +10742,20 @@ "name": "h2_full+poll_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_full+poll", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_full+poll_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_full+poll", @@ -10937,6 +11204,20 @@ "name": "h2_proxy_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_proxy", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_proxy_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_proxy", @@ -11343,6 +11624,20 @@ "name": "h2_sockpair_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_sockpair", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_sockpair_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_sockpair", @@ -11763,6 +12058,20 @@ "name": "h2_sockpair+trace_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_sockpair+trace", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_sockpair+trace_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_sockpair+trace", @@ -12183,6 +12492,20 @@ "name": "h2_sockpair_1byte_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_sockpair_1byte", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_sockpair_1byte_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_sockpair_1byte", @@ -12645,6 +12968,20 @@ "name": "h2_uchannel_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_uchannel", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_uchannel_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_uchannel", @@ -13107,6 +13444,20 @@ "name": "h2_uds_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_uds", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_uds_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_uds", @@ -13569,6 +13920,20 @@ "name": "h2_uds+poll_high_initial_seqno_nosec_test", "src": [] }, + { + "deps": [ + "end2end_fixture_h2_uds+poll", + "end2end_test_hpack_size", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_uds+poll_hpack_size_nosec_test", + "src": [] + }, { "deps": [ "end2end_fixture_h2_uds+poll", @@ -16021,6 +16386,25 @@ "test/core/end2end/tests/high_initial_seqno.c" ] }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [ + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h" + ], + "language": "c", + "name": "end2end_test_hpack_size", + "src": [ + "test/core/end2end/end2end_tests.h", + "test/core/end2end/tests/cancel_test_helpers.h", + "test/core/end2end/tests/hpack_size.c" + ] + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 00ef157e98..d1aa883551 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1955,6 +1955,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -2568,6 +2586,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -3180,6 +3215,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -3708,6 +3761,18 @@ "linux" ] }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+poll_hpack_size_test", + "platforms": [ + "linux" + ] + }, { "ci_platforms": [ "linux" @@ -4213,6 +4278,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -4774,6 +4856,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -5284,6 +5383,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -5825,6 +5941,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -6369,6 +6503,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -6964,6 +7115,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -7492,6 +7661,18 @@ "linux" ] }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl+poll_hpack_size_test", + "platforms": [ + "linux" + ] + }, { "ci_platforms": [ "linux" @@ -7963,6 +8144,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -8541,6 +8739,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -9121,6 +9337,22 @@ "posix" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_hpack_size_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "ci_platforms": [ "linux", @@ -9601,6 +9833,18 @@ "linux" ] }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds+poll_hpack_size_test", + "platforms": [ + "linux" + ] + }, { "ci_platforms": [ "linux" @@ -10105,6 +10349,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -10717,6 +10979,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -11233,6 +11513,18 @@ "linux" ] }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+poll_hpack_size_nosec_test", + "platforms": [ + "linux" + ] + }, { "ci_platforms": [ "linux" @@ -11687,6 +11979,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -12180,6 +12489,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -12703,6 +13029,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -13230,6 +13574,23 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -13807,6 +14168,24 @@ "windows" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "ci_platforms": [ "linux", @@ -14371,6 +14750,22 @@ "posix" ] }, + { + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_hpack_size_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "ci_platforms": [ "linux", @@ -14839,6 +15234,18 @@ "linux" ] }, + { + "ci_platforms": [ + "linux" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds+poll_hpack_size_nosec_test", + "platforms": [ + "linux" + ] + }, { "ci_platforms": [ "linux" diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 48ebdf43b0..44dba4e3d0 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -394,6 +394,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_test_high_initial_s {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_test_hpack_size", "vcxproj\test\end2end_test_hpack_size\end2end_test_hpack_size.vcxproj", "{22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_test_invoke_large_request", "vcxproj\test\end2end_test_invoke_large_request\end2end_test_invoke_large_request.vcxproj", "{30861F4C-E783-96E7-DB51-FD85757347C0}" ProjectSection(myProperties) = preProject lib = "True" @@ -1506,6 +1517,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_high_initial_se {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_hpack_size_test", "vcxproj\test\h2_compress_hpack_size_test\h2_compress_hpack_size_test.vcxproj", "{8E7B2D33-360B-9A26-8BFD-1BAD10769F33}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {C5D3C9A9-C0D2-CBAD-B433-710C5E89AE31} = {C5D3C9A9-C0D2-CBAD-B433-710C5E89AE31} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_invoke_large_request_test", "vcxproj\test\h2_compress_invoke_large_request_test\h2_compress_invoke_large_request_test.vcxproj", "{FE9E76C0-74CB-5085-6CE6-862E49037F0B}" ProjectSection(myProperties) = preProject lib = "False" @@ -1996,6 +2021,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_high_initial_seq {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_hpack_size_test", "vcxproj\test\h2_fakesec_hpack_size_test\h2_fakesec_hpack_size_test.vcxproj", "{5CDFA7CB-09E1-E01E-E21D-7446146478CC}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {096ABF91-FEC8-9AC9-B877-C683BFD51984} = {096ABF91-FEC8-9AC9-B877-C683BFD51984} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_invoke_large_request_test", "vcxproj\test\h2_fakesec_invoke_large_request_test\h2_fakesec_invoke_large_request_test.vcxproj", "{93980DE4-8935-C0F5-86F8-22B3F0811121}" ProjectSection(myProperties) = preProject lib = "False" @@ -2486,6 +2525,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_high_initial_seqno_ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_hpack_size_test", "vcxproj\test\h2_full_hpack_size_test\h2_full_hpack_size_test.vcxproj", "{C655AED5-AF53-D09E-A8EA-60AE0F2D149A}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {882B2933-F340-7027-7090-28CEAE9F1BE6} = {882B2933-F340-7027-7090-28CEAE9F1BE6} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_invoke_large_request_test", "vcxproj\test\h2_full_invoke_large_request_test\h2_full_invoke_large_request_test.vcxproj", "{F97198F5-D5EC-E06B-C51F-1BF7644D7422}" ProjectSection(myProperties) = preProject lib = "False" @@ -2976,6 +3029,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_high_initial_seqn {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_hpack_size_test", "vcxproj\test\h2_oauth2_hpack_size_test\h2_oauth2_hpack_size_test.vcxproj", "{CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {DDFE4EB8-CCD3-DA3F-461A-10F1B94D26AF} = {DDFE4EB8-CCD3-DA3F-461A-10F1B94D26AF} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_invoke_large_request_test", "vcxproj\test\h2_oauth2_invoke_large_request_test\h2_oauth2_invoke_large_request_test.vcxproj", "{945F52A3-91ED-5891-9D11-D07A19E4FEA2}" ProjectSection(myProperties) = preProject lib = "False" @@ -3438,6 +3505,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_high_initial_seqno {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_hpack_size_test", "vcxproj\test\h2_proxy_hpack_size_test\h2_proxy_hpack_size_test.vcxproj", "{D590F4D6-081E-4D6D-3F5C-592D7727208E}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {B8266C40-E74E-316E-4DEF-0B2A4B6F490F} = {B8266C40-E74E-316E-4DEF-0B2A4B6F490F} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_invoke_large_request_test", "vcxproj\test\h2_proxy_invoke_large_request_test\h2_proxy_invoke_large_request_test.vcxproj", "{B8E79F02-BE31-B641-172D-86D81B128556}" ProjectSection(myProperties) = preProject lib = "False" @@ -3858,6 +3939,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_high_initial_se {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_hpack_size_test", "vcxproj\test\h2_sockpair_hpack_size_test\h2_sockpair_hpack_size_test.vcxproj", "{E96735FF-B1CF-51D2-1923-53292AF72C4E}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {67A1675D-FF50-3B78-2706-155D69ADC290} = {67A1675D-FF50-3B78-2706-155D69ADC290} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_invoke_large_request_test", "vcxproj\test\h2_sockpair_invoke_large_request_test\h2_sockpair_invoke_large_request_test.vcxproj", "{1A1AA28B-D635-F4BD-DFFA-096D2E4BA9BF}" ProjectSection(myProperties) = preProject lib = "False" @@ -4292,6 +4387,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_high_init {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_hpack_size_test", "vcxproj\test\h2_sockpair+trace_hpack_size_test\h2_sockpair+trace_hpack_size_test.vcxproj", "{5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {FE71A3F7-4B15-1570-B0BA-9E1A053DAA4A} = {FE71A3F7-4B15-1570-B0BA-9E1A053DAA4A} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_invoke_large_request_test", "vcxproj\test\h2_sockpair+trace_invoke_large_request_test\h2_sockpair+trace_invoke_large_request_test.vcxproj", "{36F3ECA5-67AC-4D0B-865C-EC4F2542765B}" ProjectSection(myProperties) = preProject lib = "False" @@ -4726,6 +4835,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_high_init {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_hpack_size_test", "vcxproj\test\h2_sockpair_1byte_hpack_size_test\h2_sockpair_1byte_hpack_size_test.vcxproj", "{0B07D219-39A5-729B-EB0F-8B81E562D808}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {B0F4BF34-3C82-EB67-990E-959CDDBEB734} = {B0F4BF34-3C82-EB67-990E-959CDDBEB734} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_invoke_large_request_test", "vcxproj\test\h2_sockpair_1byte_invoke_large_request_test\h2_sockpair_1byte_invoke_large_request_test.vcxproj", "{45EED825-B3C0-63AE-43FE-CFA8DD3164EC}" ProjectSection(myProperties) = preProject lib = "False" @@ -5202,6 +5325,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_high_initial_seqno_t {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_hpack_size_test", "vcxproj\test\h2_ssl_hpack_size_test\h2_ssl_hpack_size_test.vcxproj", "{856DAD36-A161-9876-9548-48D06BFA35C1}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {207BE5BC-25D7-1D2A-C76E-279DB66A1205} = {207BE5BC-25D7-1D2A-C76E-279DB66A1205} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_invoke_large_request_test", "vcxproj\test\h2_ssl_invoke_large_request_test\h2_ssl_invoke_large_request_test.vcxproj", "{CB6E0DFE-7AA8-5F3A-431E-5D769E9339F7}" ProjectSection(myProperties) = preProject lib = "False" @@ -5664,6 +5801,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_high_initial_s {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_hpack_size_test", "vcxproj\test\h2_ssl_proxy_hpack_size_test\h2_ssl_proxy_hpack_size_test.vcxproj", "{BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {5EAD0E6C-5DD6-A466-FF6B-F73200AF89E1} = {5EAD0E6C-5DD6-A466-FF6B-F73200AF89E1} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_invoke_large_request_test", "vcxproj\test\h2_ssl_proxy_invoke_large_request_test\h2_ssl_proxy_invoke_large_request_test.vcxproj", "{93FEEB88-7D7A-F70F-0EB5-54B37F7C6866}" ProjectSection(myProperties) = preProject lib = "False" @@ -6126,6 +6277,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_high_initial_se {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_hpack_size_test", "vcxproj\test\h2_uchannel_hpack_size_test\h2_uchannel_hpack_size_test.vcxproj", "{9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {CE17F95F-4FD3-41C3-E1B9-9B85F1FE7D4A} = {CE17F95F-4FD3-41C3-E1B9-9B85F1FE7D4A} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_invoke_large_request_test", "vcxproj\test\h2_uchannel_invoke_large_request_test\h2_uchannel_invoke_large_request_test.vcxproj", "{7B5AE7B2-6D7E-D97F-A6A4-721C7446171F}" ProjectSection(myProperties) = preProject lib = "False" @@ -6586,6 +6751,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_high_initial_se {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_hpack_size_nosec_test", "vcxproj\test\h2_compress_hpack_size_nosec_test\h2_compress_hpack_size_nosec_test.vcxproj", "{5A641212-7C59-E552-0ED6-F05F710DD4F5}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {C5D3C9A9-C0D2-CBAD-B433-710C5E89AE31} = {C5D3C9A9-C0D2-CBAD-B433-710C5E89AE31} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_invoke_large_request_nosec_test", "vcxproj\test\h2_compress_invoke_large_request_nosec_test\h2_compress_invoke_large_request_nosec_test.vcxproj", "{C3A6661F-806B-BDE6-AF91-032175B443F8}" ProjectSection(myProperties) = preProject lib = "False" @@ -7028,6 +7206,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_high_initial_seqno_ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_hpack_size_nosec_test", "vcxproj\test\h2_full_hpack_size_nosec_test\h2_full_hpack_size_nosec_test.vcxproj", "{C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {882B2933-F340-7027-7090-28CEAE9F1BE6} = {882B2933-F340-7027-7090-28CEAE9F1BE6} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_invoke_large_request_nosec_test", "vcxproj\test\h2_full_invoke_large_request_nosec_test\h2_full_invoke_large_request_nosec_test.vcxproj", "{96C59CF1-6E80-B88D-D99C-0AA4C32F6562}" ProjectSection(myProperties) = preProject lib = "False" @@ -7444,6 +7635,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_high_initial_seqno {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_hpack_size_nosec_test", "vcxproj\test\h2_proxy_hpack_size_nosec_test\h2_proxy_hpack_size_nosec_test.vcxproj", "{DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {B8266C40-E74E-316E-4DEF-0B2A4B6F490F} = {B8266C40-E74E-316E-4DEF-0B2A4B6F490F} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_invoke_large_request_nosec_test", "vcxproj\test\h2_proxy_invoke_large_request_nosec_test\h2_proxy_invoke_large_request_nosec_test.vcxproj", "{87C60ADD-6100-48B9-1C29-5679E54A72CD}" ProjectSection(myProperties) = preProject lib = "False" @@ -7821,6 +8025,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_high_initial_se {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_hpack_size_nosec_test", "vcxproj\test\h2_sockpair_hpack_size_nosec_test\h2_sockpair_hpack_size_nosec_test.vcxproj", "{B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {67A1675D-FF50-3B78-2706-155D69ADC290} = {67A1675D-FF50-3B78-2706-155D69ADC290} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_invoke_large_request_nosec_test", "vcxproj\test\h2_sockpair_invoke_large_request_nosec_test\h2_sockpair_invoke_large_request_nosec_test.vcxproj", "{8BF0F1D5-3CF2-DFFD-D74D-E2D7D06A65AC}" ProjectSection(myProperties) = preProject lib = "False" @@ -8211,6 +8428,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_high_init {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_hpack_size_nosec_test", "vcxproj\test\h2_sockpair+trace_hpack_size_nosec_test\h2_sockpair+trace_hpack_size_nosec_test.vcxproj", "{C8C775E0-9098-D767-2452-211978E7C0EA}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {FE71A3F7-4B15-1570-B0BA-9E1A053DAA4A} = {FE71A3F7-4B15-1570-B0BA-9E1A053DAA4A} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_invoke_large_request_nosec_test", "vcxproj\test\h2_sockpair+trace_invoke_large_request_nosec_test\h2_sockpair+trace_invoke_large_request_nosec_test.vcxproj", "{5957731C-42D1-29EE-AD1C-E372613C2575}" ProjectSection(myProperties) = preProject lib = "False" @@ -8601,6 +8831,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_high_init {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_hpack_size_nosec_test", "vcxproj\test\h2_sockpair_1byte_hpack_size_nosec_test\h2_sockpair_1byte_hpack_size_nosec_test.vcxproj", "{93AF9D45-51B5-A902-4537-709FE4ED9830}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {B0F4BF34-3C82-EB67-990E-959CDDBEB734} = {B0F4BF34-3C82-EB67-990E-959CDDBEB734} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_invoke_large_request_nosec_test", "vcxproj\test\h2_sockpair_1byte_invoke_large_request_nosec_test\h2_sockpair_1byte_invoke_large_request_nosec_test.vcxproj", "{0733C2AA-D898-7145-3F2E-6304DC428C5F}" ProjectSection(myProperties) = preProject lib = "False" @@ -9030,6 +9273,19 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_high_initial_se {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_hpack_size_nosec_test", "vcxproj\test\h2_uchannel_hpack_size_nosec_test\h2_uchannel_hpack_size_nosec_test.vcxproj", "{EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {CE17F95F-4FD3-41C3-E1B9-9B85F1FE7D4A} = {CE17F95F-4FD3-41C3-E1B9-9B85F1FE7D4A} + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} = {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_invoke_large_request_nosec_test", "vcxproj\test\h2_uchannel_invoke_large_request_nosec_test\h2_uchannel_invoke_large_request_nosec_test.vcxproj", "{0EC09350-0FB9-0208-000E-1B6C534B234C}" ProjectSection(myProperties) = preProject lib = "False" @@ -9892,6 +10148,22 @@ Global {C3647908-B80D-F566-5659-3E98B09D83F9}.Release-DLL|Win32.Build.0 = Release|Win32 {C3647908-B80D-F566-5659-3E98B09D83F9}.Release-DLL|x64.ActiveCfg = Release|x64 {C3647908-B80D-F566-5659-3E98B09D83F9}.Release-DLL|x64.Build.0 = Release|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug|Win32.ActiveCfg = Debug|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug|x64.ActiveCfg = Debug|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release|Win32.ActiveCfg = Release|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release|x64.ActiveCfg = Release|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug|Win32.Build.0 = Debug|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug|x64.Build.0 = Debug|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release|Win32.Build.0 = Release|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release|x64.Build.0 = Release|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Debug-DLL|x64.Build.0 = Debug|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release-DLL|Win32.Build.0 = Release|Win32 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release-DLL|x64.ActiveCfg = Release|x64 + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5}.Release-DLL|x64.Build.0 = Release|x64 {30861F4C-E783-96E7-DB51-FD85757347C0}.Debug|Win32.ActiveCfg = Debug|Win32 {30861F4C-E783-96E7-DB51-FD85757347C0}.Debug|x64.ActiveCfg = Debug|x64 {30861F4C-E783-96E7-DB51-FD85757347C0}.Release|Win32.ActiveCfg = Release|Win32 @@ -11508,6 +11780,22 @@ Global {1B8B71B0-ED48-43BF-0553-092CF96A330B}.Release-DLL|Win32.Build.0 = Release|Win32 {1B8B71B0-ED48-43BF-0553-092CF96A330B}.Release-DLL|x64.ActiveCfg = Release|x64 {1B8B71B0-ED48-43BF-0553-092CF96A330B}.Release-DLL|x64.Build.0 = Release|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug|Win32.ActiveCfg = Debug|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug|x64.ActiveCfg = Debug|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release|Win32.ActiveCfg = Release|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release|x64.ActiveCfg = Release|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug|Win32.Build.0 = Debug|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug|x64.Build.0 = Debug|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release|Win32.Build.0 = Release|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release|x64.Build.0 = Release|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Debug-DLL|x64.Build.0 = Debug|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release-DLL|Win32.Build.0 = Release|Win32 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release-DLL|x64.ActiveCfg = Release|x64 + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33}.Release-DLL|x64.Build.0 = Release|x64 {FE9E76C0-74CB-5085-6CE6-862E49037F0B}.Debug|Win32.ActiveCfg = Debug|Win32 {FE9E76C0-74CB-5085-6CE6-862E49037F0B}.Debug|x64.ActiveCfg = Debug|x64 {FE9E76C0-74CB-5085-6CE6-862E49037F0B}.Release|Win32.ActiveCfg = Release|Win32 @@ -12068,6 +12356,22 @@ Global {65265C4A-46B8-F54C-96AB-10A292FE851F}.Release-DLL|Win32.Build.0 = Release|Win32 {65265C4A-46B8-F54C-96AB-10A292FE851F}.Release-DLL|x64.ActiveCfg = Release|x64 {65265C4A-46B8-F54C-96AB-10A292FE851F}.Release-DLL|x64.Build.0 = Release|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug|x64.ActiveCfg = Debug|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release|Win32.ActiveCfg = Release|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release|x64.ActiveCfg = Release|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug|Win32.Build.0 = Debug|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug|x64.Build.0 = Debug|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release|Win32.Build.0 = Release|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release|x64.Build.0 = Release|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Debug-DLL|x64.Build.0 = Debug|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release-DLL|Win32.Build.0 = Release|Win32 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release-DLL|x64.ActiveCfg = Release|x64 + {5CDFA7CB-09E1-E01E-E21D-7446146478CC}.Release-DLL|x64.Build.0 = Release|x64 {93980DE4-8935-C0F5-86F8-22B3F0811121}.Debug|Win32.ActiveCfg = Debug|Win32 {93980DE4-8935-C0F5-86F8-22B3F0811121}.Debug|x64.ActiveCfg = Debug|x64 {93980DE4-8935-C0F5-86F8-22B3F0811121}.Release|Win32.ActiveCfg = Release|Win32 @@ -12628,6 +12932,22 @@ Global {87CE6537-F5DC-4AF1-6206-D9C31058226D}.Release-DLL|Win32.Build.0 = Release|Win32 {87CE6537-F5DC-4AF1-6206-D9C31058226D}.Release-DLL|x64.ActiveCfg = Release|x64 {87CE6537-F5DC-4AF1-6206-D9C31058226D}.Release-DLL|x64.Build.0 = Release|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug|x64.ActiveCfg = Debug|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release|Win32.ActiveCfg = Release|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release|x64.ActiveCfg = Release|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug|Win32.Build.0 = Debug|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug|x64.Build.0 = Debug|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release|Win32.Build.0 = Release|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release|x64.Build.0 = Release|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Debug-DLL|x64.Build.0 = Debug|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release-DLL|Win32.Build.0 = Release|Win32 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release-DLL|x64.ActiveCfg = Release|x64 + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A}.Release-DLL|x64.Build.0 = Release|x64 {F97198F5-D5EC-E06B-C51F-1BF7644D7422}.Debug|Win32.ActiveCfg = Debug|Win32 {F97198F5-D5EC-E06B-C51F-1BF7644D7422}.Debug|x64.ActiveCfg = Debug|x64 {F97198F5-D5EC-E06B-C51F-1BF7644D7422}.Release|Win32.ActiveCfg = Release|Win32 @@ -13188,6 +13508,22 @@ Global {7E1DDE0D-E68B-BF0B-2EE7-AAFE5C9CCD58}.Release-DLL|Win32.Build.0 = Release|Win32 {7E1DDE0D-E68B-BF0B-2EE7-AAFE5C9CCD58}.Release-DLL|x64.ActiveCfg = Release|x64 {7E1DDE0D-E68B-BF0B-2EE7-AAFE5C9CCD58}.Release-DLL|x64.Build.0 = Release|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug|Win32.ActiveCfg = Debug|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug|x64.ActiveCfg = Debug|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release|Win32.ActiveCfg = Release|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release|x64.ActiveCfg = Release|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug|Win32.Build.0 = Debug|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug|x64.Build.0 = Debug|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release|Win32.Build.0 = Release|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release|x64.Build.0 = Release|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Debug-DLL|x64.Build.0 = Debug|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release-DLL|Win32.Build.0 = Release|Win32 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release-DLL|x64.ActiveCfg = Release|x64 + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2}.Release-DLL|x64.Build.0 = Release|x64 {945F52A3-91ED-5891-9D11-D07A19E4FEA2}.Debug|Win32.ActiveCfg = Debug|Win32 {945F52A3-91ED-5891-9D11-D07A19E4FEA2}.Debug|x64.ActiveCfg = Debug|x64 {945F52A3-91ED-5891-9D11-D07A19E4FEA2}.Release|Win32.ActiveCfg = Release|Win32 @@ -13716,6 +14052,22 @@ Global {A38AAA5F-1C55-14DC-24D0-56DE33BE4024}.Release-DLL|Win32.Build.0 = Release|Win32 {A38AAA5F-1C55-14DC-24D0-56DE33BE4024}.Release-DLL|x64.ActiveCfg = Release|x64 {A38AAA5F-1C55-14DC-24D0-56DE33BE4024}.Release-DLL|x64.Build.0 = Release|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug|x64.ActiveCfg = Debug|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release|Win32.ActiveCfg = Release|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release|x64.ActiveCfg = Release|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug|Win32.Build.0 = Debug|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug|x64.Build.0 = Debug|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release|Win32.Build.0 = Release|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release|x64.Build.0 = Release|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Debug-DLL|x64.Build.0 = Debug|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release-DLL|Win32.Build.0 = Release|Win32 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release-DLL|x64.ActiveCfg = Release|x64 + {D590F4D6-081E-4D6D-3F5C-592D7727208E}.Release-DLL|x64.Build.0 = Release|x64 {B8E79F02-BE31-B641-172D-86D81B128556}.Debug|Win32.ActiveCfg = Debug|Win32 {B8E79F02-BE31-B641-172D-86D81B128556}.Debug|x64.ActiveCfg = Debug|x64 {B8E79F02-BE31-B641-172D-86D81B128556}.Release|Win32.ActiveCfg = Release|Win32 @@ -14196,6 +14548,22 @@ Global {0AE39FD9-59E4-1F8A-E8DD-1FCBFC62D2B3}.Release-DLL|Win32.Build.0 = Release|Win32 {0AE39FD9-59E4-1F8A-E8DD-1FCBFC62D2B3}.Release-DLL|x64.ActiveCfg = Release|x64 {0AE39FD9-59E4-1F8A-E8DD-1FCBFC62D2B3}.Release-DLL|x64.Build.0 = Release|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug|Win32.ActiveCfg = Debug|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug|x64.ActiveCfg = Debug|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release|Win32.ActiveCfg = Release|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release|x64.ActiveCfg = Release|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug|Win32.Build.0 = Debug|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug|x64.Build.0 = Debug|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release|Win32.Build.0 = Release|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release|x64.Build.0 = Release|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Debug-DLL|x64.Build.0 = Debug|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release-DLL|Win32.Build.0 = Release|Win32 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release-DLL|x64.ActiveCfg = Release|x64 + {E96735FF-B1CF-51D2-1923-53292AF72C4E}.Release-DLL|x64.Build.0 = Release|x64 {1A1AA28B-D635-F4BD-DFFA-096D2E4BA9BF}.Debug|Win32.ActiveCfg = Debug|Win32 {1A1AA28B-D635-F4BD-DFFA-096D2E4BA9BF}.Debug|x64.ActiveCfg = Debug|x64 {1A1AA28B-D635-F4BD-DFFA-096D2E4BA9BF}.Release|Win32.ActiveCfg = Release|Win32 @@ -14692,6 +15060,22 @@ Global {712C724F-63FC-E770-A9D1-82516CFAEB5A}.Release-DLL|Win32.Build.0 = Release|Win32 {712C724F-63FC-E770-A9D1-82516CFAEB5A}.Release-DLL|x64.ActiveCfg = Release|x64 {712C724F-63FC-E770-A9D1-82516CFAEB5A}.Release-DLL|x64.Build.0 = Release|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug|Win32.ActiveCfg = Debug|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug|x64.ActiveCfg = Debug|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release|Win32.ActiveCfg = Release|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release|x64.ActiveCfg = Release|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug|Win32.Build.0 = Debug|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug|x64.Build.0 = Debug|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release|Win32.Build.0 = Release|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release|x64.Build.0 = Release|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Debug-DLL|x64.Build.0 = Debug|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release-DLL|Win32.Build.0 = Release|Win32 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release-DLL|x64.ActiveCfg = Release|x64 + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336}.Release-DLL|x64.Build.0 = Release|x64 {36F3ECA5-67AC-4D0B-865C-EC4F2542765B}.Debug|Win32.ActiveCfg = Debug|Win32 {36F3ECA5-67AC-4D0B-865C-EC4F2542765B}.Debug|x64.ActiveCfg = Debug|x64 {36F3ECA5-67AC-4D0B-865C-EC4F2542765B}.Release|Win32.ActiveCfg = Release|Win32 @@ -15188,6 +15572,22 @@ Global {81643723-BBFA-AA83-B6AC-9FF770B4ED34}.Release-DLL|Win32.Build.0 = Release|Win32 {81643723-BBFA-AA83-B6AC-9FF770B4ED34}.Release-DLL|x64.ActiveCfg = Release|x64 {81643723-BBFA-AA83-B6AC-9FF770B4ED34}.Release-DLL|x64.Build.0 = Release|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug|Win32.ActiveCfg = Debug|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug|x64.ActiveCfg = Debug|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release|Win32.ActiveCfg = Release|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release|x64.ActiveCfg = Release|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug|Win32.Build.0 = Debug|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug|x64.Build.0 = Debug|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release|Win32.Build.0 = Release|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release|x64.Build.0 = Release|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Debug-DLL|x64.Build.0 = Debug|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release-DLL|Win32.Build.0 = Release|Win32 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release-DLL|x64.ActiveCfg = Release|x64 + {0B07D219-39A5-729B-EB0F-8B81E562D808}.Release-DLL|x64.Build.0 = Release|x64 {45EED825-B3C0-63AE-43FE-CFA8DD3164EC}.Debug|Win32.ActiveCfg = Debug|Win32 {45EED825-B3C0-63AE-43FE-CFA8DD3164EC}.Debug|x64.ActiveCfg = Debug|x64 {45EED825-B3C0-63AE-43FE-CFA8DD3164EC}.Release|Win32.ActiveCfg = Release|Win32 @@ -15732,6 +16132,22 @@ Global {82D02001-4051-0130-886D-6EED6E8180D9}.Release-DLL|Win32.Build.0 = Release|Win32 {82D02001-4051-0130-886D-6EED6E8180D9}.Release-DLL|x64.ActiveCfg = Release|x64 {82D02001-4051-0130-886D-6EED6E8180D9}.Release-DLL|x64.Build.0 = Release|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug|x64.ActiveCfg = Debug|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release|Win32.ActiveCfg = Release|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release|x64.ActiveCfg = Release|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug|Win32.Build.0 = Debug|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug|x64.Build.0 = Debug|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release|Win32.Build.0 = Release|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release|x64.Build.0 = Release|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Debug-DLL|x64.Build.0 = Debug|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release-DLL|Win32.Build.0 = Release|Win32 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release-DLL|x64.ActiveCfg = Release|x64 + {856DAD36-A161-9876-9548-48D06BFA35C1}.Release-DLL|x64.Build.0 = Release|x64 {CB6E0DFE-7AA8-5F3A-431E-5D769E9339F7}.Debug|Win32.ActiveCfg = Debug|Win32 {CB6E0DFE-7AA8-5F3A-431E-5D769E9339F7}.Debug|x64.ActiveCfg = Debug|x64 {CB6E0DFE-7AA8-5F3A-431E-5D769E9339F7}.Release|Win32.ActiveCfg = Release|Win32 @@ -16260,6 +16676,22 @@ Global {CA455E92-D8D7-BB7C-E8DD-82C2234AEA6C}.Release-DLL|Win32.Build.0 = Release|Win32 {CA455E92-D8D7-BB7C-E8DD-82C2234AEA6C}.Release-DLL|x64.ActiveCfg = Release|x64 {CA455E92-D8D7-BB7C-E8DD-82C2234AEA6C}.Release-DLL|x64.Build.0 = Release|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug|Win32.ActiveCfg = Debug|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug|x64.ActiveCfg = Debug|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release|Win32.ActiveCfg = Release|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release|x64.ActiveCfg = Release|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug|Win32.Build.0 = Debug|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug|x64.Build.0 = Debug|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release|Win32.Build.0 = Release|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release|x64.Build.0 = Release|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Debug-DLL|x64.Build.0 = Debug|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release-DLL|Win32.Build.0 = Release|Win32 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release-DLL|x64.ActiveCfg = Release|x64 + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE}.Release-DLL|x64.Build.0 = Release|x64 {93FEEB88-7D7A-F70F-0EB5-54B37F7C6866}.Debug|Win32.ActiveCfg = Debug|Win32 {93FEEB88-7D7A-F70F-0EB5-54B37F7C6866}.Debug|x64.ActiveCfg = Debug|x64 {93FEEB88-7D7A-F70F-0EB5-54B37F7C6866}.Release|Win32.ActiveCfg = Release|Win32 @@ -16788,6 +17220,22 @@ Global {359D18A0-DEE3-EDD5-1C4C-662EC638C910}.Release-DLL|Win32.Build.0 = Release|Win32 {359D18A0-DEE3-EDD5-1C4C-662EC638C910}.Release-DLL|x64.ActiveCfg = Release|x64 {359D18A0-DEE3-EDD5-1C4C-662EC638C910}.Release-DLL|x64.Build.0 = Release|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug|Win32.ActiveCfg = Debug|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug|x64.ActiveCfg = Debug|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release|Win32.ActiveCfg = Release|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release|x64.ActiveCfg = Release|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug|Win32.Build.0 = Debug|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug|x64.Build.0 = Debug|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release|Win32.Build.0 = Release|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release|x64.Build.0 = Release|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Debug-DLL|x64.Build.0 = Debug|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release-DLL|Win32.Build.0 = Release|Win32 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release-DLL|x64.ActiveCfg = Release|x64 + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE}.Release-DLL|x64.Build.0 = Release|x64 {7B5AE7B2-6D7E-D97F-A6A4-721C7446171F}.Debug|Win32.ActiveCfg = Debug|Win32 {7B5AE7B2-6D7E-D97F-A6A4-721C7446171F}.Debug|x64.ActiveCfg = Debug|x64 {7B5AE7B2-6D7E-D97F-A6A4-721C7446171F}.Release|Win32.ActiveCfg = Release|Win32 @@ -17332,6 +17780,22 @@ Global {E6C18E4E-ABC4-1C26-BAD6-67F92B80942F}.Release-DLL|Win32.Build.0 = Release|Win32 {E6C18E4E-ABC4-1C26-BAD6-67F92B80942F}.Release-DLL|x64.ActiveCfg = Release|x64 {E6C18E4E-ABC4-1C26-BAD6-67F92B80942F}.Release-DLL|x64.Build.0 = Release|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug|Win32.ActiveCfg = Debug|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug|x64.ActiveCfg = Debug|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release|Win32.ActiveCfg = Release|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release|x64.ActiveCfg = Release|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug|Win32.Build.0 = Debug|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug|x64.Build.0 = Debug|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release|Win32.Build.0 = Release|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release|x64.Build.0 = Release|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Debug-DLL|x64.Build.0 = Debug|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release-DLL|Win32.Build.0 = Release|Win32 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release-DLL|x64.ActiveCfg = Release|x64 + {5A641212-7C59-E552-0ED6-F05F710DD4F5}.Release-DLL|x64.Build.0 = Release|x64 {C3A6661F-806B-BDE6-AF91-032175B443F8}.Debug|Win32.ActiveCfg = Debug|Win32 {C3A6661F-806B-BDE6-AF91-032175B443F8}.Debug|x64.ActiveCfg = Debug|x64 {C3A6661F-806B-BDE6-AF91-032175B443F8}.Release|Win32.ActiveCfg = Release|Win32 @@ -17876,6 +18340,22 @@ Global {FDA69240-B598-500E-8E6E-741A1290ECB9}.Release-DLL|Win32.Build.0 = Release|Win32 {FDA69240-B598-500E-8E6E-741A1290ECB9}.Release-DLL|x64.ActiveCfg = Release|x64 {FDA69240-B598-500E-8E6E-741A1290ECB9}.Release-DLL|x64.Build.0 = Release|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug|x64.ActiveCfg = Debug|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release|Win32.ActiveCfg = Release|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release|x64.ActiveCfg = Release|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug|Win32.Build.0 = Debug|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug|x64.Build.0 = Debug|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release|Win32.Build.0 = Release|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release|x64.Build.0 = Release|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Debug-DLL|x64.Build.0 = Debug|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release-DLL|Win32.Build.0 = Release|Win32 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release-DLL|x64.ActiveCfg = Release|x64 + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1}.Release-DLL|x64.Build.0 = Release|x64 {96C59CF1-6E80-B88D-D99C-0AA4C32F6562}.Debug|Win32.ActiveCfg = Debug|Win32 {96C59CF1-6E80-B88D-D99C-0AA4C32F6562}.Debug|x64.ActiveCfg = Debug|x64 {96C59CF1-6E80-B88D-D99C-0AA4C32F6562}.Release|Win32.ActiveCfg = Release|Win32 @@ -18388,6 +18868,22 @@ Global {28D5A18F-7282-4ABA-C473-557169030B99}.Release-DLL|Win32.Build.0 = Release|Win32 {28D5A18F-7282-4ABA-C473-557169030B99}.Release-DLL|x64.ActiveCfg = Release|x64 {28D5A18F-7282-4ABA-C473-557169030B99}.Release-DLL|x64.Build.0 = Release|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug|Win32.ActiveCfg = Debug|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug|x64.ActiveCfg = Debug|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release|Win32.ActiveCfg = Release|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release|x64.ActiveCfg = Release|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug|Win32.Build.0 = Debug|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug|x64.Build.0 = Debug|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release|Win32.Build.0 = Release|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release|x64.Build.0 = Release|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Debug-DLL|x64.Build.0 = Debug|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release-DLL|Win32.Build.0 = Release|Win32 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release-DLL|x64.ActiveCfg = Release|x64 + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215}.Release-DLL|x64.Build.0 = Release|x64 {87C60ADD-6100-48B9-1C29-5679E54A72CD}.Debug|Win32.ActiveCfg = Debug|Win32 {87C60ADD-6100-48B9-1C29-5679E54A72CD}.Debug|x64.ActiveCfg = Debug|x64 {87C60ADD-6100-48B9-1C29-5679E54A72CD}.Release|Win32.ActiveCfg = Release|Win32 @@ -18852,6 +19348,22 @@ Global {D4F84CA0-7020-BDD6-2EB8-2F773A7884A5}.Release-DLL|Win32.Build.0 = Release|Win32 {D4F84CA0-7020-BDD6-2EB8-2F773A7884A5}.Release-DLL|x64.ActiveCfg = Release|x64 {D4F84CA0-7020-BDD6-2EB8-2F773A7884A5}.Release-DLL|x64.Build.0 = Release|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug|Win32.ActiveCfg = Debug|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug|x64.ActiveCfg = Debug|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release|Win32.ActiveCfg = Release|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release|x64.ActiveCfg = Release|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug|Win32.Build.0 = Debug|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug|x64.Build.0 = Debug|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release|Win32.Build.0 = Release|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release|x64.Build.0 = Release|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Debug-DLL|x64.Build.0 = Debug|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release-DLL|Win32.Build.0 = Release|Win32 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release-DLL|x64.ActiveCfg = Release|x64 + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4}.Release-DLL|x64.Build.0 = Release|x64 {8BF0F1D5-3CF2-DFFD-D74D-E2D7D06A65AC}.Debug|Win32.ActiveCfg = Debug|Win32 {8BF0F1D5-3CF2-DFFD-D74D-E2D7D06A65AC}.Debug|x64.ActiveCfg = Debug|x64 {8BF0F1D5-3CF2-DFFD-D74D-E2D7D06A65AC}.Release|Win32.ActiveCfg = Release|Win32 @@ -19332,6 +19844,22 @@ Global {E2F977D5-8F83-8CE5-42F9-E3F007075391}.Release-DLL|Win32.Build.0 = Release|Win32 {E2F977D5-8F83-8CE5-42F9-E3F007075391}.Release-DLL|x64.ActiveCfg = Release|x64 {E2F977D5-8F83-8CE5-42F9-E3F007075391}.Release-DLL|x64.Build.0 = Release|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug|Win32.ActiveCfg = Debug|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug|x64.ActiveCfg = Debug|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release|Win32.ActiveCfg = Release|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release|x64.ActiveCfg = Release|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug|Win32.Build.0 = Debug|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug|x64.Build.0 = Debug|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release|Win32.Build.0 = Release|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release|x64.Build.0 = Release|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Debug-DLL|x64.Build.0 = Debug|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release-DLL|Win32.Build.0 = Release|Win32 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release-DLL|x64.ActiveCfg = Release|x64 + {C8C775E0-9098-D767-2452-211978E7C0EA}.Release-DLL|x64.Build.0 = Release|x64 {5957731C-42D1-29EE-AD1C-E372613C2575}.Debug|Win32.ActiveCfg = Debug|Win32 {5957731C-42D1-29EE-AD1C-E372613C2575}.Debug|x64.ActiveCfg = Debug|x64 {5957731C-42D1-29EE-AD1C-E372613C2575}.Release|Win32.ActiveCfg = Release|Win32 @@ -19812,6 +20340,22 @@ Global {0ACE1393-1D1C-9563-2EFD-258C38B2C5A5}.Release-DLL|Win32.Build.0 = Release|Win32 {0ACE1393-1D1C-9563-2EFD-258C38B2C5A5}.Release-DLL|x64.ActiveCfg = Release|x64 {0ACE1393-1D1C-9563-2EFD-258C38B2C5A5}.Release-DLL|x64.Build.0 = Release|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug|Win32.ActiveCfg = Debug|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug|x64.ActiveCfg = Debug|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release|Win32.ActiveCfg = Release|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release|x64.ActiveCfg = Release|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug|Win32.Build.0 = Debug|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug|x64.Build.0 = Debug|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release|Win32.Build.0 = Release|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release|x64.Build.0 = Release|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Debug-DLL|x64.Build.0 = Debug|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release-DLL|Win32.Build.0 = Release|Win32 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release-DLL|x64.ActiveCfg = Release|x64 + {93AF9D45-51B5-A902-4537-709FE4ED9830}.Release-DLL|x64.Build.0 = Release|x64 {0733C2AA-D898-7145-3F2E-6304DC428C5F}.Debug|Win32.ActiveCfg = Debug|Win32 {0733C2AA-D898-7145-3F2E-6304DC428C5F}.Debug|x64.ActiveCfg = Debug|x64 {0733C2AA-D898-7145-3F2E-6304DC428C5F}.Release|Win32.ActiveCfg = Release|Win32 @@ -20340,6 +20884,22 @@ Global {90CCC199-D242-7546-C1C0-4AA6899703DE}.Release-DLL|Win32.Build.0 = Release|Win32 {90CCC199-D242-7546-C1C0-4AA6899703DE}.Release-DLL|x64.ActiveCfg = Release|x64 {90CCC199-D242-7546-C1C0-4AA6899703DE}.Release-DLL|x64.Build.0 = Release|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug|Win32.ActiveCfg = Debug|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug|x64.ActiveCfg = Debug|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release|Win32.ActiveCfg = Release|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release|x64.ActiveCfg = Release|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug|Win32.Build.0 = Debug|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug|x64.Build.0 = Debug|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release|Win32.Build.0 = Release|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release|x64.Build.0 = Release|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Debug-DLL|x64.Build.0 = Debug|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release-DLL|Win32.Build.0 = Release|Win32 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release-DLL|x64.ActiveCfg = Release|x64 + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1}.Release-DLL|x64.Build.0 = Release|x64 {0EC09350-0FB9-0208-000E-1B6C534B234C}.Debug|Win32.ActiveCfg = Debug|Win32 {0EC09350-0FB9-0208-000E-1B6C534B234C}.Debug|x64.ActiveCfg = Debug|x64 {0EC09350-0FB9-0208-000E-1B6C534B234C}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj b/vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj new file mode 100644 index 0000000000..41c5b93d9b --- /dev/null +++ b/vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj @@ -0,0 +1,167 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + + v100 + + + v110 + + + v120 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + end2end_test_hpack_size + + + end2end_test_hpack_size + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Windows + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Windows + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Windows + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Windows + true + false + true + true + + + + + + + + + + + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj.filters b/vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj.filters new file mode 100644 index 0000000000..03caae6add --- /dev/null +++ b/vsprojects/vcxproj/test/end2end_test_hpack_size/end2end_test_hpack_size.vcxproj.filters @@ -0,0 +1,32 @@ + + + + + test\core\end2end\tests + + + + + test\core\end2end\tests + + + test\core\end2end + + + + + + {c23a0719-53a2-0560-4016-2e8869dd4787} + + + {061c394d-81e8-0ac3-7a25-ab563ba0abe3} + + + {8b8f1aa7-7645-4372-1d8a-61cda8284353} + + + {aa7c2d3e-58e5-6898-fb3a-ba5e8868ea09} + + + + diff --git a/vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj b/vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj new file mode 100644 index 0000000000..116bf2fb9c --- /dev/null +++ b/vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj @@ -0,0 +1,190 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5A641212-7C59-E552-0ED6-F05F710DD4F5} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_compress_hpack_size_nosec_test + static + Debug + Debug + + + h2_compress_hpack_size_nosec_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {C5D3C9A9-C0D2-CBAD-B433-710C5E89AE31} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_compress_hpack_size_nosec_test/h2_compress_hpack_size_nosec_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj new file mode 100644 index 0000000000..61c35e5b8d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8E7B2D33-360B-9A26-8BFD-1BAD10769F33} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_compress_hpack_size_test + static + Debug + Debug + + + h2_compress_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {C5D3C9A9-C0D2-CBAD-B433-710C5E89AE31} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_compress_hpack_size_test/h2_compress_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj new file mode 100644 index 0000000000..e7c3a52cdc --- /dev/null +++ b/vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5CDFA7CB-09E1-E01E-E21D-7446146478CC} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_fakesec_hpack_size_test + static + Debug + Debug + + + h2_fakesec_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {096ABF91-FEC8-9AC9-B877-C683BFD51984} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_fakesec_hpack_size_test/h2_fakesec_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj b/vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj new file mode 100644 index 0000000000..03b06164a4 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj @@ -0,0 +1,190 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C355D9BD-F3C7-CA89-E125-44D1BAEE22C1} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_full_hpack_size_nosec_test + static + Debug + Debug + + + h2_full_hpack_size_nosec_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {882B2933-F340-7027-7090-28CEAE9F1BE6} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_full_hpack_size_nosec_test/h2_full_hpack_size_nosec_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj new file mode 100644 index 0000000000..9e7fb88b71 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C655AED5-AF53-D09E-A8EA-60AE0F2D149A} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_full_hpack_size_test + static + Debug + Debug + + + h2_full_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {882B2933-F340-7027-7090-28CEAE9F1BE6} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_full_hpack_size_test/h2_full_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj new file mode 100644 index 0000000000..82c49fe85e --- /dev/null +++ b/vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CA3C2D7E-58C7-C05E-6D3B-70383020D8C2} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_oauth2_hpack_size_test + static + Debug + Debug + + + h2_oauth2_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {DDFE4EB8-CCD3-DA3F-461A-10F1B94D26AF} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_oauth2_hpack_size_test/h2_oauth2_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj b/vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj new file mode 100644 index 0000000000..ceacd06533 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj @@ -0,0 +1,190 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DCBBBECF-EC53-4E01-A866-1FA5F8AAD215} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_proxy_hpack_size_nosec_test + static + Debug + Debug + + + h2_proxy_hpack_size_nosec_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {B8266C40-E74E-316E-4DEF-0B2A4B6F490F} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_proxy_hpack_size_nosec_test/h2_proxy_hpack_size_nosec_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj new file mode 100644 index 0000000000..c5dbf97864 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D590F4D6-081E-4D6D-3F5C-592D7727208E} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_proxy_hpack_size_test + static + Debug + Debug + + + h2_proxy_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {B8266C40-E74E-316E-4DEF-0B2A4B6F490F} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_proxy_hpack_size_test/h2_proxy_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj new file mode 100644 index 0000000000..3cf4e2db5a --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj @@ -0,0 +1,190 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C8C775E0-9098-D767-2452-211978E7C0EA} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_sockpair+trace_hpack_size_nosec_test + static + Debug + Debug + + + h2_sockpair+trace_hpack_size_nosec_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {FE71A3F7-4B15-1570-B0BA-9E1A053DAA4A} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_nosec_test/h2_sockpair+trace_hpack_size_nosec_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj new file mode 100644 index 0000000000..ea22a8109e --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5E41FB8C-FFF8-2568-6E0F-56FD07AC4336} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_sockpair+trace_hpack_size_test + static + Debug + Debug + + + h2_sockpair+trace_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {FE71A3F7-4B15-1570-B0BA-9E1A053DAA4A} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair+trace_hpack_size_test/h2_sockpair+trace_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj new file mode 100644 index 0000000000..c5a13ad91a --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj @@ -0,0 +1,190 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {93AF9D45-51B5-A902-4537-709FE4ED9830} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_sockpair_1byte_hpack_size_nosec_test + static + Debug + Debug + + + h2_sockpair_1byte_hpack_size_nosec_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {B0F4BF34-3C82-EB67-990E-959CDDBEB734} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_nosec_test/h2_sockpair_1byte_hpack_size_nosec_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj new file mode 100644 index 0000000000..de13e2666b --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0B07D219-39A5-729B-EB0F-8B81E562D808} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_sockpair_1byte_hpack_size_test + static + Debug + Debug + + + h2_sockpair_1byte_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {B0F4BF34-3C82-EB67-990E-959CDDBEB734} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_1byte_hpack_size_test/h2_sockpair_1byte_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj new file mode 100644 index 0000000000..fedcff890a --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj @@ -0,0 +1,190 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B35C9AC3-8160-BFCA-2EA7-0413A7A45EC4} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_sockpair_hpack_size_nosec_test + static + Debug + Debug + + + h2_sockpair_hpack_size_nosec_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {67A1675D-FF50-3B78-2706-155D69ADC290} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_nosec_test/h2_sockpair_hpack_size_nosec_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj new file mode 100644 index 0000000000..744cb13d02 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E96735FF-B1CF-51D2-1923-53292AF72C4E} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_sockpair_hpack_size_test + static + Debug + Debug + + + h2_sockpair_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {67A1675D-FF50-3B78-2706-155D69ADC290} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_sockpair_hpack_size_test/h2_sockpair_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj new file mode 100644 index 0000000000..2ff0f47301 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {856DAD36-A161-9876-9548-48D06BFA35C1} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_ssl_hpack_size_test + static + Debug + Debug + + + h2_ssl_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {207BE5BC-25D7-1D2A-C76E-279DB66A1205} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_ssl_hpack_size_test/h2_ssl_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj new file mode 100644 index 0000000000..4c4cb859f1 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BFE6A97D-1DB8-1FEB-9312-70E7D2D40EBE} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_ssl_proxy_hpack_size_test + static + Debug + Debug + + + h2_ssl_proxy_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {5EAD0E6C-5DD6-A466-FF6B-F73200AF89E1} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_ssl_proxy_hpack_size_test/h2_ssl_proxy_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj new file mode 100644 index 0000000000..6985300e80 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj @@ -0,0 +1,190 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {EA53DB0D-8BA3-3BCC-10E1-8B5FACB77CA1} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_uchannel_hpack_size_nosec_test + static + Debug + Debug + + + h2_uchannel_hpack_size_nosec_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {CE17F95F-4FD3-41C3-E1B9-9B85F1FE7D4A} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_nosec_test/h2_uchannel_hpack_size_nosec_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj new file mode 100644 index 0000000000..3b73900945 --- /dev/null +++ b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9CFB3202-D95F-E541-9A6F-BE561CAFE1AE} + + + + v100 + + + v110 + + + v120 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_uchannel_hpack_size_test + static + Debug + Debug + + + h2_uchannel_hpack_size_test + static + Debug + Debug + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + + + Console + true + false + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + None + + + Console + true + false + true + true + + + + + + + + + {CE17F95F-4FD3-41C3-E1B9-9B85F1FE7D4A} + + + {22A644D5-9A2B-4EF8-7792-AEB0C66A10E5} + + + {80EA2691-C037-6DD3-D3AB-21510BF0E64B} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj.filters b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj.filters new file mode 100644 index 0000000000..00e4276f1d --- /dev/null +++ b/vsprojects/vcxproj/test/h2_uchannel_hpack_size_test/h2_uchannel_hpack_size_test.vcxproj.filters @@ -0,0 +1,7 @@ + + + + + + + -- cgit v1.2.3 From 717805f5707295a8b873fac48bbc37f154f78e0e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 08:45:17 +0000 Subject: Fix use-after-free --- src/core/transport/chttp2/hpack_table.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index fde74b3acd..be18be748c 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -240,6 +240,7 @@ static void rebuild_ents(grpc_chttp2_hptbl *tbl, gpr_uint32 new_cap) { ents[i] = tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]; } gpr_free(tbl->ents); + tbl->ents = ents; tbl->cap_entries = new_cap; tbl->first_ent = 0; } -- cgit v1.2.3 From 308bbb2c4b7ea8ff04d0c87bd04456e5e28b6134 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 08:53:15 +0000 Subject: Add missing free --- src/core/transport/chttp2/hpack_table.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core') diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index be18be748c..e47793f230 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -199,6 +199,7 @@ void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl *tbl) { GRPC_MDELEM_UNREF( tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]); } + gpr_free(tbl->ents); } grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, -- cgit v1.2.3 From 895f14d38176bca1a4146e9d0fb6d80f40647545 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 09:30:39 +0000 Subject: Fix memory leak --- src/core/transport/chttp2/hpack_parser.c | 1 - src/core/transport/chttp2/hpack_table.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index 6d3c340a8a..0f90f08b9c 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -627,7 +627,6 @@ static const gpr_uint8 inverse_base64[256] = { static int on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, int add_to_table) { if (add_to_table) { - GRPC_MDELEM_REF(md); if (!grpc_chttp2_hptbl_add(&p->table, md)) { return 0; } diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index e47793f230..e7cec99be1 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -316,7 +316,7 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { } /* copy the finalized entry in */ - tbl->ents[tbl->last_ent] = md; + tbl->ents[tbl->last_ent] = GRPC_MDELEM_REF(md); /* update accounting values */ tbl->last_ent = -- cgit v1.2.3 From 1481237f2cd840f7673c304a697b5898c0cdca3c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 14:10:00 +0000 Subject: Add missing casts --- src/core/transport/chttp2/hpack_table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index e7cec99be1..a94fdb994d 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -226,7 +226,7 @@ static void evict1(grpc_chttp2_hptbl *tbl) { GPR_SLICE_LENGTH(first_ent->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; GPR_ASSERT(elem_bytes <= tbl->mem_used); - tbl->mem_used -= elem_bytes; + tbl->mem_used -= (gpr_uint32)elem_bytes; tbl->first_ent = ((tbl->first_ent + 1) % tbl->cap_entries); tbl->num_ents--; @@ -322,7 +322,7 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { tbl->last_ent = ((tbl->last_ent + 1) % tbl->cap_entries); tbl->num_ents++; - tbl->mem_used += elem_bytes; + tbl->mem_used += (gpr_uint32)elem_bytes; return 1; } -- cgit v1.2.3 From 3c53bb2f4680254a5e50228184ab8c2abae453f0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 14:24:36 +0000 Subject: clang-format --- src/core/client_config/subchannel.h | 6 +- src/core/iomgr/pollset_windows.c | 3 +- src/core/surface/byte_buffer_reader.c | 1 - src/core/transport/chttp2/hpack_encoder.c | 34 +- src/core/transport/chttp2/hpack_encoder.h | 8 +- src/core/transport/chttp2/hpack_parser.c | 56 +-- src/core/transport/chttp2/hpack_table.c | 40 +- src/core/transport/chttp2/hpack_table.h | 9 +- src/core/transport/chttp2/parsing.c | 8 +- src/core/transport/chttp2/writing.c | 11 +- src/core/transport/chttp2_transport.c | 33 +- test/core/client_config/lb_policies_test.c | 18 +- test/core/end2end/tests/cancel_with_status.c | 3 +- test/core/end2end/tests/hpack_size.c | 401 ++++++++++----------- test/core/end2end/tests/negative_deadline.c | 3 +- test/core/network_benchmarks/low_level_ping_pong.c | 8 +- test/core/surface/byte_buffer_reader_test.c | 4 +- test/core/transport/chttp2/hpack_table_test.c | 16 +- test/cpp/qps/client.h | 46 +-- 19 files changed, 365 insertions(+), 343 deletions(-) (limited to 'src/core') diff --git a/src/core/client_config/subchannel.h b/src/core/client_config/subchannel.h index 1fefa1888a..381b7689b8 100644 --- a/src/core/client_config/subchannel.h +++ b/src/core/client_config/subchannel.h @@ -77,10 +77,10 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, /** construct a subchannel call (possibly asynchronously). * - * If the returned status is 1, the call will return immediately and \a target - * will point to a connected \a subchannel_call instance. Note that \a notify + * If the returned status is 1, the call will return immediately and \a target + * will point to a connected \a subchannel_call instance. Note that \a notify * will \em not be invoked in this case. - * Otherwise, if the returned status is 0, the subchannel call will be created + * Otherwise, if the returned status is 0, the subchannel call will be created * asynchronously, invoking the \a notify callback upon completion. */ int grpc_subchannel_create_call(grpc_exec_ctx *exec_ctx, grpc_subchannel *subchannel, diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index c3f310ee27..deb661548d 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -126,7 +126,8 @@ void grpc_pollset_destroy(grpc_pollset *pollset) {} void grpc_pollset_reset(grpc_pollset *pollset) { GPR_ASSERT(pollset->shutting_down); - GPR_ASSERT(!has_workers(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET)); + GPR_ASSERT( + !has_workers(&pollset->root_worker, GRPC_POLLSET_WORKER_LINK_POLLSET)); pollset->shutting_down = 0; pollset->is_iocp_worker = 0; pollset->kicked_without_pollers = 0; diff --git a/src/core/surface/byte_buffer_reader.c b/src/core/surface/byte_buffer_reader.c index 9f830df68c..57417f41b0 100644 --- a/src/core/surface/byte_buffer_reader.c +++ b/src/core/surface/byte_buffer_reader.c @@ -121,4 +121,3 @@ gpr_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) { } return out_slice; } - diff --git a/src/core/transport/chttp2/hpack_encoder.c b/src/core/transport/chttp2/hpack_encoder.c index 7ec5a4fb2d..f89159bad1 100644 --- a/src/core/transport/chttp2/hpack_encoder.c +++ b/src/core/transport/chttp2/hpack_encoder.c @@ -160,13 +160,11 @@ static void evict_entry(grpc_chttp2_hpack_compressor *c) { c->tail_remote_index++; GPR_ASSERT(c->tail_remote_index > 0); GPR_ASSERT(c->table_size >= - c->table_elem_size[c->tail_remote_index % - c->cap_table_elems]); + c->table_elem_size[c->tail_remote_index % c->cap_table_elems]); GPR_ASSERT(c->table_elems > 0); - c->table_size = - (gpr_uint16)(c->table_size - - c->table_elem_size[c->tail_remote_index % - c->cap_table_elems]); + c->table_size = (gpr_uint16)( + c->table_size - + c->table_elem_size[c->tail_remote_index % c->cap_table_elems]); c->table_elems--; } @@ -194,8 +192,7 @@ static void add_elem(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem) { evict_entry(c); } GPR_ASSERT(c->table_elems < c->max_table_size); - c->table_elem_size[new_index % c->cap_table_elems] = - (gpr_uint16)elem_size; + c->table_elem_size[new_index % c->cap_table_elems] = (gpr_uint16)elem_size; c->table_size = (gpr_uint16)(c->table_size + elem_size); c->table_elems++; @@ -341,9 +338,11 @@ static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, add_header_data(st, gpr_slice_ref(value_slice)); } -static void emit_advertise_table_size_change(grpc_chttp2_hpack_compressor *c, framer_state *st) { +static void emit_advertise_table_size_change(grpc_chttp2_hpack_compressor *c, + framer_state *st) { gpr_uint32 len = GRPC_CHTTP2_VARINT_LENGTH(c->max_table_size, 3); - GRPC_CHTTP2_WRITE_VARINT(c->max_table_size, 3, 0x20, add_tiny_header_data(st, len), len); + GRPC_CHTTP2_WRITE_VARINT(c->max_table_size, 3, 0x20, + add_tiny_header_data(st, len), len); c->advertise_table_size_change = 0; } @@ -477,8 +476,10 @@ void grpc_chttp2_hpack_compressor_init(grpc_chttp2_hpack_compressor *c, c->max_table_size = GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE; c->cap_table_elems = c->max_table_elems = elems_for_bytes(c->max_table_size); c->max_usable_size = GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE; - c->table_elem_size = gpr_malloc(sizeof(*c->table_elem_size) * c->cap_table_elems); - memset(c->table_elem_size, 0, sizeof(*c->table_elem_size) * c->cap_table_elems); + c->table_elem_size = + gpr_malloc(sizeof(*c->table_elem_size) * c->cap_table_elems); + memset(c->table_elem_size, 0, + sizeof(*c->table_elem_size) * c->cap_table_elems); } void grpc_chttp2_hpack_compressor_destroy(grpc_chttp2_hpack_compressor *c) { @@ -491,16 +492,19 @@ void grpc_chttp2_hpack_compressor_destroy(grpc_chttp2_hpack_compressor *c) { gpr_free(c->table_elem_size); } -void grpc_chttp2_hpack_compressor_set_max_usable_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size) { +void grpc_chttp2_hpack_compressor_set_max_usable_size( + grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size) { c->max_usable_size = max_table_size; - grpc_chttp2_hpack_compressor_set_max_table_size(c, GPR_MIN(c->max_table_size, max_table_size)); + grpc_chttp2_hpack_compressor_set_max_table_size( + c, GPR_MIN(c->max_table_size, max_table_size)); } static void rebuild_elems(grpc_chttp2_hpack_compressor *c, gpr_uint32 new_cap) { } -void grpc_chttp2_hpack_compressor_set_max_table_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size) { +void grpc_chttp2_hpack_compressor_set_max_table_size( + grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size) { max_table_size = GPR_MIN(max_table_size, c->max_usable_size); if (max_table_size == c->max_table_size) { return; diff --git a/src/core/transport/chttp2/hpack_encoder.h b/src/core/transport/chttp2/hpack_encoder.h index ff32b08d60..ce83d101f2 100644 --- a/src/core/transport/chttp2/hpack_encoder.h +++ b/src/core/transport/chttp2/hpack_encoder.h @@ -46,7 +46,7 @@ /* initial table size, per spec */ #define GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE 4096 /* maximum table size we'll actually use */ -#define GRPC_CHTTP2_HPACKC_MAX_TABLE_SIZE (1024*1024) +#define GRPC_CHTTP2_HPACKC_MAX_TABLE_SIZE (1024 * 1024) typedef struct { gpr_uint32 filter_elems_sum; @@ -89,8 +89,10 @@ typedef struct { void grpc_chttp2_hpack_compressor_init(grpc_chttp2_hpack_compressor *c, grpc_mdctx *mdctx); void grpc_chttp2_hpack_compressor_destroy(grpc_chttp2_hpack_compressor *c); -void grpc_chttp2_hpack_compressor_set_max_table_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size); -void grpc_chttp2_hpack_compressor_set_max_usable_size(grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size); +void grpc_chttp2_hpack_compressor_set_max_table_size( + grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size); +void grpc_chttp2_hpack_compressor_set_max_usable_size( + grpc_chttp2_hpack_compressor *c, gpr_uint32 max_table_size); void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, gpr_uint32 id, grpc_metadata_batch *metadata, int is_eof, diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c index 0f90f08b9c..57a3a20b1d 100644 --- a/src/core/transport/chttp2/hpack_parser.c +++ b/src/core/transport/chttp2/hpack_parser.c @@ -75,7 +75,7 @@ static int parse_begin(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, static int parse_error(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end); static int parse_illegal_op(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, - const gpr_uint8 *end); + const gpr_uint8 *end); static int parse_string_prefix(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end); @@ -625,7 +625,7 @@ static const gpr_uint8 inverse_base64[256] = { /* emission helpers */ static int on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, - int add_to_table) { + int add_to_table) { if (add_to_table) { if (!grpc_chttp2_hptbl_add(&p->table, md)) { return 0; @@ -750,19 +750,20 @@ static int finish_lithdr_incidx(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, - GRPC_MDSTR_REF(md->key), - take_string(p, &p->value)), - 1) && parse_begin(p, cur, end); + GRPC_MDSTR_REF(md->key), + take_string(p, &p->value)), + 1) && + parse_begin(p, cur, end); } /* finish a literal header with incremental indexing with no index */ static int finish_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, - take_string(p, &p->key), - take_string(p, &p->value)), - 1) && - parse_begin(p, cur, end); + take_string(p, &p->key), + take_string(p, &p->value)), + 1) && + parse_begin(p, cur, end); } /* parse a literal header with incremental indexing; index < 63 */ @@ -802,19 +803,20 @@ static int finish_lithdr_notidx(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, - GRPC_MDSTR_REF(md->key), - take_string(p, &p->value)), - 0) && - parse_begin(p, cur, end); + GRPC_MDSTR_REF(md->key), + take_string(p, &p->value)), + 0) && + parse_begin(p, cur, end); } /* finish a literal header without incremental indexing with index = 0 */ static int finish_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, - take_string(p, &p->key), - take_string(p, &p->value)), - 0) && parse_begin(p, cur, end); + take_string(p, &p->key), + take_string(p, &p->value)), + 0) && + parse_begin(p, cur, end); } /* parse a literal header without incremental indexing; index < 15 */ @@ -854,20 +856,20 @@ static int finish_lithdr_nvridx(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, - GRPC_MDSTR_REF(md->key), - take_string(p, &p->value)), - 0) && - parse_begin(p, cur, end); + GRPC_MDSTR_REF(md->key), + take_string(p, &p->value)), + 0) && + parse_begin(p, cur, end); } /* finish a literal header that is never indexed with an extra value */ static int finish_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { return on_hdr(p, grpc_mdelem_from_metadata_strings(p->table.mdctx, - take_string(p, &p->key), - take_string(p, &p->value)), - 0) && - parse_begin(p, cur, end); + take_string(p, &p->key), + take_string(p, &p->value)), + 0) && + parse_begin(p, cur, end); } /* parse a literal header that is never indexed; index < 15 */ @@ -906,7 +908,8 @@ static int parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, static int finish_max_tbl_size(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { gpr_log(GPR_INFO, "MAX TABLE SIZE: %d", p->index); - return grpc_chttp2_hptbl_set_current_table_size(&p->table, p->index) && parse_begin(p, cur, end); + return grpc_chttp2_hptbl_set_current_table_size(&p->table, p->index) && + parse_begin(p, cur, end); } /* parse a max table size change, max size < 15 */ @@ -934,7 +937,8 @@ static int parse_error(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, return 0; } -static int parse_illegal_op(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, const gpr_uint8 *end) { +static int parse_illegal_op(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur, + const gpr_uint8 *end) { GPR_ASSERT(cur != end); gpr_log(GPR_DEBUG, "Illegal hpack op code %d", *cur); return parse_error(p, cur, end); diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index a94fdb994d..fabc950872 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -172,7 +172,8 @@ static struct { }; static gpr_uint32 entries_for_bytes(gpr_uint32 bytes) { - return (bytes + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD - 1) / GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; + return (bytes + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD - 1) / + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; } void grpc_chttp2_hptbl_init(grpc_chttp2_hptbl *tbl, grpc_mdctx *mdctx) { @@ -180,8 +181,10 @@ void grpc_chttp2_hptbl_init(grpc_chttp2_hptbl *tbl, grpc_mdctx *mdctx) { memset(tbl, 0, sizeof(*tbl)); tbl->mdctx = mdctx; - tbl->current_table_bytes = tbl->max_bytes = GRPC_CHTTP2_INITIAL_HPACK_TABLE_SIZE; - tbl->max_entries = tbl->cap_entries = entries_for_bytes(tbl->current_table_bytes); + tbl->current_table_bytes = tbl->max_bytes = + GRPC_CHTTP2_INITIAL_HPACK_TABLE_SIZE; + tbl->max_entries = tbl->cap_entries = + entries_for_bytes(tbl->current_table_bytes); tbl->ents = gpr_malloc(sizeof(*tbl->ents) * tbl->cap_entries); memset(tbl->ents, 0, sizeof(*tbl->ents) * tbl->cap_entries); for (i = 1; i <= GRPC_CHTTP2_LAST_STATIC_ENTRY; i++) { @@ -196,8 +199,7 @@ void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl *tbl) { GRPC_MDELEM_UNREF(tbl->static_ents[i]); } for (i = 0; i < tbl->num_ents; i++) { - GRPC_MDELEM_UNREF( - tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]); + GRPC_MDELEM_UNREF(tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]); } gpr_free(tbl->ents); } @@ -211,8 +213,8 @@ grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, /* Otherwise, find the value in the list of valid entries */ tbl_index -= (GRPC_CHTTP2_LAST_STATIC_ENTRY + 1); if (tbl_index < tbl->num_ents) { - gpr_uint32 offset = (tbl->num_ents - 1u - tbl_index + tbl->first_ent) % - tbl->cap_entries; + gpr_uint32 offset = + (tbl->num_ents - 1u - tbl_index + tbl->first_ent) % tbl->cap_entries; return tbl->ents[offset]; } /* Invalid entry: return error */ @@ -227,8 +229,7 @@ static void evict1(grpc_chttp2_hptbl *tbl) { GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; GPR_ASSERT(elem_bytes <= tbl->mem_used); tbl->mem_used -= (gpr_uint32)elem_bytes; - tbl->first_ent = - ((tbl->first_ent + 1) % tbl->cap_entries); + tbl->first_ent = ((tbl->first_ent + 1) % tbl->cap_entries); tbl->num_ents--; GRPC_MDELEM_UNREF(first_ent); } @@ -246,7 +247,8 @@ static void rebuild_ents(grpc_chttp2_hptbl *tbl, gpr_uint32 new_cap) { tbl->first_ent = 0; } -void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, gpr_uint32 max_bytes) { +void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, + gpr_uint32 max_bytes) { if (tbl->max_bytes == max_bytes) { return; } @@ -257,12 +259,15 @@ void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, gpr_uint32 max_byte tbl->max_bytes = max_bytes; } -int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, gpr_uint32 bytes) { +int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, + gpr_uint32 bytes) { if (tbl->current_table_bytes == bytes) { return 1; } if (bytes > tbl->max_bytes) { - gpr_log(GPR_ERROR, "Attempt to make hpack table %d bytes when max is %d bytes", bytes, tbl->max_bytes); + gpr_log(GPR_ERROR, + "Attempt to make hpack table %d bytes when max is %d bytes", bytes, + tbl->max_bytes); return 0; } gpr_log(GPR_DEBUG, "Update hpack parser table size to %d", bytes); @@ -289,7 +294,10 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; if (tbl->current_table_bytes > tbl->max_bytes) { - gpr_log(GPR_ERROR, "HPACK max table size reduced to %d but not reflected by hpack stream", tbl->max_bytes); + gpr_log( + GPR_ERROR, + "HPACK max table size reduced to %d but not reflected by hpack stream", + tbl->max_bytes); return 0; } @@ -319,8 +327,7 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { tbl->ents[tbl->last_ent] = GRPC_MDELEM_REF(md); /* update accounting values */ - tbl->last_ent = - ((tbl->last_ent + 1) % tbl->cap_entries); + tbl->last_ent = ((tbl->last_ent + 1) % tbl->cap_entries); tbl->num_ents++; tbl->mem_used += (gpr_uint32)elem_bytes; return 1; @@ -344,8 +351,7 @@ grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( for (i = 0; i < tbl->num_ents; i++) { gpr_uint32 idx = (gpr_uint32)(tbl->num_ents - i + GRPC_CHTTP2_LAST_STATIC_ENTRY); - grpc_mdelem *ent = - tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]; + grpc_mdelem *ent = tbl->ents[(tbl->first_ent + i) % tbl->cap_entries]; if (md->key != ent->key) continue; r.index = idx; r.has_value = md->value == ent->value; diff --git a/src/core/transport/chttp2/hpack_table.h b/src/core/transport/chttp2/hpack_table.h index d3560d34e0..6d506de8a5 100644 --- a/src/core/transport/chttp2/hpack_table.h +++ b/src/core/transport/chttp2/hpack_table.h @@ -88,14 +88,17 @@ typedef struct { /* initialize a hpack table */ void grpc_chttp2_hptbl_init(grpc_chttp2_hptbl *tbl, grpc_mdctx *mdctx); void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl *tbl); -void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, gpr_uint32 max_bytes); -int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, gpr_uint32 bytes); +void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, + gpr_uint32 max_bytes); +int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, + gpr_uint32 bytes); /* lookup a table entry based on its hpack index */ grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, gpr_uint32 index); /* add a table entry to the index */ -int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) GRPC_MUST_USE_RESULT; +int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, + grpc_mdelem *md) GRPC_MUST_USE_RESULT; /* Find a key/value pair in the table... returns the index in the table of the most similar entry, or 0 if the value was not found */ typedef struct { diff --git a/src/core/transport/chttp2/parsing.c b/src/core/transport/chttp2/parsing.c index 9a96a8ef4d..1e06532c03 100644 --- a/src/core/transport/chttp2/parsing.c +++ b/src/core/transport/chttp2/parsing.c @@ -78,7 +78,9 @@ void grpc_chttp2_prepare_to_read( GPR_TIMER_BEGIN("grpc_chttp2_prepare_to_read", 0); transport_parsing->next_stream_id = transport_global->next_stream_id; - transport_parsing->last_sent_max_table_size = transport_global->settings[GRPC_SENT_SETTINGS][GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]; + transport_parsing->last_sent_max_table_size = + transport_global->settings[GRPC_SENT_SETTINGS] + [GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -821,7 +823,9 @@ static int init_settings_frame_parser( } if (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_FLAG_ACK) { transport_parsing->settings_ack_received = 1; - grpc_chttp2_hptbl_set_max_bytes(&transport_parsing->hpack_parser.table, transport_parsing->last_sent_max_table_size); + grpc_chttp2_hptbl_set_max_bytes( + &transport_parsing->hpack_parser.table, + transport_parsing->last_sent_max_table_size); } transport_parsing->parser = grpc_chttp2_settings_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.settings; diff --git a/src/core/transport/chttp2/writing.c b/src/core/transport/chttp2/writing.c index 7fe4d0b6bc..3cb28f8f0c 100644 --- a/src/core/transport/chttp2/writing.c +++ b/src/core/transport/chttp2/writing.c @@ -45,8 +45,7 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx, int grpc_chttp2_unlocking_check_writes( grpc_chttp2_transport_global *transport_global, - grpc_chttp2_transport_writing *transport_writing, - int is_parsing) { + grpc_chttp2_transport_writing *transport_writing, int is_parsing) { grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_writing *stream_writing; @@ -56,11 +55,13 @@ int grpc_chttp2_unlocking_check_writes( gpr_slice_buffer_swap(&transport_global->qbuf, &transport_writing->outbuf); GPR_ASSERT(transport_global->qbuf.count == 0); - grpc_chttp2_hpack_compressor_set_max_table_size(&transport_writing->hpack_compressor, transport_global->settings[GRPC_PEER_SETTINGS][GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]); + grpc_chttp2_hpack_compressor_set_max_table_size( + &transport_writing->hpack_compressor, + transport_global->settings[GRPC_PEER_SETTINGS] + [GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]); if (transport_global->dirtied_local_settings && - !transport_global->sent_local_settings && - !is_parsing) { + !transport_global->sent_local_settings && !is_parsing) { gpr_slice_buffer_add( &transport_writing->outbuf, grpc_chttp2_settings_create( diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 3aa2ef9892..fdd835def9 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -338,21 +338,30 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->global.next_stream_id = (gpr_uint32)channel_args->args[i].value.integer; } - } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER)) { + } else if (0 == strcmp(channel_args->args[i].key, + GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER)) { if (channel_args->args[i].type != GRPC_ARG_INTEGER) { - gpr_log(GPR_ERROR, "%s: must be an integer", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER); + gpr_log(GPR_ERROR, "%s: must be an integer", + GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER); } else if (channel_args->args[i].value.integer < 0) { - gpr_log(GPR_DEBUG, "%s: must be non-negative", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER); + gpr_log(GPR_DEBUG, "%s: must be non-negative", + GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER); } else { - push_setting(t, GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE, (gpr_uint32)channel_args->args[i].value.integer); + push_setting(t, GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE, + (gpr_uint32)channel_args->args[i].value.integer); } - } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER)) { + } else if (0 == strcmp(channel_args->args[i].key, + GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER)) { if (channel_args->args[i].type != GRPC_ARG_INTEGER) { - gpr_log(GPR_ERROR, "%s: must be an integer", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER); + gpr_log(GPR_ERROR, "%s: must be an integer", + GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER); } else if (channel_args->args[i].value.integer < 0) { - gpr_log(GPR_DEBUG, "%s: must be non-negative", GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER); + gpr_log(GPR_DEBUG, "%s: must be non-negative", + GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER); } else { - grpc_chttp2_hpack_compressor_set_max_usable_size(&t->writing.hpack_compressor, (gpr_uint32)channel_args->args[i].value.integer); + grpc_chttp2_hpack_compressor_set_max_usable_size( + &t->writing.hpack_compressor, + (gpr_uint32)channel_args->args[i].value.integer); } } } @@ -579,7 +588,8 @@ static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } static void unlock(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { GPR_TIMER_BEGIN("unlock", 0); if (!t->writing_active && !t->closed && - grpc_chttp2_unlocking_check_writes(&t->global, &t->writing, t->parsing_active)) { + grpc_chttp2_unlocking_check_writes(&t->global, &t->writing, + t->parsing_active)) { t->writing_active = 1; REF_TRANSPORT(t, "writing"); grpc_exec_ctx_enqueue(exec_ctx, &t->writing_action, 1); @@ -827,7 +837,7 @@ static void perform_stream_op_locked( } if (stream_global->write_closed) { grpc_chttp2_complete_closure_step( - exec_ctx, &stream_global->send_trailing_metadata_finished, + exec_ctx, &stream_global->send_trailing_metadata_finished, grpc_metadata_batch_is_empty(op->send_trailing_metadata)); } else if (stream_global->id != 0) { /* TODO(ctiller): check if there's flow control for any outstanding @@ -1054,7 +1064,8 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, to the upper layers - drop what we've got, and then publish what we want - which is safe because we haven't told anyone about the metadata yet */ - if (!stream_global->published_trailing_metadata || stream_global->recv_trailing_metadata_finished != NULL) { + if (!stream_global->published_trailing_metadata || + stream_global->recv_trailing_metadata_finished != NULL) { grpc_mdctx *mdctx = TRANSPORT_FROM_GLOBAL(transport_global)->metadata_context; char status_string[GPR_LTOA_MIN_BUFSIZE]; diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index e44930ed53..8498e1d827 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -135,9 +135,8 @@ static void kill_server(const servers_fixture *f, size_t i) { gpr_log(GPR_INFO, "KILLING SERVER %d", i); GPR_ASSERT(f->servers[i] != NULL); grpc_server_shutdown_and_notify(f->servers[i], f->cq, tag(10000)); - GPR_ASSERT( - grpc_completion_queue_pluck(f->cq, tag(10000), n_millis_time(5000), NULL) - .type == GRPC_OP_COMPLETE); + GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(10000), n_millis_time(5000), + NULL).type == GRPC_OP_COMPLETE); grpc_server_destroy(f->servers[i]); f->servers[i] = NULL; } @@ -203,8 +202,8 @@ static void teardown_servers(servers_fixture *f) { if (f->servers[i] == NULL) continue; grpc_server_shutdown_and_notify(f->servers[i], f->cq, tag(10000)); GPR_ASSERT(grpc_completion_queue_pluck(f->cq, tag(10000), - n_millis_time(5000), NULL) - .type == GRPC_OP_COMPLETE); + n_millis_time(5000), + NULL).type == GRPC_OP_COMPLETE); grpc_server_destroy(f->servers[i]); } grpc_completion_queue_shutdown(f->cq); @@ -269,8 +268,8 @@ int *perform_request(servers_fixture *f, grpc_channel *client, memset(s_valid, 0, f->num_servers * sizeof(int)); c = grpc_channel_create_call(client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq, - "/foo", "foo.test.google.fr", gpr_inf_future(GPR_CLOCK_REALTIME), - NULL); + "/foo", "foo.test.google.fr", + gpr_inf_future(GPR_CLOCK_REALTIME), NULL); GPR_ASSERT(c); completed_client = 0; @@ -303,8 +302,9 @@ int *perform_request(servers_fixture *f, grpc_channel *client, grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL)); s_idx = -1; - while ((ev = grpc_completion_queue_next(f->cq, n_millis_time(s_idx == -1 ? 3000 : 200), NULL)) - .type != GRPC_QUEUE_TIMEOUT) { + while ((ev = grpc_completion_queue_next( + f->cq, n_millis_time(s_idx == -1 ? 3000 : 200), NULL)).type != + GRPC_QUEUE_TIMEOUT) { GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); read_tag = ((int)(gpr_intptr)ev.tag); gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%d", diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c index eecfa83fa4..2005e5f881 100644 --- a/test/core/end2end/tests/cancel_with_status.c +++ b/test/core/end2end/tests/cancel_with_status.c @@ -166,7 +166,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) { cq_verifier_destroy(cqv); } -static void test_invoke_simple_request(grpc_end2end_test_config config, size_t num_ops) { +static void test_invoke_simple_request(grpc_end2end_test_config config, + size_t num_ops) { grpc_end2end_test_fixture f; f = begin_test(config, "test_invoke_simple_request", NULL, NULL); diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c index 3aa69ff996..b52d7067df 100644 --- a/test/core/end2end/tests/hpack_size.c +++ b/test/core/end2end/tests/hpack_size.c @@ -49,196 +49,190 @@ static void *tag(gpr_intptr t) { return (void *)t; } -const char *hobbits[][2] = { - {"Adaldrida", "Brandybuck"}, - {"Adamanta", "Took"}, - {"Adalgrim", "Took"}, - {"Adelard", "Took"}, - {"Amaranth", "Brandybuck"}, - {"Andwise", "Roper"}, - {"Angelica", "Baggins"}, - {"Asphodel", "Burrows"}, - {"Balbo", "Baggins"}, - {"Bandobras", "Took"}, - {"Belba", "Bolger"}, - {"Bell", "Gamgee"}, - {"Belladonna", "Baggins"}, - {"Berylla", "Baggins"}, - {"Bilbo", "Baggins"}, - {"Bilbo", "Gardner"}, - {"Bill", "Butcher"}, - {"Bingo", "Baggins"}, - {"Bodo", "Proudfoot"}, - {"Bowman", "Cotton"}, - {"Bungo", "Baggins"}, - {"Camellia", "Sackville"}, - {"Carl", "Cotton"}, - {"Celandine", "Brandybuck"}, - {"Chica", "Baggins"}, - {"Daddy", "Twofoot"}, - {"Daisy", "Boffin"}, - {"Diamond", "Took"}, - {"Dinodas", "Brandybuck"}, - {"Doderic", "Brandybuck"}, - {"Dodinas", "Brandybuck"}, - {"Donnamira", "Boffin"}, - {"Dora", "Baggins"}, - {"Drogo", "Baggins"}, - {"Dudo", "Baggins"}, - {"Eglantine", "Took"}, - {"Elanor", "Fairbairn"}, - {"Elfstan", "Fairbairn"}, - {"Esmeralda", "Brandybuck"}, - {"Estella", "Brandybuck"}, - {"Everard", "Took"}, - {"Falco", "Chubb-Baggins"}, - {"Faramir", "Took"}, - {"Farmer", "Maggot"}, - {"Fastolph", "Bolger"}, - {"Ferdibrand", "Took"}, - {"Ferdinand", "Took"}, - {"Ferumbras", "Took"}, - {"Ferumbras", "Took"}, - {"Filibert", "Bolger"}, - {"Firiel", "Fairbairn"}, - {"Flambard", "Took"}, - {"Folco", "Boffin"}, - {"Fortinbras", "Took"}, - {"Fortinbras", "Took"}, - {"Fosco", "Baggins"}, - {"Fredegar", "Bolger"}, - {"Frodo", "Baggins"}, - {"Frodo", "Gardner"}, - {"Gerontius", "Took"}, - {"Gilly", "Baggins"}, - {"Goldilocks", "Took"}, - {"Gorbadoc", "Brandybuck"}, - {"Gorbulas", "Brandybuck"}, - {"Gorhendad", "Brandybuck"}, - {"Gormadoc", "Brandybuck"}, - {"Griffo", "Boffin"}, - {"Halfast", "Gamgee"}, - {"Halfred", "Gamgee"}, - {"Halfred", "Greenhand"}, - {"Hanna", "Brandybuck"}, - {"Hamfast", "Gamgee"}, - {"Hamfast", "Gardner"}, - {"Hamson", "Gamgee"}, - {"Harding", "Gardner"}, - {"Hilda", "Brandybuck"}, - {"Hildibrand", "Took"}, - {"Hildifons", "Took"}, - {"Hildigard", "Took"}, - {"Hildigrim", "Took"}, - {"Hob", "Gammidge"}, - {"Hob", "Hayward"}, - {"Hobson", "Gamgee"}, - {"Holfast", "Gardner"}, - {"Holman", "Cotton"}, - {"Holman", "Greenhand"}, - {"Hugo", "Boffin"}, - {"Hugo", "Bracegirdle"}, - {"Ilberic", "Brandybuck"}, - {"Isembard", "Took"}, - {"Isembold", "Took"}, - {"Isengar", "Took"}, - {"Isengrim", "Took"}, - {"Isengrim", "Took"}, - {"Isumbras", "Took"}, - {"Isumbras", "Took"}, - {"Jolly", "Cotton"}, - {"Lalia", "Took"}, - {"Largo", "Baggins"}, - {"Laura", "Baggins"}, - {"Lily", "Goodbody"}, - {"Lily", "Cotton"}, - {"Linda", "Proudfoot"}, - {"Lobelia", "Sackville-Baggins"}, - {"Longo", "Baggins"}, - {"Lotho", "Sackville-Baggins"}, - {"Madoc", "Brandybuck"}, - {"Malva", "Brandybuck"}, - {"Marigold", "Cotton"}, - {"Marmadas", "Brandybuck"}, - {"Marmadoc", "Brandybuck"}, - {"Marroc", "Brandybuck"}, - {"May", "Gamgee"}, - {"Melilot", "Brandybuck"}, - {"Menegilda", "Brandybuck"}, - {"Mentha", "Brandybuck"}, - {"Meriadoc", "Brandybuck"}, - {"Merimac", "Brandybuck"}, - {"Merimas", "Brandybuck"}, - {"Merry", "Gardner"}, - {"Milo", "Burrows"}, - {"Mimosa", "Baggins"}, - {"Minto", "Burrows"}, - {"Mirabella", "Brandybuck"}, - {"Moro", "Burrows"}, - {"Mosco", "Burrows"}, - {"Mungo", "Baggins"}, - {"Myrtle", "Burrows"}, - {"Odo", "Proudfoot"}, - {"Odovacar", "Bolger"}, - {"Olo", "Proudfoot"}, - {"Orgulas", "Brandybuck"}, - {"Otho", "Sackville-Baggins"}, - {"Paladin", "Took"}, - {"Pansy", "Bolger"}, - {"Pearl", "Took"}, - {"Peony", "Burrows"}, - {"Peregrin", "Took"}, - {"Pervinca", "Took"}, - {"Pimpernel", "Took"}, - {"Pippin", "Gardner"}, - {"Polo", "Baggins"}, - {"Ponto", "Baggins"}, - {"Porto", "Baggins"}, - {"Posco", "Baggins"}, - {"Poppy", "Bolger"}, - {"Primrose", "Gardner"}, - {"Primula", "Baggins"}, - {"Prisca", "Bolger"}, - {"Reginard", "Took"}, - {"Robin", "Smallburrow"}, - {"Robin", "Gardner"}, - {"Rorimac", "Brandybuck"}, - {"Rosa", "Took"}, - {"Rosamunda", "Bolger"}, - {"Rose", "Gardner"}, - {"Ruby", "Baggins"}, - {"Ruby", "Gardner"}, - {"Rudigar", "Bolger"}, - {"Rufus", "Burrows"}, - {"Sadoc", "Brandybuck"}, - {"Salvia", "Bolger"}, - {"Samwise", "Gamgee"}, - {"Sancho", "Proudfoot"}, - {"Saradas", "Brandybuck"}, - {"Saradoc", "Brandybuck"}, - {"Seredic", "Brandybuck"}, - {"Sigismond", "Took"}, - {"Smeagol", "Gollum"}, - {"Tanta", "Baggins"}, - {"Ted", "Sandyman"}, - {"Tobold", "Hornblower"}, - {"Togo", "Goodbody"}, - {"Tolman", "Cotton"}, - {"Tolman", "Gardner"}, - {"Widow", "Rumble"}, - {"Wilcome", "Cotton"}, - {"Wilcome", "Cotton"}, - {"Wilibald", "Bolger"}, - {"Will", "Whitfoot"}, - {"Wiseman", "Gamwich"} -}; - -const char *dragons[] = { - "Ancalagon", - "Glaurung", - "Scatha", - "Smaug the Magnificent" -}; +const char *hobbits[][2] = {{"Adaldrida", "Brandybuck"}, + {"Adamanta", "Took"}, + {"Adalgrim", "Took"}, + {"Adelard", "Took"}, + {"Amaranth", "Brandybuck"}, + {"Andwise", "Roper"}, + {"Angelica", "Baggins"}, + {"Asphodel", "Burrows"}, + {"Balbo", "Baggins"}, + {"Bandobras", "Took"}, + {"Belba", "Bolger"}, + {"Bell", "Gamgee"}, + {"Belladonna", "Baggins"}, + {"Berylla", "Baggins"}, + {"Bilbo", "Baggins"}, + {"Bilbo", "Gardner"}, + {"Bill", "Butcher"}, + {"Bingo", "Baggins"}, + {"Bodo", "Proudfoot"}, + {"Bowman", "Cotton"}, + {"Bungo", "Baggins"}, + {"Camellia", "Sackville"}, + {"Carl", "Cotton"}, + {"Celandine", "Brandybuck"}, + {"Chica", "Baggins"}, + {"Daddy", "Twofoot"}, + {"Daisy", "Boffin"}, + {"Diamond", "Took"}, + {"Dinodas", "Brandybuck"}, + {"Doderic", "Brandybuck"}, + {"Dodinas", "Brandybuck"}, + {"Donnamira", "Boffin"}, + {"Dora", "Baggins"}, + {"Drogo", "Baggins"}, + {"Dudo", "Baggins"}, + {"Eglantine", "Took"}, + {"Elanor", "Fairbairn"}, + {"Elfstan", "Fairbairn"}, + {"Esmeralda", "Brandybuck"}, + {"Estella", "Brandybuck"}, + {"Everard", "Took"}, + {"Falco", "Chubb-Baggins"}, + {"Faramir", "Took"}, + {"Farmer", "Maggot"}, + {"Fastolph", "Bolger"}, + {"Ferdibrand", "Took"}, + {"Ferdinand", "Took"}, + {"Ferumbras", "Took"}, + {"Ferumbras", "Took"}, + {"Filibert", "Bolger"}, + {"Firiel", "Fairbairn"}, + {"Flambard", "Took"}, + {"Folco", "Boffin"}, + {"Fortinbras", "Took"}, + {"Fortinbras", "Took"}, + {"Fosco", "Baggins"}, + {"Fredegar", "Bolger"}, + {"Frodo", "Baggins"}, + {"Frodo", "Gardner"}, + {"Gerontius", "Took"}, + {"Gilly", "Baggins"}, + {"Goldilocks", "Took"}, + {"Gorbadoc", "Brandybuck"}, + {"Gorbulas", "Brandybuck"}, + {"Gorhendad", "Brandybuck"}, + {"Gormadoc", "Brandybuck"}, + {"Griffo", "Boffin"}, + {"Halfast", "Gamgee"}, + {"Halfred", "Gamgee"}, + {"Halfred", "Greenhand"}, + {"Hanna", "Brandybuck"}, + {"Hamfast", "Gamgee"}, + {"Hamfast", "Gardner"}, + {"Hamson", "Gamgee"}, + {"Harding", "Gardner"}, + {"Hilda", "Brandybuck"}, + {"Hildibrand", "Took"}, + {"Hildifons", "Took"}, + {"Hildigard", "Took"}, + {"Hildigrim", "Took"}, + {"Hob", "Gammidge"}, + {"Hob", "Hayward"}, + {"Hobson", "Gamgee"}, + {"Holfast", "Gardner"}, + {"Holman", "Cotton"}, + {"Holman", "Greenhand"}, + {"Hugo", "Boffin"}, + {"Hugo", "Bracegirdle"}, + {"Ilberic", "Brandybuck"}, + {"Isembard", "Took"}, + {"Isembold", "Took"}, + {"Isengar", "Took"}, + {"Isengrim", "Took"}, + {"Isengrim", "Took"}, + {"Isumbras", "Took"}, + {"Isumbras", "Took"}, + {"Jolly", "Cotton"}, + {"Lalia", "Took"}, + {"Largo", "Baggins"}, + {"Laura", "Baggins"}, + {"Lily", "Goodbody"}, + {"Lily", "Cotton"}, + {"Linda", "Proudfoot"}, + {"Lobelia", "Sackville-Baggins"}, + {"Longo", "Baggins"}, + {"Lotho", "Sackville-Baggins"}, + {"Madoc", "Brandybuck"}, + {"Malva", "Brandybuck"}, + {"Marigold", "Cotton"}, + {"Marmadas", "Brandybuck"}, + {"Marmadoc", "Brandybuck"}, + {"Marroc", "Brandybuck"}, + {"May", "Gamgee"}, + {"Melilot", "Brandybuck"}, + {"Menegilda", "Brandybuck"}, + {"Mentha", "Brandybuck"}, + {"Meriadoc", "Brandybuck"}, + {"Merimac", "Brandybuck"}, + {"Merimas", "Brandybuck"}, + {"Merry", "Gardner"}, + {"Milo", "Burrows"}, + {"Mimosa", "Baggins"}, + {"Minto", "Burrows"}, + {"Mirabella", "Brandybuck"}, + {"Moro", "Burrows"}, + {"Mosco", "Burrows"}, + {"Mungo", "Baggins"}, + {"Myrtle", "Burrows"}, + {"Odo", "Proudfoot"}, + {"Odovacar", "Bolger"}, + {"Olo", "Proudfoot"}, + {"Orgulas", "Brandybuck"}, + {"Otho", "Sackville-Baggins"}, + {"Paladin", "Took"}, + {"Pansy", "Bolger"}, + {"Pearl", "Took"}, + {"Peony", "Burrows"}, + {"Peregrin", "Took"}, + {"Pervinca", "Took"}, + {"Pimpernel", "Took"}, + {"Pippin", "Gardner"}, + {"Polo", "Baggins"}, + {"Ponto", "Baggins"}, + {"Porto", "Baggins"}, + {"Posco", "Baggins"}, + {"Poppy", "Bolger"}, + {"Primrose", "Gardner"}, + {"Primula", "Baggins"}, + {"Prisca", "Bolger"}, + {"Reginard", "Took"}, + {"Robin", "Smallburrow"}, + {"Robin", "Gardner"}, + {"Rorimac", "Brandybuck"}, + {"Rosa", "Took"}, + {"Rosamunda", "Bolger"}, + {"Rose", "Gardner"}, + {"Ruby", "Baggins"}, + {"Ruby", "Gardner"}, + {"Rudigar", "Bolger"}, + {"Rufus", "Burrows"}, + {"Sadoc", "Brandybuck"}, + {"Salvia", "Bolger"}, + {"Samwise", "Gamgee"}, + {"Sancho", "Proudfoot"}, + {"Saradas", "Brandybuck"}, + {"Saradoc", "Brandybuck"}, + {"Seredic", "Brandybuck"}, + {"Sigismond", "Took"}, + {"Smeagol", "Gollum"}, + {"Tanta", "Baggins"}, + {"Ted", "Sandyman"}, + {"Tobold", "Hornblower"}, + {"Togo", "Goodbody"}, + {"Tolman", "Cotton"}, + {"Tolman", "Gardner"}, + {"Widow", "Rumble"}, + {"Wilcome", "Cotton"}, + {"Wilcome", "Cotton"}, + {"Wilibald", "Bolger"}, + {"Will", "Whitfoot"}, + {"Wiseman", "Gamwich"}}; + +const char *dragons[] = {"Ancalagon", "Glaurung", "Scatha", + "Smaug the Magnificent"}; static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, const char *test_name, @@ -406,7 +400,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) { cq_verifier_destroy(cqv); } -static void test_size(grpc_end2end_test_config config, int encode_size, int decode_size) { +static void test_size(grpc_end2end_test_config config, int encode_size, + int decode_size) { size_t i; grpc_end2end_test_fixture f; grpc_arg server_arg; @@ -428,7 +423,8 @@ static void test_size(grpc_end2end_test_config config, int encode_size, int deco client_args.args = &client_arg; gpr_asprintf(&name, "test_size:e=%d:d=%d", encode_size, decode_size); - f = begin_test(config, name, encode_size != 4096 ? &client_args : NULL, decode_size != 4096 ? &server_args : NULL); + f = begin_test(config, name, encode_size != 4096 ? &client_args : NULL, + decode_size != 4096 ? &server_args : NULL); for (i = 0; i < 4 * GPR_ARRAY_SIZE(hobbits); i++) { simple_request_body(f, i); } @@ -439,24 +435,9 @@ static void test_size(grpc_end2end_test_config config, int encode_size, int deco void grpc_end2end_tests(grpc_end2end_test_config config) { static const int interesting_sizes[] = { - 4096, - 0, - 1, - 32, - 100, - 1000, - 4095, - 4097, - 8192, - 16384, - 32768, - 1024*1024-1, - 1024*1024, - 1024*1024+1, - 2*1024*1024, - 3*1024*1024, - 4*1024*1024 - }; + 4096, 0, 1, 32, 100, 1000, 4095, 4097, 8192, 16384, 32768, + 1024 * 1024 - 1, 1024 * 1024, 1024 * 1024 + 1, 2 * 1024 * 1024, + 3 * 1024 * 1024, 4 * 1024 * 1024}; size_t i, j; for (i = 0; i < GPR_ARRAY_SIZE(interesting_sizes); i++) { diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c index abcc1ba358..8fe9e7bcc5 100644 --- a/test/core/end2end/tests/negative_deadline.c +++ b/test/core/end2end/tests/negative_deadline.c @@ -163,7 +163,8 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) { cq_verifier_destroy(cqv); } -static void test_invoke_simple_request(grpc_end2end_test_config config, size_t num_ops) { +static void test_invoke_simple_request(grpc_end2end_test_config config, + size_t num_ops) { grpc_end2end_test_fixture f; f = begin_test(config, "test_invoke_simple_request", NULL, NULL); diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index 7a2d894481..dd1544c27b 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -139,7 +139,7 @@ static int poll_read_bytes(int fd, char *buf, size_t read_size, int spin) { gpr_log(GPR_ERROR, "Read failed: %s", strerror(errno)); return -1; } - bytes_read += (size_t) err2; + bytes_read += (size_t)err2; } while (bytes_read < read_size); return 0; } @@ -174,11 +174,11 @@ static int epoll_read_bytes(struct thread_args *args, char *buf, int spin) { GPR_ASSERT(ev.data.fd == args->fds.read_fd); do { do { - err2 = read(args->fds.read_fd, buf + bytes_read, - read_size - bytes_read); + err2 = + read(args->fds.read_fd, buf + bytes_read, read_size - bytes_read); } while (err2 < 0 && errno == EINTR); if (errno == EAGAIN) break; - bytes_read += (size_t) err2; + bytes_read += (size_t)err2; /* TODO(klempner): This should really be doing an extra call after we are done to ensure we see an EAGAIN */ } while (bytes_read < read_size); diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index 7f9cd6b62b..6b41698717 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -185,8 +185,8 @@ static void test_byte_buffer_from_reader(void) { } static void test_readall(void) { - char* lotsa_as[512]; - char* lotsa_bs[1024]; + char *lotsa_as[512]; + char *lotsa_bs[1024]; gpr_slice slices[2]; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 2e336aa854..db55c27783 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -145,7 +145,8 @@ static void test_many_additions(void) { for (i = 0; i < 1000000; i++) { gpr_asprintf(&key, "K:%d", i); gpr_asprintf(&value, "VALUE:%d", i); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, key, value))); + GPR_ASSERT(grpc_chttp2_hptbl_add( + &tbl, grpc_mdelem_from_strings(mdctx, key, value))); assert_index(&tbl, 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key, value); gpr_free(key); gpr_free(value); @@ -182,9 +183,12 @@ static void test_find(void) { mdctx = grpc_mdctx_create(); grpc_chttp2_hptbl_init(&tbl, mdctx); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "abc", "xyz"))); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "abc", "123"))); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "x", "1"))); + GPR_ASSERT(grpc_chttp2_hptbl_add( + &tbl, grpc_mdelem_from_strings(mdctx, "abc", "xyz"))); + GPR_ASSERT(grpc_chttp2_hptbl_add( + &tbl, grpc_mdelem_from_strings(mdctx, "abc", "123"))); + GPR_ASSERT( + grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "x", "1"))); r = find_simple(&tbl, "abc", "123"); GPR_ASSERT(r.index == 2 + GRPC_CHTTP2_LAST_STATIC_ENTRY); @@ -233,8 +237,8 @@ static void test_find(void) { /* overflow the string buffer, check find still works */ for (i = 0; i < 10000; i++) { gpr_ltoa(i, buffer); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, - grpc_mdelem_from_strings(mdctx, "test", buffer))); + GPR_ASSERT(grpc_chttp2_hptbl_add( + &tbl, grpc_mdelem_from_strings(mdctx, "test", buffer))); } r = find_simple(&tbl, "abc", "123"); diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index f4400692fe..b24a90adac 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -181,29 +181,29 @@ class Client { std::unique_ptr random_dist; switch (load.load_case()) { - case LoadParams::kClosedLoop: - // Closed-loop doesn't use random dist at all - break; - case LoadParams::kPoisson: - random_dist.reset( - new ExpDist(load.poisson().offered_load() / num_threads)); - break; - case LoadParams::kUniform: - random_dist.reset( - new UniformDist(load.uniform().interarrival_lo() * num_threads, - load.uniform().interarrival_hi() * num_threads)); - break; - case LoadParams::kDeterm: - random_dist.reset( - new DetDist(num_threads / load.determ().offered_load())); - break; - case LoadParams::kPareto: - random_dist.reset( - new ParetoDist(load.pareto().interarrival_base() * num_threads, - load.pareto().alpha())); - break; - default: - GPR_ASSERT(false); + case LoadParams::kClosedLoop: + // Closed-loop doesn't use random dist at all + break; + case LoadParams::kPoisson: + random_dist.reset( + new ExpDist(load.poisson().offered_load() / num_threads)); + break; + case LoadParams::kUniform: + random_dist.reset( + new UniformDist(load.uniform().interarrival_lo() * num_threads, + load.uniform().interarrival_hi() * num_threads)); + break; + case LoadParams::kDeterm: + random_dist.reset( + new DetDist(num_threads / load.determ().offered_load())); + break; + case LoadParams::kPareto: + random_dist.reset( + new ParetoDist(load.pareto().interarrival_base() * num_threads, + load.pareto().alpha())); + break; + default: + GPR_ASSERT(false); } // Set closed_loop_ based on whether or not random_dist is set -- cgit v1.2.3 From e58d817818fe092f5f548857613b0784493f7d17 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 15:17:35 +0000 Subject: casting --- src/core/surface/call.c | 3 ++- test/core/transport/chttp2/hpack_table_test.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/surface/call.c b/src/core/surface/call.c index aa435d44d3..86d5fca388 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -922,7 +922,8 @@ static batch_control *allocate_batch_control(grpc_call *call) { size_t i; for (i = 0; i < MAX_CONCURRENT_BATCHES; i++) { if ((call->used_batches & (1 << i)) == 0) { - call->used_batches |= (gpr_uint8)(1 << i); + call->used_batches = + (gpr_uint8)(call->used_batches | (gpr_uint8)(1 << i)); return &call->active_batches[i]; } } diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index db55c27783..5bdeeafb67 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -174,7 +174,7 @@ static grpc_chttp2_hptbl_find_result find_simple(grpc_chttp2_hptbl *tbl, static void test_find(void) { grpc_chttp2_hptbl tbl; - int i; + gpr_uint32 i; char buffer[32]; grpc_mdctx *mdctx; grpc_chttp2_hptbl_find_result r; @@ -254,7 +254,7 @@ static void test_find(void) { GPR_ASSERT(r.has_value == 1); for (i = 0; i < tbl.num_ents; i++) { - int expect = 9999 - i; + gpr_uint32 expect = 9999 - i; gpr_ltoa(expect, buffer); r = find_simple(&tbl, "test", buffer); -- cgit v1.2.3 From 575b4200a72dfdb081fb8c9063cad8d94841dd16 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 Nov 2015 20:56:15 +0000 Subject: Small fixes --- src/core/transport/chttp2/hpack_table.c | 3 +-- src/core/transport/chttp2/hpack_table.h | 2 -- test/core/end2end/fixtures/proxy.c | 2 -- test/core/transport/chttp2/hpack_parser_test.c | 3 ++- 4 files changed, 3 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index fabc950872..0b034b72a4 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -324,10 +324,9 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { } /* copy the finalized entry in */ - tbl->ents[tbl->last_ent] = GRPC_MDELEM_REF(md); + tbl->ents[(tbl->first_ent + tbl->num_ents) % tbl->cap_entries] = GRPC_MDELEM_REF(md); /* update accounting values */ - tbl->last_ent = ((tbl->last_ent + 1) % tbl->cap_entries); tbl->num_ents++; tbl->mem_used += (gpr_uint32)elem_bytes; return 1; diff --git a/src/core/transport/chttp2/hpack_table.h b/src/core/transport/chttp2/hpack_table.h index 6d506de8a5..e03b8c19b3 100644 --- a/src/core/transport/chttp2/hpack_table.h +++ b/src/core/transport/chttp2/hpack_table.h @@ -62,8 +62,6 @@ typedef struct { grpc_mdctx *mdctx; /* the first used entry in ents */ gpr_uint32 first_ent; - /* the last used entry in ents */ - gpr_uint32 last_ent; /* how many entries are in the table */ gpr_uint32 num_ents; /* the amount of memory used by the table, according to the hpack algorithm */ diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c index 1090ad667d..b793358653 100644 --- a/test/core/end2end/fixtures/proxy.c +++ b/test/core/end2end/fixtures/proxy.c @@ -146,7 +146,6 @@ void grpc_end2end_proxy_destroy(grpc_end2end_proxy *proxy) { } static void unrefpc(proxy_call *pc, const char *reason) { - gpr_log(GPR_DEBUG, "PROXY UNREF %s", reason); if (gpr_unref(&pc->refs)) { grpc_call_destroy(pc->c2p); grpc_call_destroy(pc->p2s); @@ -159,7 +158,6 @@ static void unrefpc(proxy_call *pc, const char *reason) { } static void refpc(proxy_call *pc, const char *reason) { - gpr_log(GPR_DEBUG, "PROXY REF %s", reason); gpr_ref(&pc->refs); } diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index 3a313375a4..e4cabeae3b 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -151,7 +151,8 @@ static void test_vectors(grpc_slice_split_mode mode) { grpc_chttp2_hpack_parser_destroy(&parser); grpc_chttp2_hpack_parser_init(&parser, mdctx); - parser.table.max_bytes = 256; +grpc_chttp2_hptbl_set_max_bytes(&parser.table, 256); +grpc_chttp2_hptbl_set_current_table_size(&parser.table, 256); /* D.5.1 */ test_vector(&parser, mode, "4803 3330 3258 0770 7269 7661 7465 611d" -- cgit v1.2.3 From 82e249b8165dbe2ddb6d76bf938a677d85341a8f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 Nov 2015 01:14:39 +0000 Subject: Small fixes --- src/core/transport/chttp2/hpack_table.c | 11 ++++++----- test/core/end2end/fixtures/proxy.c | 4 +--- test/core/transport/chttp2/hpack_parser_test.c | 7 ++++--- test/core/transport/chttp2/hpack_table_test.c | 27 ++++++++++++++++---------- 4 files changed, 28 insertions(+), 21 deletions(-) (limited to 'src/core') diff --git a/src/core/transport/chttp2/hpack_table.c b/src/core/transport/chttp2/hpack_table.c index 0b034b72a4..f2362b056c 100644 --- a/src/core/transport/chttp2/hpack_table.c +++ b/src/core/transport/chttp2/hpack_table.c @@ -294,10 +294,10 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; if (tbl->current_table_bytes > tbl->max_bytes) { - gpr_log( - GPR_ERROR, - "HPACK max table size reduced to %d but not reflected by hpack stream", - tbl->max_bytes); + gpr_log(GPR_ERROR, + "HPACK max table size reduced to %d but not reflected by hpack " + "stream (still at %d)", + tbl->max_bytes, tbl->current_table_bytes); return 0; } @@ -324,7 +324,8 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { } /* copy the finalized entry in */ - tbl->ents[(tbl->first_ent + tbl->num_ents) % tbl->cap_entries] = GRPC_MDELEM_REF(md); + tbl->ents[(tbl->first_ent + tbl->num_ents) % tbl->cap_entries] = + GRPC_MDELEM_REF(md); /* update accounting values */ tbl->num_ents++; diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c index b793358653..434e75dd15 100644 --- a/test/core/end2end/fixtures/proxy.c +++ b/test/core/end2end/fixtures/proxy.c @@ -157,9 +157,7 @@ static void unrefpc(proxy_call *pc, const char *reason) { } } -static void refpc(proxy_call *pc, const char *reason) { - gpr_ref(&pc->refs); -} +static void refpc(proxy_call *pc, const char *reason) { gpr_ref(&pc->refs); } static void on_c2p_sent_initial_metadata(void *arg, int success) { proxy_call *pc = arg; diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index e4cabeae3b..c6b35fba79 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -151,8 +151,8 @@ static void test_vectors(grpc_slice_split_mode mode) { grpc_chttp2_hpack_parser_destroy(&parser); grpc_chttp2_hpack_parser_init(&parser, mdctx); -grpc_chttp2_hptbl_set_max_bytes(&parser.table, 256); -grpc_chttp2_hptbl_set_current_table_size(&parser.table, 256); + grpc_chttp2_hptbl_set_max_bytes(&parser.table, 256); + grpc_chttp2_hptbl_set_current_table_size(&parser.table, 256); /* D.5.1 */ test_vector(&parser, mode, "4803 3330 3258 0770 7269 7661 7465 611d" @@ -185,7 +185,8 @@ grpc_chttp2_hptbl_set_current_table_size(&parser.table, 256); grpc_chttp2_hpack_parser_destroy(&parser); grpc_chttp2_hpack_parser_init(&parser, mdctx); - parser.table.max_bytes = 256; + grpc_chttp2_hptbl_set_max_bytes(&parser.table, 256); + grpc_chttp2_hptbl_set_current_table_size(&parser.table, 256); /* D.6.1 */ test_vector(&parser, mode, "4882 6402 5885 aec3 771a 4b61 96d0 7abe" diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 5bdeeafb67..5eb52d6d9a 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -143,10 +143,12 @@ static void test_many_additions(void) { grpc_chttp2_hptbl_init(&tbl, mdctx); for (i = 0; i < 1000000; i++) { + grpc_mdelem *elem; gpr_asprintf(&key, "K:%d", i); gpr_asprintf(&value, "VALUE:%d", i); - GPR_ASSERT(grpc_chttp2_hptbl_add( - &tbl, grpc_mdelem_from_strings(mdctx, key, value))); + elem = grpc_mdelem_from_strings(mdctx, key, value); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GRPC_MDELEM_UNREF(elem); assert_index(&tbl, 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key, value); gpr_free(key); gpr_free(value); @@ -177,18 +179,22 @@ static void test_find(void) { gpr_uint32 i; char buffer[32]; grpc_mdctx *mdctx; + grpc_mdelem *elem; grpc_chttp2_hptbl_find_result r; LOG_TEST("test_find"); mdctx = grpc_mdctx_create(); grpc_chttp2_hptbl_init(&tbl, mdctx); - GPR_ASSERT(grpc_chttp2_hptbl_add( - &tbl, grpc_mdelem_from_strings(mdctx, "abc", "xyz"))); - GPR_ASSERT(grpc_chttp2_hptbl_add( - &tbl, grpc_mdelem_from_strings(mdctx, "abc", "123"))); - GPR_ASSERT( - grpc_chttp2_hptbl_add(&tbl, grpc_mdelem_from_strings(mdctx, "x", "1"))); + elem = grpc_mdelem_from_strings(mdctx, "abc", "xyz"); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GRPC_MDELEM_UNREF(elem); + elem = grpc_mdelem_from_strings(mdctx, "abc", "123"); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GRPC_MDELEM_UNREF(elem); + elem = grpc_mdelem_from_strings(mdctx, "x", "1"); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GRPC_MDELEM_UNREF(elem); r = find_simple(&tbl, "abc", "123"); GPR_ASSERT(r.index == 2 + GRPC_CHTTP2_LAST_STATIC_ENTRY); @@ -237,8 +243,9 @@ static void test_find(void) { /* overflow the string buffer, check find still works */ for (i = 0; i < 10000; i++) { gpr_ltoa(i, buffer); - GPR_ASSERT(grpc_chttp2_hptbl_add( - &tbl, grpc_mdelem_from_strings(mdctx, "test", buffer))); + elem = grpc_mdelem_from_strings(mdctx, "test", buffer); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GRPC_MDELEM_UNREF(elem); } r = find_simple(&tbl, "abc", "123"); -- cgit v1.2.3 From 47b48459f3802af8aa7d5e4cbe2d4fda5cd16449 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 17 Nov 2015 16:15:03 -0800 Subject: Robustness work for lb_policies_test --- src/core/client_config/subchannel.c | 15 +++++++++++++++ test/core/client_config/lb_policies_test.c | 17 ++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c index 49c2cf9a19..b15a9033af 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/client_config/subchannel.c @@ -697,10 +697,25 @@ static double generate_uniform_random_number(grpc_subchannel *c) { /* Update backoff_delta and next_attempt in subchannel */ static void update_reconnect_parameters(grpc_subchannel *c) { + size_t i; gpr_int32 backoff_delta_millis, jitter; gpr_int32 max_backoff_millis = GRPC_SUBCHANNEL_RECONNECT_MAX_BACKOFF_SECONDS * 1000; double jitter_range; + + if (c->args) { + for (i = 0; i < c->args->num_args; i++) { + if (0 == strcmp(c->args->args[i].key, + "grpc.testing.fixed_reconnect_backoff")) { + GPR_ASSERT(c->args->args[i].type == GRPC_ARG_INTEGER); + c->next_attempt = gpr_time_add( + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_millis(c->args->args[i].value.integer, GPR_TIMESPAN)); + return; + } + } + } + backoff_delta_millis = (gpr_int32)(gpr_time_to_millis(c->backoff_delta) * GRPC_SUBCHANNEL_RECONNECT_BACKOFF_MULTIPLIER); diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index 281d2b2ee1..4a469564bd 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -269,7 +269,7 @@ int *perform_request(servers_fixture *f, grpc_channel *client, } memset(s_valid, 0, f->num_servers * sizeof(int)); - deadline = n_millis_time(1000); + deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1); c = grpc_channel_create_call(client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq, "/foo", "foo.test.google.fr", deadline, NULL); GPR_ASSERT(c); @@ -304,7 +304,8 @@ int *perform_request(servers_fixture *f, grpc_channel *client, grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL)); s_idx = -1; - while ((ev = grpc_completion_queue_next(f->cq, n_millis_time(300), NULL)) + while ((ev = grpc_completion_queue_next( + f->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(2), NULL)) .type != GRPC_QUEUE_TIMEOUT) { GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); read_tag = ((int)(gpr_intptr)ev.tag); @@ -316,6 +317,7 @@ int *perform_request(servers_fixture *f, grpc_channel *client, s_idx = read_tag - 1000; s_valid[s_idx] = 1; connection_sequence[iter_num] = s_idx; + break; } else if (read_tag == 1) { gpr_log(GPR_DEBUG, "client timed out"); GPR_ASSERT(ev.success); @@ -453,6 +455,8 @@ void run_spec(const test_spec *spec) { int *actual_connection_sequence; request_data rdata; servers_fixture *f; + grpc_channel_args args; + grpc_arg arg; rdata.call_details = gpr_malloc(sizeof(grpc_call_details) * spec->num_servers); f = setup_servers("127.0.0.1", &rdata, spec->num_servers); @@ -462,7 +466,14 @@ void run_spec(const test_spec *spec) { f->num_servers, ",", NULL); gpr_asprintf(&client_hostport, "ipv4:%s?lb_policy=round_robin", servers_hostports_str); - client = grpc_insecure_channel_create(client_hostport, NULL, NULL); + + arg.type = GRPC_ARG_INTEGER; + arg.key = "grpc.testing.fixed_reconnect_backoff"; + arg.value.integer = 100; + args.num_args = 1; + args.args = &arg; + + client = grpc_insecure_channel_create(client_hostport, &args, NULL); gpr_log(GPR_INFO, "Testing '%s' with servers=%s client=%s", spec->description, servers_hostports_str, client_hostport); -- cgit v1.2.3 From e32075fd8a75bff266e727c0d50045c55cf3b3cf Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Tue, 17 Nov 2015 16:29:00 -0800 Subject: Fixing tests. --- Makefile | 2 +- src/core/surface/version.c | 2 +- src/php/tests/interop/interop_client.php | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/Makefile b/Makefile index 9d94ee8599..853034ea53 100644 --- a/Makefile +++ b/Makefile @@ -312,7 +312,7 @@ E = @echo Q = @ endif -VERSION = 0.11.0.0 +VERSION = 0.12.0.0 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/src/core/surface/version.c b/src/core/surface/version.c index e559d51448..962a72112a 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.11.0.0"; } +const char *grpc_version_string(void) { return "0.12.0.0"; } diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index a3c19fb6c3..9aab5c966c 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -426,7 +426,7 @@ if ($use_tls) { $ssl_credentials = Grpc\ChannelCredentials::createSsl( file_get_contents(dirname(__FILE__).'/../data/ca.pem')); } else { - $ssl_credentials = Grpc\Credentials::createSsl(); + $ssl_credentials = Grpc\ChannelCredentials::createSsl(); } $opts['credentials'] = $ssl_credentials; $opts['grpc.ssl_target_name_override'] = $host_override; diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 5d592c8e0a..f07718515a 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.11.0.0 +PROJECT_NUMBER = 0.12.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index bbd1706fb0..11aaa379ce 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.11.0.0 +PROJECT_NUMBER = 0.12.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index beb0128e41..e411abf300 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.11.0.0 +PROJECT_NUMBER = 0.12.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 0ab0656265..b0e937d666 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.11.0.0 +PROJECT_NUMBER = 0.12.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v1.2.3 From 6b80d4913b5d2a4ebbfd176a11c66a4726a42381 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Nov 2015 07:05:54 -0800 Subject: Edge case cleanup --- src/core/support/slice_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/support/slice_buffer.c b/src/core/support/slice_buffer.c index 17c0b6c0f6..856d3a2439 100644 --- a/src/core/support/slice_buffer.c +++ b/src/core/support/slice_buffer.c @@ -220,7 +220,7 @@ void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n, return; } src_idx = 0; - for (;;) { + while (src_idx < src->capacity) { gpr_slice slice = src->slices[src_idx]; size_t slice_len = GPR_SLICE_LENGTH(slice); if (n > slice_len) { -- cgit v1.2.3 From b113649517fe15b75079df406c7ebcbd59a4cfa1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Nov 2015 11:30:17 -0800 Subject: clang-format --- include/grpc++/security/credentials.h | 5 ++- src/core/security/credentials.c | 48 +++++++++++++++++--------- src/core/security/credentials.h | 3 +- src/core/security/google_default_credentials.c | 3 +- src/core/security/security_connector.c | 6 ++-- src/cpp/client/insecure_credentials.cc | 4 ++- src/cpp/client/secure_credentials.h | 1 - test/core/client_config/lb_policies_test.c | 4 +-- test/core/end2end/tests/hpack_size.c | 4 +-- test/core/security/credentials_test.c | 10 +++--- 10 files changed, 53 insertions(+), 35 deletions(-) (limited to 'src/core') diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index 56827c0f21..cc827f09b0 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -186,9 +186,8 @@ std::shared_ptr GoogleIAMCredentials( /// Combines a channel credentials and a call credentials into a composite /// channel credentials. std::shared_ptr CompositeChannelCredentials( - const std::shared_ptr& channel_creds, - const std::shared_ptr& call_creds); - + const std::shared_ptr& channel_creds, + const std::shared_ptr& call_creds); /// Combines two call credentials objects into a composite call credentials. std::shared_ptr CompositeCallCredentials( diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c index 3db531cd35..f7a2e73785 100644 --- a/src/core/security/credentials.c +++ b/src/core/security/credentials.c @@ -116,9 +116,12 @@ void grpc_call_credentials_release(grpc_call_credentials *creds) { grpc_call_credentials_unref(creds); } -void grpc_call_credentials_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { +void grpc_call_credentials_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data) { if (creds == NULL || creds->vtable->get_request_metadata == NULL) { if (cb != NULL) { cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); @@ -423,9 +426,12 @@ static void jwt_destruct(grpc_call_credentials *creds) { gpr_mu_destroy(&c->cache_mu); } -static void jwt_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { +static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data) { grpc_service_account_jwt_access_credentials *c = (grpc_service_account_jwt_access_credentials *)creds; gpr_timespec refresh_threshold = gpr_time_from_seconds( @@ -798,9 +804,12 @@ static void on_simulated_token_fetch_done(void *user_data) { grpc_exec_ctx_finish(&exec_ctx); } -static void md_only_test_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { +static void md_only_test_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data) { grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; if (c->is_async) { @@ -837,9 +846,12 @@ static void access_token_destruct(grpc_call_credentials *creds) { grpc_credentials_md_store_unref(c->access_token_md); } -static void access_token_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { +static void access_token_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data) { grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK); } @@ -978,9 +990,12 @@ static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, composite_call_md_context_destroy(ctx); } -static void composite_call_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pollset *pollset, - const char *service_url, grpc_credentials_metadata_cb cb, void *user_data) { +static void composite_call_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + const char *service_url, + grpc_credentials_metadata_cb cb, + void *user_data) { grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; grpc_composite_call_credentials_metadata_context *ctx; @@ -1097,7 +1112,7 @@ static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx, } static grpc_call_credentials_vtable iam_vtable = {iam_destruct, - iam_get_request_metadata}; + iam_get_request_metadata}; grpc_call_credentials *grpc_google_iam_credentials_create( const char *token, const char *authority_selector, void *reserved) { @@ -1265,4 +1280,3 @@ grpc_channel_credentials *grpc_composite_channel_credentials_create( c->call_creds = grpc_call_credentials_ref(call_creds); return &c->base; } - diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h index 559574d514..132060910e 100644 --- a/src/core/security/credentials.h +++ b/src/core/security/credentials.h @@ -187,7 +187,8 @@ typedef struct { size_t num_creds; } grpc_call_credentials_array; -const grpc_call_credentials_array *grpc_composite_call_credentials_get_credentials( +const grpc_call_credentials_array * +grpc_composite_call_credentials_get_credentials( grpc_call_credentials *composite_creds); /* Returns creds if creds is of the specified type or the inner creds of the diff --git a/src/core/security/google_default_credentials.c b/src/core/security/google_default_credentials.c index e5a810f23c..6a54fe4e47 100644 --- a/src/core/security/google_default_credentials.c +++ b/src/core/security/google_default_credentials.c @@ -214,7 +214,8 @@ grpc_channel_credentials *grpc_google_default_credentials_create(void) { end: if (result == NULL) { if (call_creds != NULL) { - /* Blend with default ssl credentials and add a global reference so that it + /* Blend with default ssl credentials and add a global reference so that + it can be cached and re-served. */ grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); diff --git a/src/core/security/security_connector.c b/src/core/security/security_connector.c index 8dbacdd35e..3c54a4deae 100644 --- a/src/core/security/security_connector.c +++ b/src/core/security/security_connector.c @@ -571,9 +571,9 @@ size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) { } grpc_security_status grpc_ssl_channel_security_connector_create( - grpc_call_credentials *request_metadata_creds, const grpc_ssl_config *config, - const char *target_name, const char *overridden_target_name, - grpc_channel_security_connector **sc) { + grpc_call_credentials *request_metadata_creds, + const grpc_ssl_config *config, const char *target_name, + const char *overridden_target_name, grpc_channel_security_connector **sc) { size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions(); const unsigned char **alpn_protocol_strings = gpr_malloc(sizeof(const char *) * num_alpn_protocols); diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 563fa9267d..1293203b93 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -54,7 +54,9 @@ class InsecureChannelCredentialsImpl GRPC_FINAL : public ChannelCredentials { grpc_insecure_channel_create(target.c_str(), &channel_args, nullptr)); } - SecureChannelCredentials* AsSecureCredentials() GRPC_OVERRIDE { return nullptr; } + SecureChannelCredentials* AsSecureCredentials() GRPC_OVERRIDE { + return nullptr; + } }; } // namespace diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index b241761a7c..e9afa9e57f 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -76,7 +76,6 @@ class SecureCallCredentials GRPC_FINAL : public CallCredentials { grpc_call_credentials* const c_creds_; }; - class MetadataCredentialsPluginWrapper GRPC_FINAL { public: static void Destroy(void* wrapper); diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index cd9aa942e2..6f218e7f08 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -303,8 +303,8 @@ int *perform_request(servers_fixture *f, grpc_channel *client, s_idx = -1; while ((ev = grpc_completion_queue_next( - f->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL)) - .type != GRPC_QUEUE_TIMEOUT) { + f->cq, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1), NULL)).type != + GRPC_QUEUE_TIMEOUT) { GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); read_tag = ((int)(gpr_intptr)ev.tag); gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%d", diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c index b2fe2b485a..997969d3cc 100644 --- a/test/core/end2end/tests/hpack_size.c +++ b/test/core/end2end/tests/hpack_size.c @@ -434,8 +434,8 @@ static void test_size(grpc_end2end_test_config config, int encode_size, } void grpc_end2end_tests(grpc_end2end_test_config config) { - static const int interesting_sizes[] = { - 4096, 0, 100, 1000, 32768, 4 * 1024 * 1024}; + static const int interesting_sizes[] = {4096, 0, 100, + 1000, 32768, 4 * 1024 * 1024}; size_t i, j; for (i = 0; i < GPR_ARRAY_SIZE(interesting_sizes); i++) { diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index dcb35e5309..4cfef7be78 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -353,8 +353,8 @@ static void test_google_iam_creds(void) { test_google_iam_authorization_token, test_google_iam_authority_selector, NULL); grpc_call_credentials_get_request_metadata(&exec_ctx, creds, NULL, - test_service_url, - check_google_iam_metadata, creds); + test_service_url, + check_google_iam_metadata, creds); grpc_exec_ctx_finish(&exec_ctx); } @@ -436,7 +436,8 @@ static void test_oauth2_google_iam_composite_creds(void) { test_google_iam_authorization_token, test_google_iam_authority_selector, NULL); grpc_call_credentials *composite_creds = - grpc_composite_call_credentials_create(oauth2_creds, google_iam_creds, NULL); + grpc_composite_call_credentials_create(oauth2_creds, google_iam_creds, + NULL); grpc_call_credentials_unref(oauth2_creds); grpc_call_credentials_unref(google_iam_creds); GPR_ASSERT( @@ -481,7 +482,8 @@ static void test_channel_oauth2_google_iam_composite_creds(void) { grpc_call_credentials *oauth2_creds = grpc_access_token_credentials_create("blah", NULL); grpc_channel_credentials *channel_oauth2_creds = - grpc_composite_channel_credentials_create(channel_creds, oauth2_creds, NULL); + grpc_composite_channel_credentials_create(channel_creds, oauth2_creds, + NULL); grpc_call_credentials *google_iam_creds = grpc_google_iam_credentials_create( test_google_iam_authorization_token, test_google_iam_authority_selector, NULL); -- cgit v1.2.3 From 2a2a6ed1cadb9aab830b3773ad324f66ff9c7578 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 18 Nov 2015 15:52:46 -0800 Subject: Support rebuilding table --- include/grpc/grpc.h | 1 + src/core/transport/chttp2/hpack_encoder.c | 18 ++++++++++++++++-- tools/run_tests/run_tests.py | 4 ++-- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index a8abd1ad1b..f07f584ef2 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -130,6 +130,7 @@ typedef struct { /** How much memory to use for hpack decoding */ #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER \ "grpc.http2.hpack_table_size.decoder" +/** How much memory to use for hpack encoding */ #define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \ "grpc.http2.hpack_table_size.encoder" /** Default authority to pass if none specified on call construction */ diff --git a/src/core/transport/chttp2/hpack_encoder.c b/src/core/transport/chttp2/hpack_encoder.c index f89159bad1..758babc3d0 100644 --- a/src/core/transport/chttp2/hpack_encoder.c +++ b/src/core/transport/chttp2/hpack_encoder.c @@ -474,7 +474,8 @@ void grpc_chttp2_hpack_compressor_init(grpc_chttp2_hpack_compressor *c, c->mdctx = ctx; c->timeout_key_str = grpc_mdstr_from_string(ctx, "grpc-timeout"); c->max_table_size = GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE; - c->cap_table_elems = c->max_table_elems = elems_for_bytes(c->max_table_size); + c->cap_table_elems = elems_for_bytes(c->max_table_size); + c->max_table_elems = c->cap_table_elems; c->max_usable_size = GRPC_CHTTP2_HPACKC_INITIAL_TABLE_SIZE; c->table_elem_size = gpr_malloc(sizeof(*c->table_elem_size) * c->cap_table_elems); @@ -500,7 +501,20 @@ void grpc_chttp2_hpack_compressor_set_max_usable_size( } static void rebuild_elems(grpc_chttp2_hpack_compressor *c, gpr_uint32 new_cap) { + gpr_uint16 *table_elem_size = gpr_malloc(sizeof(*table_elem_size) * new_cap); + gpr_uint32 i; + memset(table_elem_size, 0, sizeof(*table_elem_size) * new_cap); + GPR_ASSERT(c->table_elems <= new_cap); + + for (i = 0; i < c->table_elems; i++) { + gpr_uint32 ofs = c->tail_remote_index + i + 1; + table_elem_size[ofs % new_cap] = c->table_elem_size[ofs % c->cap_table_elems]; + } + + c->cap_table_elems = new_cap; + gpr_free(c->table_elem_size); + c->table_elem_size = table_elem_size; } void grpc_chttp2_hpack_compressor_set_max_table_size( @@ -517,7 +531,7 @@ void grpc_chttp2_hpack_compressor_set_max_table_size( if (c->max_table_elems > c->cap_table_elems) { rebuild_elems(c, GPR_MAX(c->max_table_elems, 2 * c->cap_table_elems)); } else if (c->max_table_elems < c->cap_table_elems / 3) { - gpr_uint32 new_cap = GPR_MIN(c->max_table_elems, 16); + gpr_uint32 new_cap = GPR_MAX(c->max_table_elems, 16); if (new_cap != c->cap_table_elems) { rebuild_elems(c, new_cap); } diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index ab2b71b80e..4a189f1433 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -485,10 +485,10 @@ _CONFIGS = { 'msan': SimpleConfig('msan', timeout_multiplier=1.5), 'ubsan': SimpleConfig('ubsan'), 'asan': SimpleConfig('asan', timeout_multiplier=1.5, environ={ - 'ASAN_OPTIONS': 'detect_leaks=1:color=always:suppressions=tools/tsan_suppressions.txt', + 'ASAN_OPTIONS': 'detect_leaks=1:color=always', 'LSAN_OPTIONS': 'report_objects=1'}), 'asan-noleaks': SimpleConfig('asan', environ={ - 'ASAN_OPTIONS': 'detect_leaks=0:color=always:suppressions=tools/tsan_suppressions.txt'}), + 'ASAN_OPTIONS': 'detect_leaks=0:color=always'}), 'gcov': SimpleConfig('gcov'), 'memcheck': ValgrindConfig('valgrind', 'memcheck', ['--leak-check=full']), 'helgrind': ValgrindConfig('dbg', 'helgrind') -- cgit v1.2.3 From 5eb4e1caef902d65df7c7d519b2c2890998d153f Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Wed, 18 Nov 2015 17:19:45 -0800 Subject: Adding grpc_tcp_listener as an actual object being returned. --- src/core/iomgr/tcp_server.h | 20 +++-- src/core/iomgr/tcp_server_posix.c | 136 ++++++++++++++++++++----------- src/core/iomgr/tcp_server_windows.c | 111 +++++++++++++++---------- src/core/security/server_secure_chttp2.c | 4 +- src/core/surface/server_chttp2.c | 4 +- test/core/util/reconnect_server.c | 4 +- 6 files changed, 177 insertions(+), 102 deletions(-) (limited to 'src/core') diff --git a/src/core/iomgr/tcp_server.h b/src/core/iomgr/tcp_server.h index 882635f638..3df36174e7 100644 --- a/src/core/iomgr/tcp_server.h +++ b/src/core/iomgr/tcp_server.h @@ -39,6 +39,9 @@ /* Forward decl of grpc_tcp_server */ typedef struct grpc_tcp_server grpc_tcp_server; +/* Forward decl of grpc_tcp_listener */ +typedef struct grpc_tcp_listener grpc_tcp_listener; + /* Called for newly connected TCP connections. */ typedef void (*grpc_tcp_server_cb)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *ep); @@ -51,19 +54,18 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *server, grpc_pollset **pollsets, size_t pollset_count, grpc_tcp_server_cb on_accept_cb, void *cb_arg); -/* Add a port to the server, returning port number on success, or negative - on failure. +/* Add a port to the server, returning the newly created listener on success, + or a null pointer on failure. The :: and 0.0.0.0 wildcard addresses are treated identically, accepting both IPv4 and IPv6 connections, but :: is the preferred style. This usually creates one socket, but possibly two on systems which support IPv6, - but not dualstack sockets. - - For raw access to the underlying sockets, see grpc_tcp_server_get_fd(). */ + but not dualstack sockets. */ /* TODO(ctiller): deprecate this, and make grpc_tcp_server_add_ports to handle all of the multiple socket port matching logic in one place */ -int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len); +grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, + const void *addr, + size_t addr_len); /* Returns the file descriptor of the Nth listening socket on this server, or -1 if the index is out of bounds. @@ -75,4 +77,8 @@ int grpc_tcp_server_get_fd(grpc_tcp_server *s, unsigned index); void grpc_tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *server, grpc_closure *closure); +int grpc_tcp_listener_get_port(grpc_tcp_listener *listener); +void grpc_tcp_listener_ref(grpc_tcp_listener *listener); +void grpc_tcp_listener_unref(grpc_tcp_listener *listener); + #endif /* GRPC_INTERNAL_CORE_IOMGR_TCP_SERVER_H */ diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c index 99c76dcbe9..3dab652efa 100644 --- a/src/core/iomgr/tcp_server_posix.c +++ b/src/core/iomgr/tcp_server_posix.c @@ -74,7 +74,7 @@ static gpr_once s_init_max_accept_queue_size; static int s_max_accept_queue_size; /* one listening port */ -typedef struct { +typedef struct server_port { int fd; grpc_fd *emfd; grpc_tcp_server *server; @@ -84,8 +84,13 @@ typedef struct { struct sockaddr_un un; } addr; size_t addr_len; + int port; grpc_closure read_closure; grpc_closure destroyed_closure; + gpr_refcount refs; + struct server_port *next; + struct server_port *dual_stack_second_port; + int is_dual_stack_second_port; } server_port; static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) { @@ -112,10 +117,9 @@ struct grpc_tcp_server { /* is this server shutting down? (boolean) */ int shutdown; - /* all listening ports */ - server_port *ports; - size_t nports; - size_t port_capacity; + /* linked list of server ports */ + server_port *head; + unsigned nports; /* shutdown callback */ grpc_closure *shutdown_complete; @@ -134,18 +138,22 @@ grpc_tcp_server *grpc_tcp_server_create(void) { s->shutdown = 0; s->on_accept_cb = NULL; s->on_accept_cb_arg = NULL; - s->ports = gpr_malloc(sizeof(server_port) * INIT_PORT_CAP); + s->head = NULL; s->nports = 0; - s->port_capacity = INIT_PORT_CAP; return s; } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + server_port *sp; + grpc_exec_ctx_enqueue(exec_ctx, s->shutdown_complete, 1); gpr_mu_destroy(&s->mu); - gpr_free(s->ports); + for (sp = s->head; sp; sp = sp->next) { + grpc_tcp_listener_unref((grpc_tcp_listener *)sp); + } + gpr_free(s); } @@ -166,8 +174,6 @@ static void destroyed_port(grpc_exec_ctx *exec_ctx, void *server, int success) { events will be received on them - at this point it's safe to destroy things */ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - size_t i; - /* delete ALL the things */ gpr_mu_lock(&s->mu); @@ -176,9 +182,9 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { return; } - if (s->nports) { - for (i = 0; i < s->nports; i++) { - server_port *sp = &s->ports[i]; + if (s->head) { + server_port *sp; + for (sp = s->head; sp; sp = sp->next) { if (sp->addr.sockaddr.sa_family == AF_UNIX) { unlink_if_unix_domain_socket(&sp->addr.un); } @@ -196,7 +202,6 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { void grpc_tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_closure *closure) { - size_t i; gpr_mu_lock(&s->mu); GPR_ASSERT(!s->shutdown); @@ -206,8 +211,9 @@ void grpc_tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, /* shutdown all fd's */ if (s->active_ports) { - for (i = 0; i < s->nports; i++) { - grpc_fd_shutdown(exec_ctx, s->ports[i].emfd); + server_port *sp; + for (sp = s->head; sp; sp = sp->next) { + grpc_fd_shutdown(exec_ctx, sp->emfd); } gpr_mu_unlock(&s->mu); } else { @@ -364,9 +370,10 @@ error: } } -static int add_socket_to_server(grpc_tcp_server *s, int fd, - const struct sockaddr *addr, size_t addr_len) { - server_port *sp; +static server_port *add_socket_to_server(grpc_tcp_server *s, int fd, + const struct sockaddr *addr, + size_t addr_len) { + server_port *sp = NULL; int port; char *addr_str; char *name; @@ -376,32 +383,35 @@ static int add_socket_to_server(grpc_tcp_server *s, int fd, grpc_sockaddr_to_string(&addr_str, (struct sockaddr *)&addr, 1); gpr_asprintf(&name, "tcp-server-listener:%s", addr_str); gpr_mu_lock(&s->mu); + s->nports++; GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server"); - /* append it to the list under a lock */ - if (s->nports == s->port_capacity) { - s->port_capacity *= 2; - s->ports = gpr_realloc(s->ports, sizeof(server_port) * s->port_capacity); - } - sp = &s->ports[s->nports++]; + sp = gpr_malloc(sizeof(server_port)); + sp->next = s->head; + s->head = sp; sp->server = s; sp->fd = fd; sp->emfd = grpc_fd_create(fd, name); memcpy(sp->addr.untyped, addr, addr_len); sp->addr_len = addr_len; + sp->port = port; + sp->is_dual_stack_second_port = 0; + sp->dual_stack_second_port = NULL; + gpr_ref_init(&sp->refs, 1); GPR_ASSERT(sp->emfd); gpr_mu_unlock(&s->mu); gpr_free(addr_str); gpr_free(name); } - return port; + return sp; } -int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len) { - int allocated_port1 = -1; - int allocated_port2 = -1; - unsigned i; +grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, + const void *addr, + size_t addr_len) { + int allocated_port = -1; + server_port *sp; + server_port *sp2 = NULL; int fd; grpc_dualstack_mode dsmode; struct sockaddr_in6 addr6_v4mapped; @@ -420,9 +430,9 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, /* Check if this is a wildcard port, and if so, try to keep the port the same as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { - for (i = 0; i < s->nports; i++) { + for (sp = s->head; sp; sp = sp->next) { sockname_len = sizeof(sockname_temp); - if (0 == getsockname(s->ports[i].fd, (struct sockaddr *)&sockname_temp, + if (0 == getsockname(sp->fd, (struct sockaddr *)&sockname_temp, &sockname_len)) { port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); if (port > 0) { @@ -436,6 +446,8 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, } } + sp = NULL; + if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { addr = (const struct sockaddr *)&addr6_v4mapped; addr_len = sizeof(addr6_v4mapped); @@ -449,14 +461,16 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, addr = (struct sockaddr *)&wild6; addr_len = sizeof(wild6); fd = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode); - allocated_port1 = add_socket_to_server(s, fd, addr, addr_len); + sp = add_socket_to_server(s, fd, addr, addr_len); + allocated_port = sp->port; if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; } /* If we didn't get a dualstack socket, also listen on 0.0.0.0. */ - if (port == 0 && allocated_port1 > 0) { - grpc_sockaddr_set_port((struct sockaddr *)&wild4, allocated_port1); + if (port == 0 && allocated_port > 0) { + grpc_sockaddr_set_port((struct sockaddr *)&wild4, allocated_port); + sp2 = sp; } addr = (struct sockaddr *)&wild4; addr_len = sizeof(wild4); @@ -471,22 +485,31 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, addr = (struct sockaddr *)&addr4_copy; addr_len = sizeof(addr4_copy); } - allocated_port2 = add_socket_to_server(s, fd, addr, addr_len); + sp = add_socket_to_server(s, fd, addr, addr_len); + sp->dual_stack_second_port = sp2; + if (sp2) sp2->is_dual_stack_second_port = 1; done: gpr_free(allocated_addr); - return allocated_port1 >= 0 ? allocated_port1 : allocated_port2; + return (grpc_tcp_listener *)sp; } int grpc_tcp_server_get_fd(grpc_tcp_server *s, unsigned port_index) { - return (port_index < s->nports) ? s->ports[port_index].fd : -1; + server_port *sp; + for (sp = s->head; sp && port_index != 0; sp = sp->next, port_index--); + if (port_index == 0 && sp) { + return sp->fd; + } else { + return -1; + } } void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_pollset **pollsets, size_t pollset_count, grpc_tcp_server_cb on_accept_cb, void *on_accept_cb_arg) { - size_t i, j; + size_t i; + server_port *sp; GPR_ASSERT(on_accept_cb); gpr_mu_lock(&s->mu); GPR_ASSERT(!s->on_accept_cb); @@ -495,17 +518,36 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, s->on_accept_cb_arg = on_accept_cb_arg; s->pollsets = pollsets; s->pollset_count = pollset_count; - for (i = 0; i < s->nports; i++) { - for (j = 0; j < pollset_count; j++) { - grpc_pollset_add_fd(exec_ctx, pollsets[j], s->ports[i].emfd); + for (sp = s->head; sp; sp = sp->next) { + for (i = 0; i < pollset_count; i++) { + grpc_pollset_add_fd(exec_ctx, pollsets[i], sp->emfd); } - s->ports[i].read_closure.cb = on_read; - s->ports[i].read_closure.cb_arg = &s->ports[i]; - grpc_fd_notify_on_read(exec_ctx, s->ports[i].emfd, - &s->ports[i].read_closure); + sp->read_closure.cb = on_read; + sp->read_closure.cb_arg = sp; + grpc_fd_notify_on_read(exec_ctx, sp->emfd, + &sp->read_closure); s->active_ports++; } gpr_mu_unlock(&s->mu); } +int grpc_tcp_listener_get_port(grpc_tcp_listener *listener) { + server_port *sp = (server_port *)listener; + return sp->port; +} + +void grpc_tcp_listener_ref(grpc_tcp_listener *listener) { + server_port *sp = (server_port *)listener; + gpr_ref(&sp->refs); +} + +void grpc_tcp_listener_unref(grpc_tcp_listener *listener) { + server_port *sp = (server_port *)listener; + if (sp->is_dual_stack_second_port) return; + if (gpr_unref(&sp->refs)) { + if (sp->dual_stack_second_port) gpr_free(sp->dual_stack_second_port); + gpr_free(listener); + } +} + #endif diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index 3fea8b5b35..c7a9fffa10 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -35,7 +35,8 @@ #ifdef GPR_WINSOCK_SOCKET -#define _GNU_SOURCE +#include + #include "src/core/iomgr/sockaddr_utils.h" #include @@ -51,7 +52,6 @@ #include "src/core/iomgr/tcp_server.h" #include "src/core/iomgr/tcp_windows.h" -#define INIT_PORT_CAP 2 #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 /* one listening port */ @@ -61,14 +61,19 @@ typedef struct server_port { gpr_uint8 addresses[(sizeof(struct sockaddr_in6) + 16) * 2]; /* This will hold the socket for the next accept. */ SOCKET new_socket; - /* The listener winsocked. */ + /* The listener winsocket. */ grpc_winsocket *socket; + /* The actual TCP port number. */ + int port; grpc_tcp_server *server; /* The cached AcceptEx for that port. */ LPFN_ACCEPTEX AcceptEx; int shutting_down; /* closure for socket notification of accept being ready */ grpc_closure on_accept; + gpr_refcount refs; + /* linked list */ + struct server_port *next; } server_port; /* the overall server */ @@ -82,10 +87,8 @@ struct grpc_tcp_server { /* active port count: how many ports are actually still listening */ int active_ports; - /* all listening ports */ - server_port *ports; - size_t nports; - size_t port_capacity; + /* linked list of server ports */ + server_port *head; /* shutdown callback */ grpc_closure *shutdown_complete; @@ -99,9 +102,7 @@ grpc_tcp_server *grpc_tcp_server_create(void) { s->active_ports = 0; s->on_accept_cb = NULL; s->on_accept_cb_arg = NULL; - s->ports = gpr_malloc(sizeof(server_port) * INIT_PORT_CAP); - s->nports = 0; - s->port_capacity = INIT_PORT_CAP; + s->head = NULL; s->shutdown_complete = NULL; return s; } @@ -109,26 +110,26 @@ grpc_tcp_server *grpc_tcp_server_create(void) { static void dont_care_about_shutdown_completion(void *arg) {} static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - size_t i; - grpc_exec_ctx_enqueue(exec_ctx, s->shutdown_complete, 1); /* Now that the accepts have been aborted, we can destroy the sockets. The IOCP won't get notified on these, so we can flag them as already closed by the system. */ - for (i = 0; i < s->nports; i++) { - server_port *sp = &s->ports[i]; + while (s->head) { + server_port *sp = s->head; + s->head = sp->next; + sp->next = NULL; grpc_winsocket_destroy(sp->socket); + grpc_tcp_listener_unref((grpc_tcp_listener *) sp); } - gpr_free(s->ports); gpr_free(s); } /* Public function. Stops and destroys a grpc_tcp_server. */ void grpc_tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_closure *shutdown_complete) { - size_t i; int immediately_done = 0; + server_port *sp; gpr_mu_lock(&s->mu); s->shutdown_complete = shutdown_complete; @@ -138,8 +139,7 @@ void grpc_tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, if (s->active_ports == 0) { immediately_done = 1; } - for (i = 0; i < s->nports; i++) { - server_port *sp = &s->ports[i]; + for (sp = s->head; sp; sp = sp->next) { sp->shutting_down = 1; grpc_winsocket_shutdown(sp->socket); } @@ -351,16 +351,17 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, int from_iocp) { start_accept(exec_ctx, sp); } -static int add_socket_to_server(grpc_tcp_server *s, SOCKET sock, - const struct sockaddr *addr, size_t addr_len) { - server_port *sp; +static server_port *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, + const struct sockaddr *addr, + size_t addr_len) { + server_port *sp = NULL; int port; int status; GUID guid = WSAID_ACCEPTEX; DWORD ioctl_num_bytes; LPFN_ACCEPTEX AcceptEx; - if (sock == INVALID_SOCKET) return -1; + if (sock == INVALID_SOCKET) return NULL; /* We need to grab the AcceptEx pointer for that port, as it may be interface-dependent. We'll cache it to avoid doing that again. */ @@ -373,37 +374,35 @@ static int add_socket_to_server(grpc_tcp_server *s, SOCKET sock, gpr_log(GPR_ERROR, "on_connect error: %s", utf8_message); gpr_free(utf8_message); closesocket(sock); - return -1; + return NULL; } port = prepare_socket(sock, addr, addr_len); if (port >= 0) { gpr_mu_lock(&s->mu); GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server"); - /* append it to the list under a lock */ - if (s->nports == s->port_capacity) { - /* too many ports, and we need to store their address in a closure */ - /* TODO(ctiller): make server_port a linked list */ - abort(); - } - sp = &s->ports[s->nports++]; + sp = gpr_malloc(sizeof(server_port)); + sp->next = s->head; + s->head = sp; sp->server = s; sp->socket = grpc_winsocket_create(sock, "listener"); sp->shutting_down = 0; sp->AcceptEx = AcceptEx; sp->new_socket = INVALID_SOCKET; + sp->port = port; + gpr_ref_init(&sp->refs, 1); grpc_closure_init(&sp->on_accept, on_accept, sp); GPR_ASSERT(sp->socket); gpr_mu_unlock(&s->mu); } - return port; + return sp; } -int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len) { - int allocated_port = -1; - unsigned i; +grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, + const void *addr, + size_t addr_len) { + server_port *sp; SOCKET sock; struct sockaddr_in6 addr6_v4mapped; struct sockaddr_in6 wildcard; @@ -415,9 +414,9 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, /* Check if this is a wildcard port, and if so, try to keep the port the same as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { - for (i = 0; i < s->nports; i++) { + for (sp = s->head; sp; sp = sp->next) { sockname_len = sizeof(sockname_temp); - if (0 == getsockname(s->ports[i].socket->socket, + if (0 == getsockname(sp->socket->socket, (struct sockaddr *)&sockname_temp, &sockname_len)) { port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); if (port > 0) { @@ -452,33 +451,55 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, gpr_free(utf8_message); } - allocated_port = add_socket_to_server(s, sock, addr, addr_len); + sp = add_socket_to_server(s, sock, addr, addr_len); gpr_free(allocated_addr); - return allocated_port; + return (grpc_tcp_listener *)sp; } -SOCKET -grpc_tcp_server_get_socket(grpc_tcp_server *s, unsigned index) { - return (index < s->nports) ? s->ports[index].socket->socket : INVALID_SOCKET; +int grpc_tcp_server_get_fd(grpc_tcp_server *s, unsigned port_index) { + server_port *sp; + for (sp = s->head; sp && port_index != 0; sp = sp->next, port_index--); + if (port_index == 0 && sp) { + return _open_osfhandle(sp->socket->socket, 0); + } else { + return -1; + } } void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_pollset **pollset, size_t pollset_count, grpc_tcp_server_cb on_accept_cb, void *on_accept_cb_arg) { - size_t i; + server_port *sp; GPR_ASSERT(on_accept_cb); gpr_mu_lock(&s->mu); GPR_ASSERT(!s->on_accept_cb); GPR_ASSERT(s->active_ports == 0); s->on_accept_cb = on_accept_cb; s->on_accept_cb_arg = on_accept_cb_arg; - for (i = 0; i < s->nports; i++) { - start_accept(exec_ctx, s->ports + i); + for (sp = s->head; sp; sp = sp->next) { + start_accept(exec_ctx, sp); s->active_ports++; } gpr_mu_unlock(&s->mu); } +int grpc_tcp_listener_get_port(grpc_tcp_listener *listener) { + server_port *sp = (server_port *)listener; + return sp->port; +} + +void grpc_tcp_listener_ref(grpc_tcp_listener *listener) { + server_port *sp = (server_port *)listener; + gpr_ref(&sp->refs); +} + +void grpc_tcp_listener_unref(grpc_tcp_listener *listener) { + server_port *sp = (server_port *)listener; + if (gpr_unref(&sp->refs)) { + gpr_free(listener); + } +} + #endif /* GPR_WINSOCK_SOCKET */ diff --git a/src/core/security/server_secure_chttp2.c b/src/core/security/server_secure_chttp2.c index 851e0cfab3..1ea269bf8f 100644 --- a/src/core/security/server_secure_chttp2.c +++ b/src/core/security/server_secure_chttp2.c @@ -249,9 +249,11 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, } for (i = 0; i < resolved->naddrs; i++) { - port_temp = grpc_tcp_server_add_port( + grpc_tcp_listener *listener; + listener = grpc_tcp_server_add_port( tcp, (struct sockaddr *)&resolved->addrs[i].addr, resolved->addrs[i].len); + port_temp = grpc_tcp_listener_get_port(listener); if (port_temp >= 0) { if (port_num == -1) { port_num = port_temp; diff --git a/src/core/surface/server_chttp2.c b/src/core/surface/server_chttp2.c index 580b91573c..1408f9c159 100644 --- a/src/core/surface/server_chttp2.c +++ b/src/core/surface/server_chttp2.c @@ -107,9 +107,11 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { } for (i = 0; i < resolved->naddrs; i++) { - port_temp = grpc_tcp_server_add_port( + grpc_tcp_listener *listener; + listener = grpc_tcp_server_add_port( tcp, (struct sockaddr *)&resolved->addrs[i].addr, resolved->addrs[i].len); + port_temp = grpc_tcp_listener_get_port(listener); if (port_temp >= 0) { if (port_num == -1) { port_num = port_temp; diff --git a/test/core/util/reconnect_server.c b/test/core/util/reconnect_server.c index ee481ef674..c064fb32c6 100644 --- a/test/core/util/reconnect_server.c +++ b/test/core/util/reconnect_server.c @@ -113,6 +113,7 @@ void reconnect_server_init(reconnect_server *server) { void reconnect_server_start(reconnect_server *server, int port) { struct sockaddr_in addr; + grpc_tcp_listener *listener; int port_added; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -121,8 +122,9 @@ void reconnect_server_start(reconnect_server *server, int port) { memset(&addr.sin_addr, 0, sizeof(addr.sin_addr)); server->tcp_server = grpc_tcp_server_create(); - port_added = + listener = grpc_tcp_server_add_port(server->tcp_server, &addr, sizeof(addr)); + port_added = grpc_tcp_listener_get_port(listener); GPR_ASSERT(port_added == port); grpc_tcp_server_start(&exec_ctx, server->tcp_server, server->pollsets, 1, -- cgit v1.2.3 From 8f714620b21d6c25b9d67d6d36b1e216dc8cbe94 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Thu, 19 Nov 2015 11:16:54 -0800 Subject: Renaming server_port to grpc_tcp_listener - there's no need for casting... --- src/core/iomgr/tcp_server_posix.c | 42 ++++++++++++++++++------------------- src/core/iomgr/tcp_server_windows.c | 40 +++++++++++++++++------------------ 2 files changed, 41 insertions(+), 41 deletions(-) (limited to 'src/core') diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c index 3dab652efa..fbc0e974e6 100644 --- a/src/core/iomgr/tcp_server_posix.c +++ b/src/core/iomgr/tcp_server_posix.c @@ -74,7 +74,7 @@ static gpr_once s_init_max_accept_queue_size; static int s_max_accept_queue_size; /* one listening port */ -typedef struct server_port { +struct grpc_tcp_listener { int fd; grpc_fd *emfd; grpc_tcp_server *server; @@ -88,10 +88,10 @@ typedef struct server_port { grpc_closure read_closure; grpc_closure destroyed_closure; gpr_refcount refs; - struct server_port *next; - struct server_port *dual_stack_second_port; + struct grpc_tcp_listener *next; + struct grpc_tcp_listener *dual_stack_second_port; int is_dual_stack_second_port; -} server_port; +}; static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) { struct stat st; @@ -118,7 +118,7 @@ struct grpc_tcp_server { int shutdown; /* linked list of server ports */ - server_port *head; + grpc_tcp_listener *head; unsigned nports; /* shutdown callback */ @@ -144,14 +144,14 @@ grpc_tcp_server *grpc_tcp_server_create(void) { } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - server_port *sp; + grpc_tcp_listener *sp; grpc_exec_ctx_enqueue(exec_ctx, s->shutdown_complete, 1); gpr_mu_destroy(&s->mu); for (sp = s->head; sp; sp = sp->next) { - grpc_tcp_listener_unref((grpc_tcp_listener *)sp); + grpc_tcp_listener_unref(sp); } gpr_free(s); @@ -183,7 +183,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { } if (s->head) { - server_port *sp; + grpc_tcp_listener *sp; for (sp = s->head; sp; sp = sp->next) { if (sp->addr.sockaddr.sa_family == AF_UNIX) { unlink_if_unix_domain_socket(&sp->addr.un); @@ -211,7 +211,7 @@ void grpc_tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, /* shutdown all fd's */ if (s->active_ports) { - server_port *sp; + grpc_tcp_listener *sp; for (sp = s->head; sp; sp = sp->next) { grpc_fd_shutdown(exec_ctx, sp->emfd); } @@ -304,7 +304,7 @@ error: /* event manager callback when reads are ready */ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, int success) { - server_port *sp = arg; + grpc_tcp_listener *sp = arg; grpc_fd *fdobj; size_t i; @@ -370,10 +370,10 @@ error: } } -static server_port *add_socket_to_server(grpc_tcp_server *s, int fd, +static grpc_tcp_listener *add_socket_to_server(grpc_tcp_server *s, int fd, const struct sockaddr *addr, size_t addr_len) { - server_port *sp = NULL; + grpc_tcp_listener *sp = NULL; int port; char *addr_str; char *name; @@ -385,7 +385,7 @@ static server_port *add_socket_to_server(grpc_tcp_server *s, int fd, gpr_mu_lock(&s->mu); s->nports++; GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server"); - sp = gpr_malloc(sizeof(server_port)); + sp = gpr_malloc(sizeof(grpc_tcp_listener)); sp->next = s->head; s->head = sp; sp->server = s; @@ -410,8 +410,8 @@ grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, size_t addr_len) { int allocated_port = -1; - server_port *sp; - server_port *sp2 = NULL; + grpc_tcp_listener *sp; + grpc_tcp_listener *sp2 = NULL; int fd; grpc_dualstack_mode dsmode; struct sockaddr_in6 addr6_v4mapped; @@ -491,11 +491,11 @@ grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, done: gpr_free(allocated_addr); - return (grpc_tcp_listener *)sp; + return sp; } int grpc_tcp_server_get_fd(grpc_tcp_server *s, unsigned port_index) { - server_port *sp; + grpc_tcp_listener *sp; for (sp = s->head; sp && port_index != 0; sp = sp->next, port_index--); if (port_index == 0 && sp) { return sp->fd; @@ -509,7 +509,7 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_tcp_server_cb on_accept_cb, void *on_accept_cb_arg) { size_t i; - server_port *sp; + grpc_tcp_listener *sp; GPR_ASSERT(on_accept_cb); gpr_mu_lock(&s->mu); GPR_ASSERT(!s->on_accept_cb); @@ -532,17 +532,17 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, } int grpc_tcp_listener_get_port(grpc_tcp_listener *listener) { - server_port *sp = (server_port *)listener; + grpc_tcp_listener *sp = listener; return sp->port; } void grpc_tcp_listener_ref(grpc_tcp_listener *listener) { - server_port *sp = (server_port *)listener; + grpc_tcp_listener *sp = listener; gpr_ref(&sp->refs); } void grpc_tcp_listener_unref(grpc_tcp_listener *listener) { - server_port *sp = (server_port *)listener; + grpc_tcp_listener *sp = listener; if (sp->is_dual_stack_second_port) return; if (gpr_unref(&sp->refs)) { if (sp->dual_stack_second_port) gpr_free(sp->dual_stack_second_port); diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c index c7a9fffa10..e4a1d7f498 100644 --- a/src/core/iomgr/tcp_server_windows.c +++ b/src/core/iomgr/tcp_server_windows.c @@ -55,7 +55,7 @@ #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 /* one listening port */ -typedef struct server_port { +struct grpc_tcp_listener { /* This seemingly magic number comes from AcceptEx's documentation. each address buffer needs to have at least 16 more bytes at their end. */ gpr_uint8 addresses[(sizeof(struct sockaddr_in6) + 16) * 2]; @@ -73,8 +73,8 @@ typedef struct server_port { grpc_closure on_accept; gpr_refcount refs; /* linked list */ - struct server_port *next; -} server_port; + struct grpc_tcp_listener *next; +}; /* the overall server */ struct grpc_tcp_server { @@ -88,7 +88,7 @@ struct grpc_tcp_server { int active_ports; /* linked list of server ports */ - server_port *head; + grpc_tcp_listener *head; /* shutdown callback */ grpc_closure *shutdown_complete; @@ -116,11 +116,11 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { The IOCP won't get notified on these, so we can flag them as already closed by the system. */ while (s->head) { - server_port *sp = s->head; + grpc_tcp_listener *sp = s->head; s->head = sp->next; sp->next = NULL; grpc_winsocket_destroy(sp->socket); - grpc_tcp_listener_unref((grpc_tcp_listener *) sp); + grpc_tcp_listener_unref(sp); } gpr_free(s); } @@ -129,7 +129,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { void grpc_tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_closure *shutdown_complete) { int immediately_done = 0; - server_port *sp; + grpc_tcp_listener *sp; gpr_mu_lock(&s->mu); s->shutdown_complete = shutdown_complete; @@ -199,7 +199,7 @@ error: } static void decrement_active_ports_and_notify(grpc_exec_ctx *exec_ctx, - server_port *sp) { + grpc_tcp_listener *sp) { int notify = 0; sp->shutting_down = 0; gpr_mu_lock(&sp->server->mu); @@ -216,7 +216,7 @@ static void decrement_active_ports_and_notify(grpc_exec_ctx *exec_ctx, /* In order to do an async accept, we need to create a socket first which will be the one assigned to the new incoming connection. */ -static void start_accept(grpc_exec_ctx *exec_ctx, server_port *port) { +static void start_accept(grpc_exec_ctx *exec_ctx, grpc_tcp_listener *port) { SOCKET sock = INVALID_SOCKET; char *message; char *utf8_message; @@ -276,7 +276,7 @@ failure: /* Event manager callback when reads are ready. */ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, int from_iocp) { - server_port *sp = arg; + grpc_tcp_listener *sp = arg; SOCKET sock = sp->new_socket; grpc_winsocket_callback_info *info = &sp->socket->read_info; grpc_endpoint *ep = NULL; @@ -351,10 +351,10 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, int from_iocp) { start_accept(exec_ctx, sp); } -static server_port *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, +static grpc_tcp_listener *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, const struct sockaddr *addr, size_t addr_len) { - server_port *sp = NULL; + grpc_tcp_listener *sp = NULL; int port; int status; GUID guid = WSAID_ACCEPTEX; @@ -381,7 +381,7 @@ static server_port *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, if (port >= 0) { gpr_mu_lock(&s->mu); GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server"); - sp = gpr_malloc(sizeof(server_port)); + sp = gpr_malloc(sizeof(grpc_tcp_listener)); sp->next = s->head; s->head = sp; sp->server = s; @@ -402,7 +402,7 @@ static server_port *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, size_t addr_len) { - server_port *sp; + grpc_tcp_listener *sp; SOCKET sock; struct sockaddr_in6 addr6_v4mapped; struct sockaddr_in6 wildcard; @@ -454,11 +454,11 @@ grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, sp = add_socket_to_server(s, sock, addr, addr_len); gpr_free(allocated_addr); - return (grpc_tcp_listener *)sp; + return sp; } int grpc_tcp_server_get_fd(grpc_tcp_server *s, unsigned port_index) { - server_port *sp; + grpc_tcp_listener *sp; for (sp = s->head; sp && port_index != 0; sp = sp->next, port_index--); if (port_index == 0 && sp) { return _open_osfhandle(sp->socket->socket, 0); @@ -471,7 +471,7 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_pollset **pollset, size_t pollset_count, grpc_tcp_server_cb on_accept_cb, void *on_accept_cb_arg) { - server_port *sp; + grpc_tcp_listener *sp; GPR_ASSERT(on_accept_cb); gpr_mu_lock(&s->mu); GPR_ASSERT(!s->on_accept_cb); @@ -486,17 +486,17 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, } int grpc_tcp_listener_get_port(grpc_tcp_listener *listener) { - server_port *sp = (server_port *)listener; + grpc_tcp_listener *sp = listener; return sp->port; } void grpc_tcp_listener_ref(grpc_tcp_listener *listener) { - server_port *sp = (server_port *)listener; + grpc_tcp_listener *sp = listener; gpr_ref(&sp->refs); } void grpc_tcp_listener_unref(grpc_tcp_listener *listener) { - server_port *sp = (server_port *)listener; + grpc_tcp_listener *sp = listener; if (gpr_unref(&sp->refs)) { gpr_free(listener); } -- cgit v1.2.3 From c6a7c6e02cdf52c0ff99f4451923e3858db74ed4 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 19 Nov 2015 21:55:44 +0100 Subject: Fixing use after free under Posix (was already fixed for Windows.) --- src/core/iomgr/tcp_server_posix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c index fbc0e974e6..5daf406c99 100644 --- a/src/core/iomgr/tcp_server_posix.c +++ b/src/core/iomgr/tcp_server_posix.c @@ -144,13 +144,13 @@ grpc_tcp_server *grpc_tcp_server_create(void) { } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - grpc_tcp_listener *sp; - grpc_exec_ctx_enqueue(exec_ctx, s->shutdown_complete, 1); gpr_mu_destroy(&s->mu); - for (sp = s->head; sp; sp = sp->next) { + while (s->head) { + grpc_tcp_listener *sp = s->head; + s->head = sp->next; grpc_tcp_listener_unref(sp); } -- cgit v1.2.3 From d86115e2f6f1797adaa9a2ab8864f1feb9615dfa Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 20 Nov 2015 05:56:25 +0100 Subject: Renaming dual_stack_second_port to sibling. --- src/core/iomgr/tcp_server_posix.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c index 5daf406c99..1439dfcd6e 100644 --- a/src/core/iomgr/tcp_server_posix.c +++ b/src/core/iomgr/tcp_server_posix.c @@ -67,7 +67,6 @@ #include #include -#define INIT_PORT_CAP 2 #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 static gpr_once s_init_max_accept_queue_size; @@ -89,8 +88,12 @@ struct grpc_tcp_listener { grpc_closure destroyed_closure; gpr_refcount refs; struct grpc_tcp_listener *next; - struct grpc_tcp_listener *dual_stack_second_port; - int is_dual_stack_second_port; + /* When we add a listener, more than one can be created, mainly because of + IPv6. A sibling will still be in the normal list, but will be flagged + as such. Any action, such as ref or unref, will affect all of the + siblings in the list. */ + struct grpc_tcp_listener *sibling; + int is_sibling; }; static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) { @@ -394,8 +397,8 @@ static grpc_tcp_listener *add_socket_to_server(grpc_tcp_server *s, int fd, memcpy(sp->addr.untyped, addr, addr_len); sp->addr_len = addr_len; sp->port = port; - sp->is_dual_stack_second_port = 0; - sp->dual_stack_second_port = NULL; + sp->is_sibling = 0; + sp->sibling = NULL; gpr_ref_init(&sp->refs, 1); GPR_ASSERT(sp->emfd); gpr_mu_unlock(&s->mu); @@ -486,8 +489,8 @@ grpc_tcp_listener *grpc_tcp_server_add_port(grpc_tcp_server *s, addr_len = sizeof(addr4_copy); } sp = add_socket_to_server(s, fd, addr, addr_len); - sp->dual_stack_second_port = sp2; - if (sp2) sp2->is_dual_stack_second_port = 1; + sp->sibling = sp2; + if (sp2) sp2->is_sibling = 1; done: gpr_free(allocated_addr); @@ -543,9 +546,14 @@ void grpc_tcp_listener_ref(grpc_tcp_listener *listener) { void grpc_tcp_listener_unref(grpc_tcp_listener *listener) { grpc_tcp_listener *sp = listener; - if (sp->is_dual_stack_second_port) return; + if (sp->is_sibling) return; if (gpr_unref(&sp->refs)) { - if (sp->dual_stack_second_port) gpr_free(sp->dual_stack_second_port); + grpc_tcp_listener *sibling = sp->sibling; + while (sibling) { + sp = sibling; + sibling = sp->sibling; + gpr_free(sp); + } gpr_free(listener); } } -- cgit v1.2.3