2016-05-17 18:51:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
1998-12-21 10:52:47 +00:00
|
|
|
*
|
2016-05-17 18:51:34 +00:00
|
|
|
* Licensed under the OpenSSL license (the "License"). You may not use
|
|
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
1998-12-21 10:52:47 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2015-05-14 14:56:48 +00:00
|
|
|
#include "internal/cryptlib.h"
|
2000-12-08 19:09:35 +00:00
|
|
|
#include <openssl/asn1t.h>
|
1999-07-21 22:10:23 +00:00
|
|
|
#include <openssl/x509.h>
|
2016-03-10 15:04:46 +00:00
|
|
|
#include "internal/x509_int.h"
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2000-12-08 19:09:35 +00:00
|
|
|
ASN1_SEQUENCE(X509_SIG) = {
|
2015-01-22 03:40:55 +00:00
|
|
|
ASN1_SIMPLE(X509_SIG, algor, X509_ALGOR),
|
|
|
|
ASN1_SIMPLE(X509_SIG, digest, ASN1_OCTET_STRING)
|
2001-02-23 12:47:06 +00:00
|
|
|
} ASN1_SEQUENCE_END(X509_SIG)
|
1998-12-21 10:52:47 +00:00
|
|
|
|
2000-12-08 19:09:35 +00:00
|
|
|
IMPLEMENT_ASN1_FUNCTIONS(X509_SIG)
|
2016-03-10 15:04:46 +00:00
|
|
|
|
2016-08-17 16:27:05 +00:00
|
|
|
void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg,
|
|
|
|
const ASN1_OCTET_STRING **pdigest)
|
|
|
|
{
|
|
|
|
if (palg)
|
|
|
|
*palg = sig->algor;
|
|
|
|
if (pdigest)
|
|
|
|
*pdigest = sig->digest;
|
|
|
|
}
|
|
|
|
|
2016-08-20 12:02:09 +00:00
|
|
|
void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg,
|
|
|
|
ASN1_OCTET_STRING **pdigest)
|
2016-03-10 15:04:46 +00:00
|
|
|
{
|
|
|
|
if (palg)
|
|
|
|
*palg = sig->algor;
|
|
|
|
if (pdigest)
|
|
|
|
*pdigest = sig->digest;
|
|
|
|
}
|