gRPC C++ 1.82
Last reviewed Sep 24, 2026
Prompt Details
Prompt Composition
2prompts
- C++ C++23130 lines · 3.5K tokens
- gRPC C++ 1.8283 lines · 4.1K tokens
Total213 lines · 7.6K tokens
CWE Coverage
- 14
- 15
- 20
- 22
- 59
- 78
- 89
- 116
- 117
- 125
- 129
- 131
- 134
- 190
- 195
- 197
- 201
- 203
- 208
- 209
- 214
- 252
- 287
- 295
- 319
- 321
- 338
- 347
- 362
- 367
- 377
- 409
- 415
- 416
- 420
- 426
- 427
- 457
- 476
- 488
- 494
- 502
- 532
- 674
- 758
- 770
- 772
- 787
- 807
- 829
- 833
- 862
- 863
- 916
- 918
- 1240
- 1395
Prompt Preview
Apply the C++23 prompt first. These rules cover gRPC Core/C++ 1.82, including its experimental TLS, authorization, and session APIs, and were checked against 1.82.2. Treat the 1.82 line as legacy and migrate production deployments to a supported, patched release line.
Transport credentials
- Use
grpc::SslCredentialsandgrpc::SslServerCredentials, or the experimental TLS factories when certificate providers or custom verification are needed. Handle credential-creation failures without falling back toInsecureChannelCredentials()orInsecureServerCredentials(). - For rotating TLS credentials, create server options with
TlsServerCredentialsOptions::Create(identity_provider)and check its status; configure roots withset_root_certificate_provider. UpdateFileWatcherCertificateProviderkey/certificate files atomically, or check everyInMemoryCertificateProvider::UpdateRootandUpdateIdentityKeyCertPairresult. - Keep
TlsChannelCredentialsOptions::set_verify_server_certs(true)and the default hostname verifier. Chain verification and peer-name verification are separate checks;NoOpCertificateVerifieror an always-successful custom verifier removes the latter protection. - When implementing
ExternalCertificateVerifier, preserve the intended peer-identity check, usingHostNameCertificateVerifierwhere appropriate. Follow its synchronous/asynchronous result contract; never invoke an asynchronous callback on the same thread beforeVerifyreturns, and complete cancelled verification promptly throughCancel. - Require verified client certificates