3
나는 Ruby OpenSSL documentation을 보았지만, .p12 파일을 만들기 위해 함께 사용해야하는 부분을 알아낼 수 없습니다.Ruby에서 .p12 파일을 만드는 방법은 무엇입니까?
또한 this tutorial이 있지만 의견은 그 정확성에 대해 양면성을 나타냅니다. ossl_pkcs12.c에서
나는 Ruby OpenSSL documentation을 보았지만, .p12 파일을 만들기 위해 함께 사용해야하는 부분을 알아낼 수 없습니다.Ruby에서 .p12 파일을 만드는 방법은 무엇입니까?
또한 this tutorial이 있지만 의견은 그 정확성에 대해 양면성을 나타냅니다. ossl_pkcs12.c에서
: 그래서
/*
* call-seq:
* PKCS12.create(pass, name, key, cert [, ca, [, key_pbe [, cert_pbe [, key_iter [, mac_iter [, keytype]]]]]])
*
* === Parameters
* * +pass+ - string
* * +name+ - A string describing the key.
* * +key+ - Any PKey.
* * +cert+ - A X509::Certificate.
* * * The public_key portion of the certificate must contain a valid public key.
* * * The not_before and not_after fields must be filled in.
* * +ca+ - An optional array of X509::Certificate's.
* * +key_pbe+ - string
* * +cert_pbe+ - string
* * +key_iter+ - integer
* * +mac_iter+ - integer
* * +keytype+ - An integer representing an MSIE specific extension.
*
* Any optional arguments may be supplied as nil to preserve the OpenSSL defaults.
*
* See the OpenSSL documentation for PKCS12_create().
*/
(검증되지 않은 아마도 잘못된 - 루비에 익숙하지 않다) :
p12 = OpenSSL::PKCS12.create("password", "key", pkey, cert)
p12_bytes = p12.to_der