Public/private key encryption/decryption

2008-04-07 Thread Till Elsner
Hi, I'm trying to make an application encypting data on the server side using a public key and decrypting it on the client side using the related private key. Now i've run in two problems: I have a private key and a related certificate file created from a certificate request (CSR) and signe

CMS usage

2008-04-07 Thread shankar ks
Hi steve , I am trying to find out the source code for CMS in openssl , I have done signing, compression, encryption of my data using Openssl API's in C programing language.. Now I need to inplement all those signing , compression, encryption data as a CMS package. I have reffered to the CVS of op

Re: openssl/crypto/cms/

2008-04-07 Thread shankar ks
Hi Hobblet, Sorry for the late reply as I was busy with searching of other things . You have given a command regarding my question, but i did not understand that and how to use it to get the information of CMS from openssl CVS. I am not aware of using CVS also . I want to download the source code

Re: SSL_use_peer_certificate()

2008-04-07 Thread PS
I meant SSL_get_peer_certificate. On Mon, Apr 7, 2008 at 6:53 PM, PS <[EMAIL PROTECTED]> wrote: > Hi, > I have a quick question. If Client-server session is reused ,in the > re-used sessions SSL* data structure, will SSL_use_peer_certificate ( ) > return the certificate that it got in the initi

SSL_use_peer_certificate()

2008-04-07 Thread PS
Hi, I have a quick question. If Client-server session is reused ,in the re-used sessions SSL* data structure, will SSL_use_peer_certificate ( ) return the certificate that it got in the initial handshake ? PS

Re: get key from an SSL object

2008-04-07 Thread Victor Duchovni
On Mon, Apr 07, 2008 at 06:57:49PM -0600, Tuan Vu wrote: > Yes I have to do it myself. My problem is, I cant find any API in the > openssl document that let me extract keys from both sides given an SSL > object. So I was wondering how I can get those keys. Thanks. Forget APIs for a moment, you ar

Re: X509 common name

2008-04-07 Thread Victor Duchovni
On Tue, Apr 08, 2008 at 12:22:34AM +0200, Dr. Stephen Henson wrote: > Couple of minor points... > > On Mon, Apr 07, 2008, Victor Duchovni wrote: > > > > To parse subjectAlternativeName entries: > > > > X509 *cert; > > STACK_OF(GENERAL_NAME) * gens; > > const GENERAL_NAME *gn; > >

Re: get key from an SSL object

2008-04-07 Thread Tuan Vu
Yes I have to do it myself. My problem is, I cant find any API in the openssl document that let me extract keys from both sides given an SSL object. So I was wondering how I can get those keys. Thanks. On Mon, Apr 7, 2008 at 6:52 PM, Victor Duchovni < [EMAIL PROTECTED]> wrote: > On Mon, Apr 07, 2

Re: get key from an SSL object

2008-04-07 Thread Tuan Vu
I made a typo so here is my question again: After a SSL connection is established, from A's side, I need to get the A's private key part 1). From B's side I need to get A's public key (part 2). I looked at the SSL document and only found EVP_PKEY *SSL_get_privatekey(SSL *ssl), can I use this API

Re: get key from an SSL object

2008-04-07 Thread Victor Duchovni
On Mon, Apr 07, 2008 at 06:34:29PM -0600, Tuan Vu wrote: > Yes I know it makes no sense, but this is what I have to do in the > assignment. > I complained to the prof already but he still wants to do something like > that. If it is an assignment, you have to do it. Not much point in OpenSSL users

Re: get key from an SSL object

2008-04-07 Thread Tuan Vu
Yes I know it makes no sense, but this is what I have to do in the assignment. I complained to the prof already but he still wants to do something like that. On Mon, Apr 7, 2008 at 6:29 PM, Victor Duchovni < [EMAIL PROTECTED]> wrote: > On Mon, Apr 07, 2008 at 06:25:21PM -0600, Tuan Vu wrote: > >

Re: get key from an SSL object

2008-04-07 Thread Victor Duchovni
On Mon, Apr 07, 2008 at 06:25:21PM -0600, Tuan Vu wrote: > Assume that I write a client app A and a server app B. A and B set up a SSL > connection. A wants to send B some file and its signature. Once B receives > the file and its signature, B has to verify if it's correct or not. Once you have t

get key from an SSL object

2008-04-07 Thread Tuan Vu
Hi, Assume that I write a client app A and a server app B. A and B set up a SSL connection. A wants to send B some file and its signature. Once B receives the file and its signature, B has to verify if it's correct or not. I dont want A and B to exchange any signing key manually. Instead, I want

Re: X509 common name

2008-04-07 Thread Dr. Stephen Henson
Couple of minor points... On Mon, Apr 07, 2008, Victor Duchovni wrote: > > To parse subjectAlternativeName entries: > > X509 *cert; > STACK_OF(GENERAL_NAME) * gens; > const GENERAL_NAME *gn; > int num; > int len; > char *dnsname; > > gens = X509_get_ext_d2i(cert, NID

Re: X509 common name

2008-04-07 Thread Victor Duchovni
On Sun, Apr 06, 2008 at 01:24:28AM +0200, Till Elsner wrote: > is there any simple way to get the common name out of an certificate > loaded to an X509 object via PEM_read_X509? It is easy to get *a* common name, usually there is only one. More interesting questions arise should the certificate

noobie! wont create certficate

2008-04-07 Thread bob bobix
hi im quite new to this to bare with me. i am trying to create a certificate with OpenSSL 0.9.8g 19 Oct 2007. i create a private key via c:\progra~1\apache~1\apache2.2\bin>openssl genrsa -out private.key 1024. this works fine. when i try create a certificate(acording to the tutorial searched w

X509 common name

2008-04-07 Thread Till Elsner
Hi, is there any simple way to get the common name out of an certificate loaded to an X509 object via PEM_read_X509? Thanks in advance Till Elsner __ OpenSSL Project http://www.openssl.org Use