title: SCEP Payload Not working
body: <p>I've sent a device a configuration profile with an SCEP payload. When the device downloads this config profile, it is supposed to connect to my Java SCEP server and write a CSR to its OutputStream in PKCS10 form. However, when I print the contents of the stream, I get a bunch of garbled nonsense; I know that the request should start with -----BEGIN CERTIFICATE REQUEST----- and end with -----END CERTIFICATE REQUEST-----, but this is not the case. Here is the SCEP payload:</p>
  
  <pre><code>            &lt;dict&gt;
                      &lt;key&gt;PayloadContent&lt;/key&gt;
                      &lt;dict&gt;
                              &lt;key&gt;Key Type&lt;/key&gt;
                              &lt;string&gt;RSA&lt;/string&gt;
                              &lt;key&gt;Key Usage&lt;/key&gt;
                              &lt;integer&gt;0&lt;/integer&gt;
                              &lt;key&gt;Keysize&lt;/key&gt;
                              &lt;integer&gt;1024&lt;/integer&gt;
                              &lt;key&gt;Name&lt;/key&gt;
                              &lt;string&gt;CA-SCEP&lt;/string&gt;
                              &lt;key&gt;Subject&lt;/key&gt;
                              &lt;array/&gt;
                              &lt;key&gt;URL&lt;/key&gt;
                              &lt;string&gt;https://myserver.example.com &lt;/string&gt;
                      &lt;/dict&gt;
                      &lt;key&gt;PayloadDescription&lt;/key&gt;
                      &lt;string&gt;Configures SCEP&lt;/string&gt;
                      &lt;key&gt;PayloadDisplayName&lt;/key&gt;
                      &lt;string&gt;SCEP (CA-SCEP)&lt;/string&gt;
                      &lt;key&gt;PayloadIdentifier&lt;/key&gt;
                      &lt;string&gt;com.Example.rdesirazu.SCEP&lt;/string&gt;
                      &lt;key&gt;PayloadOrganization&lt;/key&gt;
                      &lt;string&gt;Example&lt;/string&gt;
                      &lt;key&gt;PayloadType&lt;/key&gt;
                      &lt;string&gt;com.apple.security.scep&lt;/string&gt;
                      &lt;key&gt;PayloadUUID&lt;/key&gt;
                      &lt;string&gt;5C125B3C-4427-49CE-980B-21FC1254D506&lt;/string&gt;
                      &lt;key&gt;PayloadVersion&lt;/key&gt;
                      &lt;integer&gt;1&lt;/integer&gt;
              &lt;/dict&gt;
  </code></pre>