RE: printing a certificate

2010-06-02 Thread Arunkumar Manickam
Look at openssl-*/apps/x509.c

Arun

-Original Message-
From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] 
On Behalf Of Dallas Clement
Sent: Wednesday, June 02, 2010 9:50 AM
To: openssl-users@openssl.org
Subject: printing a certificate

Hi,

Would someone kindly tutor me on how to print out a certificate
programmatically?  I know how to extract the common name, but was just
wondering if there is an API function to just print the whole thing in
human readable form?

   X509 *pX509Peer = SSL_get_peer_certificate( pSsl );
   if ( pX509Peer != 0 )
   {
  // Extract the common name from the peer's certificate
  X509_NAME_get_text_by_NID( X509_get_subject_name( pX509Peer ),
 NID_commonName, commonName,
commonNameBufferSize );

Thanks,
Dallas
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


VS2010 compatibility?

2010-06-02 Thread Chris Clark
Can anyone confirm if OpenSSL 1.0.0a is compatible with Visual Studio 2010?

-Chris
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: self-signed SSL certificates and trusted root certificate

2010-06-02 Thread Vieri


--- On Tue, 6/1/10, Dave Thompson dthomp...@prinpay.com wrote:

 I think I found it, and it's an extension in the CA cert.
 two-step with standard
 config 
 used [usr_cert] extensions which has
 basicConstraints=CA:false. 

Right, I was wondering if that could be it...

 The standard config file has a [v3_ca] section intended for
 
 CA cert(s) with CA:true, so it looks like the minimal fix
 is: 
 on the $CA invocation at line 92+ add -extensions v3_ca .

Thanks.

 CA.pl has that, and so does CA.sh in 0.9.8m+ and 1.0.0b4+ 
 (and also like CA.pl -create_serial instead of write
 serial, 
 but still not write crlnumber). (And in both asking for a 
 'certificate' when we actually want a key if existing, is
 poor.)

Had I used CA.pl or a more recent version of CA.sh I wouldn't have had this 
issue.
Nice to know why it's failing though.
Guess I should upgrade openssl anyway.

 Amazingly IE7 on testing likes even CA:false, which is
 crazy. 
 Although knowing M$ there may be a registry setting
 somewhere -- 
 or a dozen -- that it's not worth my time to track down.
 I may try to dig up an old machine still on IE6 
 and see if that is (was) any different/better.

I have IE6 and it failed to open a site when I imported the root CA with 
CA:false.

 In theory (all?) DN fields can be BMP (approximately
 Unicode)
 but AFAICS openssl doesn't make that convenient, and other
 tools 
 may not either, so IMHO you should limit to ASCII
 printable, 
 plus avoid characters commonly used in notating DNs

Thanks for the advice.

 Doing CRLs valid for 3
 years 
 would be silly, but I assume you're not actually doing CRLs

I'm not doing CRLs but if I wanted to, how could I include fields such as:

X509v3 CRL Distribution Points: 
URI:https://www.mydomain.org/revoke.crl

Netscape CA Revocation Url: 
https://www.mydomain.org/revoke.crl
Netscape CA Policy Url: 
http://www.mydomain.org/
Netscape Comment: 
This is a comment from http://www.mydomain.org

I think I should use the nsComment, nsCaRevocationUrl, nsRevocationUrl fields.

Should I uncomment crl_extensions = crl_ext? (I doubt anyone uses Netscape 
anymore)

Thanks,

Vieri



  
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: self-signed SSL certificates and trusted root certificate

2010-06-02 Thread Jeffrey Walton
Hi Dave,

 Amazingly IE7 on testing likes even CA:false, which is crazy.
What store did the cert get put in? Was it the Trusted Root
Certification Authorities? If you let Windows automatically select the
store, it most likely went in Personal.

Jeff

On Tue, Jun 1, 2010 at 9:17 PM, Dave Thompson dthomp...@prinpay.com wrote:
 From: owner-openssl-us...@openssl.org On Behalf Of Vieri
 Sent: Tuesday, 01 June, 2010 10:25

 --- On Fri, 5/28/10, Dave Thompson dthomp...@prinpay.com wrote:

  Are your clients only browsers (IE? FF?) or apps?

 I was testing with IE6 but am now trying out FF 3.5.9. I when
 to the advanced config options and tried to import the .der
 file from the Authority tab. FF complains that this is not
 a certificate authority and cannot be imported. Tried both
 cacert.der and cacert.pem.

 So before going any further with server certificates, I guess
 I need to find out why FF refuses to import my CA certificate.

 I think I found it, and it's an extension in the CA cert.

 I normally use (by hand) the one-step way (req -new -x509)
 rather than the two-step sequence used by CA.sh (req -new
 then ca -selfsign). My custom config has no extensions and
 produces v1, which FF likes, but two-step with standard config
 used [usr_cert] extensions which has basicConstraints=CA:false.
 The standard config file has a [v3_ca] section intended for
 CA cert(s) with CA:true, so it looks like the minimal fix is:
 on the $CA invocation at line 92+ add -extensions v3_ca .

 CA.pl has that, and so does CA.sh in 0.9.8m+ and 1.0.0b4+
 (and also like CA.pl -create_serial instead of write serial,
 but still not write crlnumber). (And in both asking for a
 'certificate' when we actually want a key if existing, is poor.)

 I use multiple config files, and editing my CA config and
 doing two-step makes FF (3.5.9) happy (as does my one-step),
 but that editing would be a pain with standard single config.

 Amazingly IE7 on testing likes even CA:false, which is crazy.
 Although knowing M$ there may be a registry setting somewhere --
 or a dozen -- that it's not worth my time to track down.
 I may try to dig up an old machine still on IE6
 and see if that is (was) any different/better.

  And you chose for your CA name a unique value.

 unique value for my CA name: are you referring to the CN /
 Common Name? I guess it is unique. I can name it anything I
 want, right? (it doesn't need to be a valid host name of a FQDN)
 I regenerated a new test CA cert and its CN is MY-CA-1.

 Actually the full Distinguished Name aka DN, which
 can contain country,state,province,org,orgunit(s),CN,
 and even other items if supported by the using parties,
 although CN unique is sufficient to make DN unique.

 DN definitely shouldn't be the same as any other CA you or
 your clients trust (or will). This isn't likely to happen by
 accident, but I just wanted to make sure you hadn't thought
 it would work to impersonate Verisign or somesuch, or
 perhaps have a (test) system with data left from another
 test that chose the same (perhaps convenient) test names.

 In theory (all?) DN fields can be BMP (approximately Unicode)
 but AFAICS openssl doesn't make that convenient, and other tools
 may not either, so IMHO you should limit to ASCII printable,
 plus avoid characters commonly used in notating DNs (mostly
 slash, equals, quote, sometimes comma) to avoid confusion.

 CN doesn't need to be hostname or domainname for a CA cert.
 Technically not required on entity cert either, but on WWW
 most parties do want/like entity's CN to be domainname.

 I used a custom openssl.cnf and the only differences with the
 original file are:
 dir            = ./MY-CA-HTTP         # Where everything is kept
 default_days   = 1825                  # how long to certify for
 default_crl_days= 1095                 # how long before next CRL
 0.organizationName_default     = mydomain.org

 Fine. Personally I wouldn't put a domainname in organization,
 but technically it should work. Doing CRLs valid for 3 years
 would be silly, but I assume you're not actually doing CRLs
 at all and this is just ignored.

 By the way, I'm using openssl 0.9.8k.

 [SNIP]
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Certificate with multiple CN fields - valid?

2010-06-02 Thread John Nagle

   Normally, when a certificate is to be valid for more than one
domain name, one name is in the CN field, and the others are in
the subjectAltName extension.

   But look at the cert for https://www.ipmirror.com/;.  It has

CN = admincms.ipmirror.com
CN = business.ipmirror.cn
CN = business.ipmirror.com
CN = business.ipmirror.de
CN = business.ipmirror.jp
CN = business.ipmirror.kr
CN = chat.ipmirror.com
CN = customer.ipmirror.cn
CN = customer.ipmirror.com
CN = customer.ipmirror.de
CN = customer.ipmirror.jp
CN = customer.ipmirror.kr
CN = demo-business.ipmirror.com
CN = demo-customer.ipmirror.com
CN = imap.ipmirror.com
CN = netrunner.ipmirror.com
CN = ote-business.ipmirror.com
CN = ote-customer.ipmirror.com
CN = ote-rapi.ipmirror.com
CN = ote-registryconsole.ipmirror.com
CN = rapi.ipmirror.com
CN = rapiote.ipmirror.com
CN = rcube.ipmirror.com
CN = register.ipmirror.de
CN = registryconsole.ipmirror.com
CN = telhosting.ipmirror.com
CN = www.ipmirror.com

This was issued by

CN = PositiveSSL CA
O = Comodo CA Limited
L = Salford
ST = Greater Manchester
C = GB

Validity dates are
(1/6/2010 0:00:00 AM GMT) to (7/10/2010 23:59:59 PM GMT)
so it's a currently live cert from a major CA.  The
cert chain validates properly.

Is this considered valid?

John Nagle
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: Certificate with multiple CN fields - valid?

2010-06-02 Thread Konrads Smelkovs
Valid is whatever browser understands. As X.509 is/was related to LDAP,
then having multiple cn's in an entry is a no-no.
--
Konrads Smelkovs
Applied IT sorcery.


On Wed, Jun 2, 2010 at 5:23 AM, John Nagle na...@sitetruth.com wrote:

   Normally, when a certificate is to be valid for more than one
 domain name, one name is in the CN field, and the others are in
 the subjectAltName extension.

   But look at the cert for https://www.ipmirror.com/;.  It has

 CN = admincms.ipmirror.com
 CN = business.ipmirror.cn
 CN = business.ipmirror.com
 CN = business.ipmirror.de
 CN = business.ipmirror.jp
 CN = business.ipmirror.kr
 CN = chat.ipmirror.com
 CN = customer.ipmirror.cn
 CN = customer.ipmirror.com
 CN = customer.ipmirror.de
 CN = customer.ipmirror.jp
 CN = customer.ipmirror.kr
 CN = demo-business.ipmirror.com
 CN = demo-customer.ipmirror.com
 CN = imap.ipmirror.com
 CN = netrunner.ipmirror.com
 CN = ote-business.ipmirror.com
 CN = ote-customer.ipmirror.com
 CN = ote-rapi.ipmirror.com
 CN = ote-registryconsole.ipmirror.com
 CN = rapi.ipmirror.com
 CN = rapiote.ipmirror.com
 CN = rcube.ipmirror.com
 CN = register.ipmirror.de
 CN = registryconsole.ipmirror.com
 CN = telhosting.ipmirror.com
 CN = www.ipmirror.com

 This was issued by

 CN = PositiveSSL CA
 O = Comodo CA Limited
 L = Salford
 ST = Greater Manchester
 C = GB

 Validity dates are
 (1/6/2010 0:00:00 AM GMT) to (7/10/2010 23:59:59 PM GMT)
 so it's a currently live cert from a major CA.  The
 cert chain validates properly.

 Is this considered valid?

John Nagle
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   majord...@openssl.org



Re: printing a certificate

2010-06-02 Thread Dr. Stephen Henson
On Tue, Jun 01, 2010, Dallas Clement wrote:

 Hi,
 
 Would someone kindly tutor me on how to print out a certificate
 programmatically?  I know how to extract the common name, but was just
 wondering if there is an API function to just print the whole thing in
 human readable form?
 
X509 *pX509Peer = SSL_get_peer_certificate( pSsl );
if ( pX509Peer != 0 )
{
   // Extract the common name from the peer's certificate
   X509_NAME_get_text_by_NID( X509_get_subject_name( pX509Peer ),
  NID_commonName, commonName,
 commonNameBufferSize );
 

X509_print_ex() is the best function to use.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


get_crl : callback to download CRL

2010-06-02 Thread Arunkumar Manickam
Hi,

How do I register the callback to download CRL for the SSL certificate.

Thanks,
Arun


Re: max length to encrypt

2010-06-02 Thread Phillip Hellewell
On Thu, May 27, 2010 at 2:20 PM, Chuck Pareto chuckda...@gmail.com wrote:
 Hi,
 I'm still unsure as to the max length string I can use to encrypt. I'm using
 the rsacrypto class in .net to encrypt.
 I know I can't pass in a string that's 256 bytes long or greater because
 there us an exception that gets thrown. But as I work my way back in length
 I still get exceptions with string lengths smaller than 256.

If it's using PKCS1 padding (most common), then the max length is 11
bytes less than the key size, so 256-11.

But like David said, you shouldn't be using public-key encryption
directly unless you know what you're doing.  The normal approach is to
use symmetric encryption (e.g., AES) to encrypt the data, and PK
encryption for encrypting the symmetric key.

Phillip
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: printing a certificate

2010-06-02 Thread Dallas Clement
Thanks gents!

On Wed, Jun 2, 2010 at 6:45 AM, Dr. Stephen Henson st...@openssl.org wrote:
 On Tue, Jun 01, 2010, Dallas Clement wrote:

 Hi,

 Would someone kindly tutor me on how to print out a certificate
 programmatically?  I know how to extract the common name, but was just
 wondering if there is an API function to just print the whole thing in
 human readable form?

    X509 *pX509Peer = SSL_get_peer_certificate( pSsl );
    if ( pX509Peer != 0 )
    {
       // Extract the common name from the peer's certificate
       X509_NAME_get_text_by_NID( X509_get_subject_name( pX509Peer ),
                                  NID_commonName, commonName,
 commonNameBufferSize );


 X509_print_ex() is the best function to use.

 Steve.
 --
 Dr Stephen N. Henson. OpenSSL project core developer.
 Commercial tech support now available see: http://www.openssl.org
 __
 OpenSSL Project                                 http://www.openssl.org
 User Support Mailing List                    openssl-us...@openssl.org
 Automated List Manager                           majord...@openssl.org

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: self-signed SSL certificates and trusted root certificate

2010-06-02 Thread Vieri

--- On Tue, 6/1/10, Dave Thompson dthomp...@prinpay.com wrote:

 CN doesn't need to be hostname or domainname for a CA
 cert.
 Technically not required on entity cert either, but on WWW
 most parties do want/like entity's CN to be domainname.

How does one issue a cert for multiple CN? 
Suppose I have just one HTTP server but it can be accessed via multiple FQDN... 
I suppose I need to use subjectAltName?

Vieri




  
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: Certificate with multiple CN fields - valid?

2010-06-02 Thread Willy Weisz
In order to be valid for the authentication of multiple DNS names an
X.509 certificate has to have them included in the subjAlternativeName
entry not in multiple CN entries in the subjectName. The latter
represents a single entity with potentially multiple CN entries, not
multiple entities each with a single CN.

Regards
Willy Weisz

John Nagle wrote:
Normally, when a certificate is to be valid for more than one
 domain name, one name is in the CN field, and the others are in
 the subjectAltName extension.
 
But look at the cert for https://www.ipmirror.com/;.  It has
 
 CN = admincms.ipmirror.com
 CN = business.ipmirror.cn
 CN = business.ipmirror.com
 CN = business.ipmirror.de
 CN = business.ipmirror.jp
 CN = business.ipmirror.kr
 CN = chat.ipmirror.com
 CN = customer.ipmirror.cn
 CN = customer.ipmirror.com
 CN = customer.ipmirror.de
 CN = customer.ipmirror.jp
 CN = customer.ipmirror.kr
 CN = demo-business.ipmirror.com
 CN = demo-customer.ipmirror.com
 CN = imap.ipmirror.com
 CN = netrunner.ipmirror.com
 CN = ote-business.ipmirror.com
 CN = ote-customer.ipmirror.com
 CN = ote-rapi.ipmirror.com
 CN = ote-registryconsole.ipmirror.com
 CN = rapi.ipmirror.com
 CN = rapiote.ipmirror.com
 CN = rcube.ipmirror.com
 CN = register.ipmirror.de
 CN = registryconsole.ipmirror.com
 CN = telhosting.ipmirror.com
 CN = www.ipmirror.com
 
 This was issued by
 
 CN = PositiveSSL CA
 O = Comodo CA Limited
 L = Salford
 ST = Greater Manchester
 C = GB
 
 Validity dates are
 (1/6/2010 0:00:00 AM GMT) to (7/10/2010 23:59:59 PM GMT)
 so it's a currently live cert from a major CA.  The
 cert chain validates properly.
 
 Is this considered valid?

 John Nagle
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   majord...@openssl.org
 


-- 
---
Willy Weisz

European Centre for Parallel Computing at Vienna (VCPC)
   Computational Science Center
   University of Vienna
  Nordbergstrasse 15/C312
 A-1090 Wien
Tel: (+43 1) 4277 - 39424  Fax: (+43 1) 4277 - 9394
 e-mail: willy.we...@univie.ac.at
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: self-signed SSL certificates and trusted root certificate

2010-06-02 Thread Eisenacher, Patrick
 -Original Message-
 From: Vieri

 --- On Tue, 6/1/10, Dave Thompson wrote:

  CN doesn't need to be hostname or domainname for a CA
  cert.
  Technically not required on entity cert either, but on WWW
  most parties do want/like entity's CN to be domainname.

 How does one issue a cert for multiple CN?
 Suppose I have just one HTTP server but it can be accessed
 via multiple FQDN... I suppose I need to use subjectAltName?

Subject alternative name is one possibility. If you need a cert for several 
hosts/hostnames belonging to the same domain, a wildcard CN comes to mind as 
well, eg. *.domain.com.

HTH,
Patrick Eisenacher

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: self-signed SSL certificates and trusted root certificate

2010-06-02 Thread Jeffrey Walton
Hi Vieri,

 How does one issue a cert for multiple CN?
 Suppose I have just one HTTP server but it can be accessed
 via multiple FQDN... I suppose I need to use subjectAltName?

 Subject alternative name is one possibility. If you need a cert for
 several hosts/hostnames belonging to the same domain, a wildcard
 CN comes to mind as well, eg. *.domain.com.
Wild carding usually makes the security folks cringe. A bad guy can
stand up a malicious server, and the server appears legit to the
outside world due to the wild card.

Jeff

On Wed, Jun 2, 2010 at 9:52 AM, Eisenacher, Patrick
patrick.eisenac...@bdr.de wrote:
 -Original Message-
 From: Vieri

 --- On Tue, 6/1/10, Dave Thompson wrote:

  CN doesn't need to be hostname or domainname for a CA
  cert.
  Technically not required on entity cert either, but on WWW
  most parties do want/like entity's CN to be domainname.

 How does one issue a cert for multiple CN?
 Suppose I have just one HTTP server but it can be accessed
 via multiple FQDN... I suppose I need to use subjectAltName?

 Subject alternative name is one possibility. If you need a cert for several 
 hosts/hostnames belonging to the same domain, a wildcard CN comes to mind as 
 well, eg. *.domain.com.

 HTH,
 Patrick Eisenacher

 [SNIP]
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Does OpenSSL supports the HTTP POST request?

2010-06-02 Thread Yogesh_Gujar

Hi,
I want to use HTTP POST request for connecting to the server..I checked with
the available sample programs but it all supports HTTP GET.
So my doubt is that Is it possible to send HTTP POST message using the
openSSL.
If yes?then how I can achieve that?

Thanks.
-- 
View this message in context: 
http://old.nabble.com/Does-OpenSSL-supports-the-HTTP-POST-request--tp28754933p28754933.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: self-signed SSL certificates and trusted root certificate

2010-06-02 Thread Eisenacher, Patrick
Hi Jeff,

 -Original Message-
 From: Jeffrey Walton

 Hi Vieri,

  How does one issue a cert for multiple CN?
  Suppose I have just one HTTP server but it can be accessed
  via multiple FQDN... I suppose I need to use subjectAltName?
 
  Subject alternative name is one possibility. If you need a cert for
  several hosts/hostnames belonging to the same domain, a wildcard
  CN comes to mind as well, eg. *.domain.com.
 Wild carding usually makes the security folks cringe. A bad guy can
 stand up a malicious server, and the server appears legit to the
 outside world due to the wild card.

can you please elaborate on where you see a security drawback in the attack 
scenario you mentioned when using wildcard certs over non-wildcard certs?

Thank you,
Patrick Eisenacher
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: max length to encrypt

2010-06-02 Thread Chuck Pareto
Hi Phillip,
I'm not sure what you mean by shouldn't be using public-key encryption,
why?
It seems like .Net sets up a nice class that is easily implemented, all I
need is the key and the exponent and I can encrypt and decrypt when needed.
I don't think I really have a choice about what to use, I recently started
in a group that has a public and private key they are using to encrypt and
then decrypt strings of data. I don't think I can change that. What would be
the advantages of doing what you suggest and using symmetric encryption to
encrypt and PK encryption for encrypting the key? I don't think we have a
symmetric key because we are using RSA with a public and private key.If you
think your approach is better please let me know and I will discuss it with
my group and see if we can make a change.

I think we are using PKCS1 because the max length is 256 - 11

On Wed, Jun 2, 2010 at 5:15 AM, Phillip Hellewell ssh...@gmail.com wrote:

 On Thu, May 27, 2010 at 2:20 PM, Chuck Pareto chuckda...@gmail.com
 wrote:
  Hi,
  I'm still unsure as to the max length string I can use to encrypt. I'm
 using
  the rsacrypto class in .net to encrypt.
  I know I can't pass in a string that's 256 bytes long or greater because
  there us an exception that gets thrown. But as I work my way back in
 length
  I still get exceptions with string lengths smaller than 256.

 If it's using PKCS1 padding (most common), then the max length is 11
 bytes less than the key size, so 256-11.

 But like David said, you shouldn't be using public-key encryption
 directly unless you know what you're doing.  The normal approach is to
 use symmetric encryption (e.g., AES) to encrypt the data, and PK
 encryption for encrypting the symmetric key.

 Phillip
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   majord...@openssl.org



Re: Does OpenSSL supports the HTTP POST request?

2010-06-02 Thread Patrice Guérin

Hi Yogesh

Of course, yes !
SSL is completly independant of HTTP protocol.
HTTP GET and POST methods differ in the way of passing parameters.

On GET, parameter are passed in the URI as
   URI?param=valueparam=value...param=value

On POST, parameters are passed in the same format
   param=valueparam=value...param=value
but as the request data.
In one word :
   POST Uri HTTP/1.1
   request attributes
   Content-Type: application/x-www-form-urlencoded
   Content-Length = data size
  
   param=valueparam=value...param=value- this is request data


Once the request is build, you can send it to the web server, and read 
as usual.


Hope this helps
Patrice.

Yogesh_Gujar a écrit :

Hi,
I want to use HTTP POST request for connecting to the server..I checked with
the available sample programs but it all supports HTTP GET.
So my doubt is that Is it possible to send HTTP POST message using the
openSSL.
If yes?then how I can achieve that?

Thanks.
  


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: Does OpenSSL supports the HTTP POST request?

2010-06-02 Thread luiz
Hi

I use https post with any problem

you just need to format properly your https post string , and send the data

Regards
Luiz


 Hi,
 I want to use HTTP POST request for connecting to the server..I checked
 with
 the available sample programs but it all supports HTTP GET.
 So my doubt is that Is it possible to send HTTP POST message using the
 openSSL.
 If yes?then how I can achieve that?

 Thanks.
 --
 View this message in context:
 http://old.nabble.com/Does-OpenSSL-supports-the-HTTP-POST-request--tp28754933p28754933.html
 Sent from the OpenSSL - User mailing list archive at Nabble.com.
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   majord...@openssl.org



__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


How do I remove OpenSSL 0.9.8m

2010-06-02 Thread Olson, Tina S
Hello,

I have OpenSSL installed on a Windows server, and a security vulnerability was 
identified with v.0.9.8m, which I believe came with my Apache 2.2 installation.

Separate from Apache, I installed the v0.9.8n light binary version to generate 
the key/cert files.

How can I uninstall v0.9.8m?

Any suggestions from the user community would be appreciated.

Thanks in advance.

Tina

Thank you,
Tina Olson



unable to build dynamic library on HP-UX RISC and Itanium

2010-06-02 Thread Alona Rossen
Hello, 

 

Building dynamic library on HP-UX fails despite I explicitly specify
'shared' as Configure argument:

 

./Configure hpux64-ia64-cc -D_REENTRANT shared

 

 

Please advise.

 

Thank you, 

Alona




 

  http://www.opentext.com/2/email-signature-event 


 



 

 

 

 

 

 

 

 

This email is protected by domestic and international copyright laws and
treaties and is the property of Open Text Corporation, it may contain
confidential and/or trade secret information of the Open Text
Corporation and/or its subsidiaries (OTC), and may be subject to legal
privilege in favor of OTC. This email may only be lawfully received,
accessed, displayed on a computer screen, printed, copied, and/or used
by the specific addressee(s) named above (Authorized Recipient) for
the purpose for which it was sent by OTC. All other rights and licenses
to this email are fully reserved to OTC. If you are not an Authorized
Recipient, you are required to immediately delete this email in its
entirety without printing, copying, using, and/or re-transmitting this
email, either in whole or in part. The transmission of this email by OTC
is not to be construed as a waiver by OTC and/or the individual sending
this email on behalf of OTC of any of their respective rights or
privileges at law or otherwise, howsoever arising.

 

 

image002.gif

Encrypt using PHP Decrypt on Windows

2010-06-02 Thread Beans57

Hi all
I'm trying to write some code to secure credit cards in a PHP based website
using openssl. I want to generate the public / private keys using PHP. (This
bit is fine). Then encrypt the card number using PHP. (This is also fine as
I've tested that I can decrypt it again using PHP). But eventually I want to
not store the private key on the webserver so I want to decrypt in a Visual
Studio C++ application and this is where it's going wrong. In PHP I've
used...
openssl_pkey_new . . . to generate new key pair
openssl_pkey_export . . . to export private key
openssl_public_encrypt . . . to encrypt using public key
openssl_private_decrypt . . . to check I get same data back

Now in the Windows C++ side I've used...
BIO *bioPtr = BIO_new_mem_buf(privkey, privkeylen);
RSA *prvkey = PEM_read_bio_RSAPrivateKey(bioPtr, NULL, NULL, NULL); // No
errors reported
iRet =
RSA_private_decrypt(encryptedtextlen,encryptedtext,decryp,prvkey,RSA_PKCS1_PADDING);

I've stripped all the error checking etc out for readability but everything
seems to go ok until RSA_private_decrypt which always returns...
error:0407106B:rsa routines:RSA_padding_check_PKCS1_type_2:block type is not
02
Whatever I enter for encrypted text gives the same result so I think really
this result is saying my encrypted text is garbage/not understood. I'm
starting to think that maybe my approach is incorrect, that maybe I can't
use RSA_private_decrypt to decrypt data encrypted using
openssl_public_encrypt in PHP. If anyone has any pointers or advice I would
be very grateful.

Vince
-- 
View this message in context: 
http://old.nabble.com/Encrypt-using-PHP-Decrypt-on-Windows-tp28759523p28759523.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: Certificate with multiple CN fields - valid?

2010-06-02 Thread Michael Ströder
John Nagle wrote:
Normally, when a certificate is to be valid for more than one
 domain name, one name is in the CN field, and the others are in
 the subjectAltName extension.
 
But look at the cert for https://www.ipmirror.com/;. 

This might serve as an interesting example for the people discussing
draft-saintandre-tls-server-id-check on the ietf-certid list:

https://www.ietf.org/mailman/listinfo/certid

Ciao, Michael.
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: unable to build dynamic library on HP-UX RISC and Itanium

2010-06-02 Thread William A. Rowe Jr.
On 6/2/2010 11:08 AM, Alona Rossen wrote:
 
 Building dynamic library on HP-UX fails despite I explicitly specify
 ‘shared’ as Configure argument:
 
 ./Configure hpux64-ia64-cc -D_REENTRANT shared

Why are you adding -D for _REENTRANT?

I did a very similar build last week, no such problems, would you care
to be more specific about which OpenSSL package you are configuring?
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Re: unable to build dynamic library on HP-UX RISC and Itanium

2010-06-02 Thread William A. Rowe Jr.
On 6/2/2010 4:04 PM, Alona Rossen wrote:
 This is a suggested configuration. -D stands for preprocessor define.

The reason I ask is that the entries in Configure should provide the
necessary defines, and if not, that is a bug.  As it was 'suggested',
we'll just presume things are fine w/w-o it.

You still failed to identify the openssl package you were configuring,
which doesn't give anyone much to go on, especially those who are in
some position to look at the problem.


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


RE: max length to encrypt

2010-06-02 Thread David Schwartz

Chuck Pareto wrote:


 I'm not sure what you mean by shouldn't be using public-key
 encryption, why?

Because you don't understand its properties, so there's no way you can know
whether or not it meets your security requirements.

 It seems like .Net sets up a nice class that is easily
 implemented, all I need is the key and the exponent and I can
 encrypt and decrypt when needed.

Right, except you don't get any security.

 I don't think I really have a choice about what to use, I recently
 started in a group that has a public and private key they are using
 to encrypt and then decrypt strings of data.

Which is fine if, for example, those strings of data are randomly-chosen
keys for a symmetric cipher. It is, however, not fine if those strings are
messages.

 I don't think I can change that. What would be the advantages of doing
 what you suggest and using symmetric encryption to encrypt and PK
 encryption for encrypting the key?

The advantage would be that if you have reasonable security objectives,
there's a good chance the algorithm would meet them. Numerous attacks
against RSA are known -- RSA is just an algorithm, it is not a scheme -- and
you need a well-designed cryptographic scheme to meet actual security
requirements.

http://crypto.stanford.edu/~dabo/abstracts/RSAattack-survey.html


 I don't think we have a symmetric key because we are using RSA with
 a public and private key.

That's a non-sequiter. The public and private key could be being used to
encipher and decipher the symmetric key. This is the normal approach.

 If you think your approach is better please let me know and I will
 discuss it with my group and see if we can make a change.

If your group includes a security expert, this kind of stuff would already
be done. If it doesn't, the likelihood of this making things any better
isn't really all that great.

DS

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org