Pem Certificate strings to connect to Kafka in .Net client


I need some help with the SSL connectivity to Kafka, Currently we are able to connect to Kafka by providing certificate and Key locations as part of the configurations.
(SslCertficateLocation, SslCaLocation and SslKeyLocation). We are using GCP Kafka.

Recently we upgraded Confuent.Kafka to 1.9.3 to use PEM strings to connect with Kafka.
(SslCertificatePem, SslCaPem, SslKeyPem). We are getting SSL HandShake issue saying “Broker Certificate is not verified”. We tried multiple ways to pass the strings like removing additional metadata text, by placing /n for each line, but still no luck.

so, Is there any specific format or prerequisites to use PEM strings in the config ?
Is there any specific version of Confluent I need to use ?

Thank You for your time,