title: Win32 PKCS#7 Low Level Message Functions to use specific content
body: <p>When creating a PKCS#7 signed message with Win32 low level functions like <a href="https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptmsgopentoencode" rel="nofollow noreferrer">CryptMsgOpenToEncode</a> and <a href="https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptmsgupdate" rel="nofollow noreferrer">CryptMsgUpdate</a>, the resulting message is a message with OID 1.2.840.113549.1.7.2 signedData (PKCS #7), which contains a sequence with OID  1.2.840.113549.1.7.1 data (PKCS #7).</p>
  
  <p>Can I use the low level message functions to change this latter OID? For example, Authenticode uses OID 1.3.6.1.4.1.311.2.1.4 spcIndirectDataContext (Microsoft code signing).</p>
  
  <p>I saw CryptMsgOpenToEncode CMSG_BARE_CONTENT_FLAG flag, but I'm not sure if this is what I want or how to use it. </p>