diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-08-17 17:27:05 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-17 17:48:43 +0100 |
commit | 59b4da05b4072df79e85b5f8bbf4cf049431b9b6 (patch) | |
tree | 155db4d78c61608b24d072f6a925b9031e3c98db /apps | |
parent | d6073e27ebdbab63bf0add13fa0f66dcaa6e39e8 (diff) |
Constify X509_SIG.
Constify X509_SIG_get0() and order arguments to mactch new standard.
Add X509_SIG_get0_mutable() to support modification or initialisation
of an X509_SIG structure.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pkcs12.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 1fcd713309..7b12221ae1 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -40,7 +40,7 @@ int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bags, char *pass, int print_attribs(BIO *out, const STACK_OF(X509_ATTRIBUTE) *attrlst, const char *name); void hex_prin(BIO *out, unsigned char *buf, int len); -static int alg_print(X509_ALGOR *alg); +static int alg_print(const X509_ALGOR *alg); int cert_load(BIO *in, STACK_OF(X509) *sk); static int set_pbe(int *ppbe, const char *str); @@ -521,8 +521,8 @@ int pkcs12_main(int argc, char **argv) OPENSSL_strlcpy(macpass, pass, sizeof macpass); if ((options & INFO) && PKCS12_mac_present(p12)) { - ASN1_INTEGER *tmaciter; - X509_ALGOR *macalgid; + const ASN1_INTEGER *tmaciter; + const X509_ALGOR *macalgid; const ASN1_OBJECT *macobj; PKCS12_get0_mac(NULL, &macalgid, NULL, &tmaciter, p12); X509_ALGOR_get0(&macobj, NULL, NULL, macalgid); @@ -650,12 +650,12 @@ int dump_certs_pkeys_bag(BIO *out, PKCS12_SAFEBAG *bag, char *pass, case NID_pkcs8ShroudedKeyBag: if (options & INFO) { - X509_SIG *tp8; - X509_ALGOR *tp8alg; + const X509_SIG *tp8; + const X509_ALGOR *tp8alg; BIO_printf(bio_err, "Shrouded Keybag: "); tp8 = PKCS12_SAFEBAG_get0_pkcs8(bag); - X509_SIG_get0(&tp8alg, NULL, tp8); + X509_SIG_get0(tp8, &tp8alg, NULL); alg_print(tp8alg); } if (options & NOKEYS) @@ -740,7 +740,7 @@ end: return i; } -static int alg_print(X509_ALGOR *alg) +static int alg_print(const X509_ALGOR *alg) { int pbenid, aparamtype; const ASN1_OBJECT *aoid; |