| Qore Programming Language - C/C++ Library 1.0.8

Public Member Functions | List of all members
QoreSSLPrivateKey Class Reference

provides access to a private key data structure for SSL connections More...

`#include <QoreSSLPrivateKey.h>`

Inheritance diagram for QoreSSLPrivateKey:
[legend]
Collaboration diagram for QoreSSLPrivateKey:
[legend]

## Public Member Functions
DLLEXPORT | QoreSSLPrivateKey (const char *fn, const char *pp, ExceptionSink *xsink)
| creates the object from a file name by reading in the file in PEM format More...
DLLEXPORT | QoreSSLPrivateKey (const BinaryNode *bin, ExceptionSink *xsink)
| creates the object from a pointer to a BinaryNode object (key data in DER format) More...
DLLEXPORT | QoreSSLPrivateKey (const QoreString *str, const char *pp, ExceptionSink *xsink)
| create the object from a pointer to a QoreString representing the private key data in PEM format More...
DLLLOCAL | QoreSSLPrivateKey (EVP_PKEY *p)
| private constructor; not exported
DLLEXPORT int64 | getBitLength () const
| returns the length in bits
DLLEXPORT BinaryNode * | getDER (ExceptionSink *xsink) const
| returns a binary in DER format representing the private key, caller owns the BinaryNode reference count returned More...
DLLEXPORT QoreHashNode * | getInfo () const
| caller owns the QoreHashNode reference count returned
DLLEXPORT QoreStringNode * | getPEM (ExceptionSink *xsink) const
| returns a string in PEM format representing the private key, caller owns the QoreStringNode reference count returned More...
DLLEXPORT const char * | getType () const
| returns the key type
DLLEXPORT int64 | getVersion () const
| returns a constant '1': do not use; only included for backwards-compatibility
DLLEXPORT QoreSSLPrivateKey * | pkRefSelf () const
| caller owns reference returned
Public Member Functions inherited from AbstractPrivateData
virtual DLLLOCAL void | deref (ExceptionSink *xsink)
| decrements the reference count of the object More...
virtual DLLLOCAL void | deref ()
| decrements the reference count of the object without the possibility of throwing a Qore-language exception
DLLLOCAL void | ref () const
| increments the reference count of the object
Public Member Functions inherited from QoreReferenceCounter
DLLEXPORT | QoreReferenceCounter ()
| creates the reference counter object
DLLEXPORT | QoreReferenceCounter (const QoreReferenceCounter &old)
| creates a new object with a reference count of 1 More...
DLLEXPORT | ~QoreReferenceCounter ()
| destroys the reference counter object
DLLEXPORT bool | is_unique () const
| returns true if the reference count is 1 More...
DLLEXPORT int | reference_count () const
| gets the reference count More...
DLLEXPORT bool | ROdereference () const
| atomically decrements the reference count More...
DLLEXPORT void | ROreference () const
| atomically increments the reference count

## Additional Inherited Members
Protected Member Functions inherited from AbstractPrivateData
virtual DLLLOCAL | ~AbstractPrivateData ()
| as these objects are reference counted, the destructor should be called only when the reference count = 0 and not manually

## Detailed Description

provides access to a private key data structure for SSL connections

## Constructor & Destructor Documentation

## ◆ QoreSSLPrivateKey() [1/3]

DLLEXPORT QoreSSLPrivateKey::QoreSSLPrivateKey | ( | const char * | fn,
|  | const char * | pp,
|  | ExceptionSink * | xsink
| ) |  |

creates the object from a file name by reading in the file in PEM format

Parameters

  fn | the filename of the private key file to open (must be in PEM format)
  pp | the pass phase for the key (if any; may be NULL)
  xsink | Qore-language exceptions are raised here in case of errors

## ◆ QoreSSLPrivateKey() [2/3]

DLLEXPORT QoreSSLPrivateKey::QoreSSLPrivateKey | ( | const BinaryNode * | bin,
|  | ExceptionSink * | xsink
| ) |  |

creates the object from a pointer to a BinaryNode object (key data in DER format)

Parameters

  bin | a pointer to a BinaryNode object with the raw binary private key information
  xsink | Qore-language exceptions are raised here in case of errors

## ◆ QoreSSLPrivateKey() [3/3]

DLLEXPORT QoreSSLPrivateKey::QoreSSLPrivateKey | ( | const QoreString * | str,
|  | const char * | pp,
|  | ExceptionSink * | xsink
| ) |  |

create the object from a pointer to a QoreString representing the private key data in PEM format

Parameters

  str | a pointer to a QoreString with the private key data in PEM format
  pp | the pass phase for the key (if any; may be NULL)
  xsink | Qore-language exceptions are raised here in case of errors

## Member Function Documentation

## ◆ getDER()

DLLEXPORT BinaryNode* QoreSSLPrivateKey::getDER | ( | ExceptionSink * | xsink | ) | const

returns a binary in DER format representing the private key, caller owns the BinaryNode reference count returned

Returns
  a binary in DER format representing the private key, caller owns the BinaryNode reference count returned

Since
  Qore 0.9

## ◆ getPEM()

DLLEXPORT QoreStringNode* QoreSSLPrivateKey::getPEM | ( | ExceptionSink * | xsink | ) | const

returns a string in PEM format representing the private key, caller owns the QoreStringNode reference count returned

Returns
  a string in PEM format representing the private key, caller owns the QoreStringNode reference count returned

The documentation for this class was generated from the following file:

- include/qore/QoreSSLPrivateKey.h