diff options
author | 2017-06-14 11:09:31 +0200 | |
---|---|---|
committer | 2017-06-14 11:09:31 +0200 | |
commit | 28903559996523ab30f0aaeddea794b9ea7219f4 (patch) | |
tree | d41c67d82d6529ada74e65e033acaaaf14bcc360 /src/core/lib | |
parent | 1cd27b9a9d3b50927a3fd4695e9511dcfabbd8f3 (diff) |
Create jwt_verifier.c
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/security/credentials/jwt/jwt_verifier.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 23607b30ff..63b591e116 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -472,8 +472,9 @@ int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) * left NULL (in case only the public key is used). */ if ((r->n == NULL && n == NULL) - || (r->e == NULL && e == NULL)) + || (r->e == NULL && e == NULL)) { return 0; + } if (n != NULL) { BN_free(r->n); @@ -490,7 +491,7 @@ int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) return 1; } -#endif +#endif // OPENSSL_VERSION_NUMBER < 0x10100000L static EVP_PKEY *pkey_from_jwk(grpc_exec_ctx *exec_ctx, const grpc_json *json, const char *kty) { @@ -526,7 +527,7 @@ static EVP_PKEY *pkey_from_jwk(grpc_exec_ctx *exec_ctx, const grpc_json *json, goto end; } if (!RSA_set0_key(rsa, tmp_n, tmp_e, NULL)) { - gpr_log(GPR_ERROR, "Missing RSA public key field."); + gpr_log(GPR_ERROR, "Cannot set RSA key from inputs."); goto end; } result = EVP_PKEY_new(); |