![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | X509ContentType I've been using a powershell script to export certificates from the computer's personal store. There appears to be 8 members of the subject enumeration 217# [System.Security.Cryptography.X509Certificates.X509ContentType]::Pfx = "" Exception setting "Pfx": "Cannot convert value "" to type "System.Security.Cry tography.X509Certificates.X509ContentType" due to invalid enumeration values. pecify one of the following enumeration values and try again. The possible enu eration values are "Unknown, Cert, SerializedCert, Pfx, Pkcs12, SerializedStore , Pkcs7, Authenticode"." At line:1 char:66 + [System.Security.Cryptography.X509Certificates.X509ContentType]::P <<<< fx = I don't have any issues when I use the content types Cert, SerializedCert, Pfx, Pkcs12 All the others (Unknown, SerializedStor, Pkcs7, Authenticode) yield the likes of Exception calling "Export" with "2" argument(s): "Invalid content type." At C:\IMCSBU\Enrollment\test1.ps1:94 char:28 + $certbytes = $cert.Export( <<<< [System.Security.Cryptography.X509Certifica tes.X509ContentType]::Pkcs7, $strPassword) I was questioning if this is limitation of back-end classes used by the powershell infrastructure or interface with same? |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: X509ContentType On Sep 7, 12:40 pm, Joe G <J...@xxxxxx> wrote:
are Cert, SerializedCert, and Pkcs12. This enumeration is used in various places in the crypto APIs; it's not solely for use in export. Hope this helps, - Oisin | ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||
| Guest | Re: X509ContentType Thank you Oisin, especially for reminding me that the subject enumeration is used other places. By the way is was able to the pfx to work (but it's the same as the pkcs12). At first I was thinking that one of them would mimic the DER Base64 export scenario but it was wishfull thinking. I guess I'll just have to take the bytes output by the export process, convert them to a base64 string and output them my selves. "Oisin Grehan" wrote:
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #4 (permalink) | ||||||||||||
| Guest | Re: X509ContentType On Sep 7, 12:40 pm, Joe G <J...@xxxxxx> wrote:
- Oisin | ||||||||||||
My System Specs![]() | |||||||||||||