Discuss this help topic in SecureBlackbox Forum
TElX509Certificate.SaveKeyToBufferNET
Saves the private key of the certificate to the memory buffer in NET format.
Declaration
Parameters
Return value
0 - if the key was successfully saved.
Otherwise PKCS#8 error code.
Description
This method saves the private key to the provided memory location of the given size. If the buffer is too small (or empty), Size parameter is set to the size which will be enough to hold the whole data. The private key will be saved in NET format. NET format was invented by Microsoft Corp. and is based on PKCS#8 private key format. However, it is not fully compatible with PKCS#8, so passing a buffer with raw PKCS#8 data will cause an 'invalid format' error.