X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnet%2Fquic%2Fcrypto%2Fchannel_id_openssl.cc;h=f0cdcbfe43c980f4c44e277ce4065dd29e083424;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=130f3bd3d0eb7f023af891bc38bc69f7adc966de;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/net/quic/crypto/channel_id_openssl.cc b/src/net/quic/crypto/channel_id_openssl.cc index 130f3bd..f0cdcbf 100644 --- a/src/net/quic/crypto/channel_id_openssl.cc +++ b/src/net/quic/crypto/channel_id_openssl.cc @@ -36,7 +36,7 @@ bool ChannelIDVerifier::VerifyRaw(StringPiece key, crypto::ScopedOpenSSL::Type p256( EC_GROUP_new_by_curve_name(NID_X9_62_prime256v1)); - if (p256.get() == NULL) { + if (p256.get() == nullptr) { return false; } @@ -50,23 +50,23 @@ bool ChannelIDVerifier::VerifyRaw(StringPiece key, const uint8* signature_bytes = reinterpret_cast(signature.data()); - if (BN_bin2bn(key_bytes + 0, 32, x.get()) == NULL || - BN_bin2bn(key_bytes + 32, 32, y.get()) == NULL || - BN_bin2bn(signature_bytes + 0, 32, sig.r) == NULL || - BN_bin2bn(signature_bytes + 32, 32, sig.s) == NULL) { + if (BN_bin2bn(key_bytes + 0, 32, x.get()) == nullptr || + BN_bin2bn(key_bytes + 32, 32, y.get()) == nullptr || + BN_bin2bn(signature_bytes + 0, 32, sig.r) == nullptr || + BN_bin2bn(signature_bytes + 32, 32, sig.s) == nullptr) { return false; } crypto::ScopedOpenSSL::Type point( EC_POINT_new(p256.get())); - if (point.get() == NULL || + if (point.get() == nullptr || !EC_POINT_set_affine_coordinates_GFp(p256.get(), point.get(), x.get(), - y.get(), NULL)) { + y.get(), nullptr)) { return false; } crypto::ScopedEC_KEY ecdsa_key(EC_KEY_new()); - if (ecdsa_key.get() == NULL || + if (ecdsa_key.get() == nullptr || !EC_KEY_set_group(ecdsa_key.get(), p256.get()) || !EC_KEY_set_public_key(ecdsa_key.get(), point.get())) { return false;