使用OpenSSL-Win32时使用未知选项PEM

使用OpenSSL-Win32时使用未知选项PEM,ssl,openssl,x509,pem,der,Ssl,Openssl,X509,Pem,Der,我试图以以下方式使用OpenSSL x509命令,并获得一个“未知选项” 使用“PEM”消息。我遵循以下文件中提到的确切步骤: http://support.citrix.com/article/CTX106630#prodrelated 以下是我键入的命令: C:\OpenSSL-Win32\bin>openssl x509 -in myfile.cer -inform DER -out myfile.pem -outform PEM unknown option PEM usage:

我试图以以下方式使用OpenSSL x509命令,并获得一个“未知选项” 使用“PEM”消息。我遵循以下文件中提到的确切步骤:

http://support.citrix.com/article/CTX106630#prodrelated

以下是我键入的命令:

C:\OpenSSL-Win32\bin>openssl x509 -in myfile.cer -inform DER -out myfile.pem
-outform PEM
unknown option PEM
usage: x509 args
 -inform arg     - input format - default PEM (one of DER, NET or PEM)
 -outform arg    - output format - default PEM (one of DER, NET or PEM)
 -keyform arg    - private key format - default PEM
 -CAform arg     - CA format - default PEM
 -CAkeyform arg  - CA key format - default PEM
 -in arg         - input file - default stdin
 -out arg        - output file - default stdout
 -passin arg     - private key password source
 -serial         - print serial number value
 -subject_hash   - print subject hash value
 -subject_hash_old   - print old-style (MD5) subject hash value
 -issuer_hash    - print issuer hash value
 -issuer_hash_old    - print old-style (MD5) issuer hash value
 -hash           - synonym for -subject_hash
 -subject        - print subject DN
 -issuer         - print issuer DN
 -email          - print email address(es)
 -startdate      - notBefore field
 -enddate        - notAfter field
 -purpose        - print out certificate purposes
 -dates          - both Before and After dates
 -modulus        - print the RSA key modulus
 -pubkey         - output the public key
 -fingerprint    - print the certificate fingerprint
 -alias          - output certificate alias
 -noout          - no certificate output
 -ocspid         - print OCSP hash values for the subject name and public key
 -ocsp_uri       - print OCSP Responder URL(s)
 -trustout       - output a "trusted" certificate
 -clrtrust       - clear all trusted purposes
 -clrreject      - clear all rejected purposes
 -addtrust arg   - trust certificate for a given purpose
 -addreject arg  - reject certificate for a given purpose
 -setalias arg   - set certificate alias
 -days arg       - How long till expiry of a signed certificate - def 30 days
 -checkend arg   - check whether the cert expires in the next arg seconds
                   exit 1 if so, 0 if not
 -signkey arg    - self sign cert with arg
 -x509toreq      - output a certification request object
 -req            - input is a certificate request, sign and output.
 -CA arg         - set the CA certificate, must be PEM format.
 -CAkey arg      - set the CA key, must be PEM format
                   missing, it is assumed to be in the CA file.
 -CAcreateserial - create serial number file if it does not exist
 -CAserial arg   - serial file
 -set_serial     - serial number to use
 -text           - print the certificate in text form
 -C              - print out C code forms
 -md2/-md5/-sha1/-mdc2 - digest to use
 -extfile        - configuration file with X509V3 extensions to add
 -extensions     - section from config file with X509V3 extensions to add
 -clrext         - delete extensions before signing and input certificate

请告诉我上面的命令有什么问题?

我刚刚粘贴了你的命令,它对我有效。这很奇怪。我仍然收到相同的消息,文件没有生成。您也在使用OpenSSL-Win32吗?我使用的是64位版本。但是语法应该是相同的。当我从stackoverflow.com复制时,您的命令中有一个换行符。我把它拿走了。否则我就和你一样了。我用这个DER证书进行了测试,谢谢。我成功了。我没有在myfile.pem之后提供空格,而且它也不容易看到,因为我在myfile.pem之后有一个新行。也许,我不应该在执行命令时使用小尺寸的命令提示符。