Deleted Added
full compact
pkcs12.c (68651) pkcs12.c (100928)
1/* pkcs12.c */
2#if !defined(NO_DES) && !defined(NO_SHA1)
3
4/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
5 * project 1999.
6 */
7/* ====================================================================
8 * Copyright (c) 1999 The OpenSSL Project. All rights reserved.

--- 735 unchanged lines hidden (view full) ---

744 if (options & INFO) {
745 BIO_printf (bio_err, "Shrouded Keybag: ");
746 alg_print (bio_err, bag->value.shkeybag->algor);
747 }
748 if (options & NOKEYS) return 1;
749 print_attribs (out, bag->attrib, "Bag Attributes");
750 if (!(p8 = M_PKCS12_decrypt_skey (bag, pass, passlen)))
751 return 0;
1/* pkcs12.c */
2#if !defined(NO_DES) && !defined(NO_SHA1)
3
4/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
5 * project 1999.
6 */
7/* ====================================================================
8 * Copyright (c) 1999 The OpenSSL Project. All rights reserved.

--- 735 unchanged lines hidden (view full) ---

744 if (options & INFO) {
745 BIO_printf (bio_err, "Shrouded Keybag: ");
746 alg_print (bio_err, bag->value.shkeybag->algor);
747 }
748 if (options & NOKEYS) return 1;
749 print_attribs (out, bag->attrib, "Bag Attributes");
750 if (!(p8 = M_PKCS12_decrypt_skey (bag, pass, passlen)))
751 return 0;
752 if (!(pkey = EVP_PKCS82PKEY (p8))) return 0;
752 if (!(pkey = EVP_PKCS82PKEY (p8))) {
753 PKCS8_PRIV_KEY_INFO_free(p8);
754 return 0;
755 }
753 print_attribs (out, p8->attributes, "Key Attributes");
754 PKCS8_PRIV_KEY_INFO_free(p8);
755 PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL, pempass);
756 EVP_PKEY_free(pkey);
757 break;
758
759 case NID_certBag:
760 if (options & INFO) BIO_printf (bio_err, "Certificate bag\n");

--- 156 unchanged lines hidden ---
756 print_attribs (out, p8->attributes, "Key Attributes");
757 PKCS8_PRIV_KEY_INFO_free(p8);
758 PEM_write_bio_PrivateKey (out, pkey, enc, NULL, 0, NULL, pempass);
759 EVP_PKEY_free(pkey);
760 break;
761
762 case NID_certBag:
763 if (options & INFO) BIO_printf (bio_err, "Certificate bag\n");

--- 156 unchanged lines hidden ---