Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/c/l/cloudbase-init-HEAD/cloudbaseinit/utils/windows/x509.py   cloudbase-init(Download)
    def _get_cert_base64(self, cert_data):
        base64_cert_data = cert_data
        if base64_cert_data.startswith(x509constants.PEM_HEADER):
            base64_cert_data = base64_cert_data[len(x509constants.PEM_HEADER):]
        if base64_cert_data.endswith(x509constants.PEM_FOOTER):
            base64_cert_data = base64_cert_data[:len(base64_cert_data) -
                                                len(x509constants.PEM_FOOTER)]

src/c/l/cloudbase-init-HEAD/cloudbaseinit/metadata/services/maasservice.py   cloudbase-init(Download)
    def get_client_auth_certs(self):
        return self._get_list_from_text(
            self._get_cache_data('%s/meta-data/x509' % self._metadata_version),
            "%s\n" % x509constants.PEM_FOOTER)
 

src/c/l/cloudbase-init-HEAD/cloudbaseinit/tests/utils/windows/test_x509.py   cloudbase-init(Download)
    def test_get_cert_base64(self):
        fake_cert_data = ''
        fake_cert_data += x509constants.PEM_HEADER + '\n'
        fake_cert_data += 'fake cert' + '\n'
        fake_cert_data += x509constants.PEM_FOOTER
        fake_cert_data += x509constants.PEM_HEADER + '\n'
        fake_cert_data += 'fake cert' + '\n'
        fake_cert_data += x509constants.PEM_FOOTER
        mock_get_cert_base64.return_value = 'fake cert'
        mock_CryptStringToBinaryA.return_value = crypttstr

src/c/l/cloudbase-init-HEAD/cloudbaseinit/tests/metadata/services/test_maasservice.py   cloudbase-init(Download)
            '%s/meta-data/x509' % self._maasservice._metadata_version)
        mock_get_list_from_text.assert_called_once_with(
            mock_get_cache_data(), "%s\n" % x509constants.PEM_FOOTER)
        self.assertEqual(response, mock_get_list_from_text())