Re: extracting private key from p12 certificate and encoding it as pem in pkcs#1

2012-05-08 Thread Jeffrey Walton
On Tue, May 8, 2012 at 4:33 PM, Dave Thompson wrote: >>From: owner-openssl-us...@openssl.org On Behalf Of Adrian Manuel Vázquez > Betancourt >>Sent: Tuesday, 08 May, 2012 15:21 > >>I have a p12 certificate file and I would like to extract the private >>key from it and export it as a pem file in pl

Re: header file for EC_KEY

2012-05-08 Thread Dr. Stephen Henson
On Tue, May 08, 2012, Bin Lu wrote: > > How do you solve the problem like the following without directly accessing to > this object: > > I have one EVP_PKEY contains the ECDSA private key and another EVP_PKEY > contains the public key, and I need to determine if the public key and the > priva

RE: extracting private key from p12 certificate and encoding it as pem in pkcs#1

2012-05-08 Thread Dave Thompson
>From: owner-openssl-us...@openssl.org On Behalf Of Adrian Manuel Vázquez Betancourt >Sent: Tuesday, 08 May, 2012 15:21 >I have a p12 certificate file and I would like to extract the private >key from it and export it as a pem file in plain pkcs#1 format. >openssl pkcs12 -in test.p12 -out testke

extracting private key from p12 certificate and encoding it as pem in pkcs#1

2012-05-08 Thread Adrian Manuel Vázquez Betancourt
Hi everybody, I have a p12 certificate file and I would like to extract the private key from it and export it as a pem file in plain pkcs#1 format. I was able to do that from openssl whith the following commands: openssl pkcs12 -in test.p12 -out testkey.pem -nodes -nocerts and afterwards ... o

Re: header file for EC_KEY

2012-05-08 Thread Ken Goldman
On 5/8/2012 3:00 PM, Bin Lu wrote: How do you solve the problem like the following without directly accessing to this object: I have one EVP_PKEY contains the ECDSA private key and another EVP_PKEY contains the public key, and I need to determine if the public key and the private key are the ri

Re: header file for EC_KEY

2012-05-08 Thread Bodo Moeller
On Tue, May 8, 2012 at 9:00 PM, Bin Lu wrote: > If that is the case, why EC_KEY is exposed in ec.h, and how do I make > use of the functions that requires this object, e.g. > EVP_PKEY_get1_EC_KEY()? > To use functions like these, you don't need the struct details (you'd only need those to peek

RE: header file for EC_KEY

2012-05-08 Thread Bin Lu
If that is the case, why EC_KEY is exposed in ec.h, and how do I make use of the functions that requires this object, e.g. EVP_PKEY_get1_EC_KEY()? How do you solve the problem like the following without directly accessing to this object: I have one EVP_PKEY contains the ECDSA private key and an

Re: header file for EC_KEY

2012-05-08 Thread Bodo Moeller
> > My application requires me to constantly do things like: > > - return n, e, p from an openssl RSA key token > - construct an openssl RSA public key token from n, e > - construct an openssl RSA private key token from n, e, p > > I do this using the bignum-bin converters and knowledge of the RSA

Re: Master Key / Multiple Users

2012-05-08 Thread Jakob Bohm
On 5/8/2012 3:13 PM, Edward Ned Harvey wrote: Suppose you have a single resource to be encrypted, and it should be accessible by multiple users. Is there a way to encrypt something such that multiple keys would work? I can't seem to find any such solution... How do things like FileVault i

Re: Master Key / Multiple Users

2012-05-08 Thread Jeffrey Walton
On Tue, May 8, 2012 at 9:13 AM, Edward Ned Harvey wrote: > Suppose you have a single resource to be encrypted, and it should be > accessible by multiple users.  Is there a way to encrypt something such that > multiple keys would work?  I can't seem to find any such solution... Take a look at Micro

Re: PHP openssl_x509_parse extensions=>subjectAltName

