src/lib/crypto.c
SIGNATURE *crypto_sign_new(JCR *jcr)
{
   SIGNATURE *sig;

   sig = (SIGNATURE *)malloc(sizeof(SIGNATURE));
   if (!sig) {
      return NULL;
   }

   sig->sigData = SignatureData_new();
   sig->jcr = jcr;
   Dmsg1(150, "crypto_sign_new jcr=%p\n", jcr);

   if (!sig->sigData) {
      /* Allocation failed in OpenSSL */
      free(sig);
      return NULL;
   }

   /* Set the ASN.1 structure version number */
   ASN1_INTEGER_set(sig->sigData->version, BACULA_ASN1_VERSION);

   return sig;
}
/*
 * Create a new message signature context.
 *  Returns: A pointer to a SIGNATURE object on success.
 *           NULL on failure.
 */
Create a new message signature context.
Returns: A pointer to a SIGNATURE object on success.
NULL on failure.
Create a new message signature context . Returns : A pointer to a SIGNATURE object on success . NULL on failure .
SIGNATURE *crypto_sign_new(JCR *jcr)
{
   SIGNATURE *sig;
   sig = (SIGNATURE *)malloc(sizeof(SIGNATURE));
   if (!sig) {
      return NULL;
   }
   sig->sigData = SignatureData_new();
   sig->jcr = jcr;
   Dmsg1(150, "crypto_sign_new jcr=%p\n", jcr);
   if (!sig->sigData) {
      free(sig);
      return NULL;
   }
   ASN1_INTEGER_set(sig->sigData->version, BACULA_ASN1_VERSION);
   return sig;
}
SIGNATURE * crypto_sign_new ( JCR * jcr ) { SIGNATURE * sig ; sig = ( SIGNATURE * ) malloc ( sizeof ( SIGNATURE ) ) ; if ( ! sig ) { return NULL ; } sig -> sigData = SignatureData_new ( ) ; sig -> jcr = jcr ; Dmsg1 ( 150 , " \n " , jcr ) ; if ( ! sig -> sigData ) { free ( sig ) ; return NULL ; } ASN1_INTEGER_set ( sig -> sigData -> version , BACULA_ASN1_VERSION ) ; return sig ; }
Create a new message signature context.
Create a new message signature context .
/* Allocation failed in OpenSSL */ /* Set the ASN.1 structure version number */