<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 8, 2020 at 11:06 AM Bin Li (BLOOMBERG/ 120 PARK) <<a href="mailto:bli111@bloomberg.net">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="white-space:pre-wrap;font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><br><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">Also tried to compare the hexdigest from the ca_cert input string</div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><br></div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">hashlib.sha256(bytes(ca_cert_string, "utf8")).hexdigest()</div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><br></div></div></div></blockquote><div><br></div><div>That should work. Pulp does the exact same thing when serializing these fields[0]. Can you please file an issue? <br></div><div><br></div><div>[0] <a href="https://github.com/pulp/pulpcore/blob/master/pulpcore/app/serializers/fields.py#L289">https://github.com/pulp/pulpcore/blob/master/pulpcore/app/serializers/fields.py#L289</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="white-space:pre-wrap;font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""></div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">It is still doesn't match what pulp gives. What else should I try?</div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><br></div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">Thanks</div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><br></div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><br></div><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><br><div><div>From: Bin Li (BLOOMBERG/ 120 PARK) At: 01/08/20 10:29:19</div>To: <a href="mailto:dkliban@redhat.com" target="_blank"> dkliban@redhat.com</a><br>Cc: <a href="mailto:pulp-list@redhat.com" target="_blank"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulp3 remote ca_cert</div><br><div style="white-space:pre-wrap;font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth"">Thanks. I tried this.<div># openssl dgst -sha256 redhat-uep.pem</div><div>SHA256(redhat-uep.pem)= 39e65fabe7560d366be3bc4d133bcdef13e30d41ac552a05d182e2f66395422d</div><div><br></div><div>It doesn't match the ca_cert in pulp. Just wondering how exactly pulp GET the Sha256 sum.<br><br><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth""><div><div><div>From: <a href="mailto:dkliban@redhat.com" target="_blank">dkliban@redhat.com</a> At: 01/07/20 16:23:34</div>To: <a href="mailto:bli111@bloomberg.net" target="_blank"> Bin Li (BLOOMBERG/ 120 PARK ) </a><br>Cc: <a href="mailto:pulp-list@redhat.com" target="_blank"> pulp-list@redhat.com</a><br>Subject: Re: [Pulp-list] pulp3 remote ca_cert</div><br></div><div style="background:white none repeat scroll 0% 0%;color:black;font-family:Arial,"BB.Proportional";font-size:small;white-space:normal"><div><blockquote><div dir="ltr"><div>The values returned are SHA256 checksums of the strings you initially submitted. This is documented in the Response section here[0].</div><div><br></div><div>[0] <a href="https://docs.pulpproject.org/restapi.html#operation/remotes_file_file_read" target="_blank">https://docs.pulpproject.org/restapi.html#operation/remotes_file_file_read</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 7, 2020 at 1:49 PM Bin Li (BLOOMBERG/ 120 PARK) <<a href="mailto:bli111@bloomberg.net" target="_blank">bli111@bloomberg.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:small;font-family:"Courier New",Courier,"BB.FixedWidth";white-space:pre-wrap"><div>Happy new year.</div><div><br></div><div><div>I want to compare the cert configured in pulp with our current valid entitlement cert. If they are different, the cert in pulp will be updated. The question is if it is possible to compare since they always look different?</div><div><br></div></div><div>When I list a remote, the certs are showed like below</div>{<div>            "ca_cert": "b8bd944ff40f1756c08743800453b724f133029725dc762ed9ce6504a828a5ec", </div><div>            "client_cert": "d24baa45b4b554e782dd134e6c5f1eb1f88e1d88122d3d417b05f7f8153954a1", </div><div>            "client_key": "55ece66e807b5c979f425e55f90958b8fbc769320a0bdb5f4c3563464e8c9530", </div><div>...</div><div>}</div><div><br></div><div>This is different than the cert when I created the remote:</div><div>('-----BEGIN CERTIFICATE-----\n'</div><div> 'MIIG/TCCBOWgAwIBAgIBNzANBgkqhkiG9w0BAQUFADCBsTELMAkGA1UEBhMCVVMx\n'</div><div> 'FzAVBgNVBAgMDk5vcnRoIENhcm9saW5hMRYwFAYDVQQKDA1SZWQgSGF0LCBJbmMu\n'</div><div> 'MRgwFgYDVQQLDA9SZWQgSGF0IE5ldHdvcmsxMTAvBgNVBAMMKFJlZCBIYXQgRW50\n'</div><div> 'aXRsZW1lbnQgT3BlcmF0aW9ucyBBdXRob3JpdHkxJDAiBgkqhkiG9w0BCQEWFWNh\n'</div><div> 'LXN1cHBvcnRAcmVkaGF0LmNvbTAeFw0xMDEwMDQxMzI3NDhaFw0zMDA5MjkxMzI3\n'</div><div> 'NDhaMIGuMQswCQYDV...</div><div><br></div><div><br></div><div><br></div></div>_______________________________________________<br>Pulp-list mailing list<br><a href="mailto:Pulp-list@redhat.com" target="_blank">Pulp-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/pulp-list" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a></blockquote></div></blockquote><br></div></div></div></div></div></div></div></div></blockquote></div></div>