2012-05-08 Thread Johansen Daniel
Certificate: -BEGIN CERTIFICATE- MIIGojCCBIqgAwIBAgIKHnnv5gABGDANBgkqhkiG9w0BAQUFADBdMQswCQYD VQQGEwJOTzEZMBcGA1UEChMQQ2FyZCBTZXJ2aWNlcyBBUzEzMDEGA1UEAxMqQ2Fy ZCBTZXJ2aWNlcyBBUyBPZmZpY2UgTmV0d29yayBJc3N1aW5nIENBMB4XDTEyMDUw ODEzMjcxMVoXDTEzMDUwODEzMjcwOFowaDEZMBcGCgmSJomT8ixkARkWCUtPTl

Re: header file for EC_KEY

2012-05-08 Thread Ken Goldman
On 5/8/2012 3:13 AM, Bodo Moeller wrote: I noticed that EC_KEY (ec_key_st) is not defined in ec.h but in ec_lcl.h which is not a public header file, not like RSA(rsa_st) in rsa.h and DSA in dsa.h. Is that correct? Yes, this is intentional - this intentionally prevents application

Master Key / Multiple Users

2012-05-08 Thread Edward Ned Harvey
Suppose you have a single resource to be encrypted, and it should be accessible by multiple users. Is there a way to encrypt something such that multiple keys would work? I can't seem to find any such solution... How do things like FileVault implement a Master Key, and multiple users? It see

Re: PHP openssl_x509_parse extensions=>subjectAltName

2012-05-08 Thread Thomas Anderson
Can you post the certificate in question? I'm a bit curious as to how phpseclib's File_X509 would parse it. eg. [?php] include('File/X509.php'); $x509 = new File_X509(); print_r$x509->loadX509($_SERVER['SSL_CLIENT_CERT'])); [/?php] On Tue, May 8, 2012 at 7:01 AM, Johansen Daniel wrote: > [?ph

RE: FAILED:unable to get local issuer certificate

2012-05-08 Thread Tammany, Curtis
> If this works in 1.0.1 but not 0.9.8 I'm guessing its the name constraints > extension that is the problem which isn't supported in OpenSSL 0.9.8. > One of the intermediate certs does have a name constraint... > Does the production site have any directories of trusted certificates or are > they

Re: ECDSA and dlopen

2012-05-08 Thread Piotr Łobacz
No openssl version is 1.0.0b patched with modifed patch for aes gcm and my lib works but if i load it with dlopen this error occurs what is very strange for me. maybe i'll send this lib constructed by me, because this is very strange why it's not working if lib is the same but with dlopen it crashe

PHP openssl_x509_parse extensions=>subjectAltName

2012-05-08 Thread Johansen Daniel
[?php] $x509 = openssl_x509_parse($_SERVER['SSL_CLIENT_CERT']); $subjectAltName = $x509['extensions']['subjectAltName']; [/?php] When parsing a x509 certificate and ['extensions']['subjectAltName'] contains a newline or space as shown below: othername: Princpal name=t...@test.com The value in

Re: ECDSA and dlopen

2012-05-08 Thread Dr. Stephen Henson
On Tue, May 08, 2012, Piotr ??obacz wrote: > Hello there i have a problem with my library. I have created my own lib > with staticaly linked libcrypto.a and this library i use for signing > some sort of data with EVP_KEY and when i link some app to this library > everything works just fine, there

ECDSA and dlopen

2012-05-08 Thread Piotr Łobacz
Hello there i have a problem with my library. I have created my own lib with staticaly linked libcrypto.a and this library i use for signing some sort of data with EVP_KEY and when i link some app to this library everything works just fine, there are no errors from EVP_SignFinal, but when i load th

Re: header file for EC_KEY

2012-05-08 Thread Bodo Moeller
> I noticed that EC_KEY (ec_key_st) is not defined in ec.h but in ec_lcl.h > which is not a public header file, not like RSA(rsa_st) in rsa.h and DSA in > dsa.h. Is that correct? > > Yes, this is intentional - this intentionally prevents applications from accessing ec_key_st fields directly, forc