2016-05-18 02:51:34 +08:00
|
|
|
/*
|
|
|
|
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
1998-12-21 18:52:47 +08:00
|
|
|
*
|
2018-12-06 20:17:34 +08:00
|
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 02:51:34 +08:00
|
|
|
* 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 18:52:47 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2015-05-14 22:56:48 +08:00
|
|
|
#include "internal/cryptlib.h"
|
2000-12-09 03:09:35 +08:00
|
|
|
#include <openssl/asn1t.h>
|
1999-07-22 06:10:23 +08:00
|
|
|
#include <openssl/x509.h>
|
2016-03-10 23:04:46 +08:00
|
|
|
#include "internal/x509_int.h"
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2000-12-09 03:09:35 +08:00
|
|
|
ASN1_SEQUENCE(X509_SIG) = {
|
2015-01-22 11:40:55 +08:00
|
|
|
ASN1_SIMPLE(X509_SIG, algor, X509_ALGOR),
|
|
|
|
ASN1_SIMPLE(X509_SIG, digest, ASN1_OCTET_STRING)
|
2001-02-23 20:47:06 +08:00
|
|
|
} ASN1_SEQUENCE_END(X509_SIG)
|
1998-12-21 18:52:47 +08:00
|
|
|
|
2000-12-09 03:09:35 +08:00
|
|
|
IMPLEMENT_ASN1_FUNCTIONS(X509_SIG)
|
2016-03-10 23:04:46 +08:00
|
|
|
|
2016-08-18 00:27:05 +08: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 20:02:09 +08:00
|
|
|
void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg,
|
|
|
|
ASN1_OCTET_STRING **pdigest)
|
2016-03-10 23:04:46 +08:00
|
|
|
{
|
|
|
|
if (palg)
|
|
|
|
*palg = sig->algor;
|
|
|
|
if (pdigest)
|
|
|
|
*pdigest = sig->digest;
|
|
|
|
}
|