diff options
author | beck <> | 2015-02-11 04:05:14 +0000 |
---|---|---|
committer | beck <> | 2015-02-11 04:05:14 +0000 |
commit | 74b6aedb7d6d115e1fa81e96806190a780392341 (patch) | |
tree | aa9f1278214f1d7d996d30cf1959f3878cb48be1 /src/lib/libcrypto/gost | |
parent | 16aad183ce9bacab429bd62937373a0da02849ec (diff) | |
download | openbsd-74b6aedb7d6d115e1fa81e96806190a780392341.tar.gz openbsd-74b6aedb7d6d115e1fa81e96806190a780392341.tar.bz2 openbsd-74b6aedb7d6d115e1fa81e96806190a780392341.zip |
Guenther has plans for OPENSSL_NO_CMS, so revert this for the moment.
Diffstat (limited to 'src/lib/libcrypto/gost')
-rw-r--r-- | src/lib/libcrypto/gost/gostr341001_ameth.c | 16 | ||||
-rw-r--r-- | src/lib/libcrypto/gost/gostr341001_pmeth.c | 7 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/lib/libcrypto/gost/gostr341001_ameth.c b/src/lib/libcrypto/gost/gostr341001_ameth.c index fb1d57ad6d..45ddd44e42 100644 --- a/src/lib/libcrypto/gost/gostr341001_ameth.c +++ b/src/lib/libcrypto/gost/gostr341001_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gostr341001_ameth.c,v 1.7 2015/02/11 03:55:42 beck Exp $ */ | 1 | /* $OpenBSD: gostr341001_ameth.c,v 1.8 2015/02/11 04:05:14 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -61,6 +61,9 @@ | |||
61 | #include <openssl/x509.h> | 61 | #include <openssl/x509.h> |
62 | #include <openssl/gost.h> | 62 | #include <openssl/gost.h> |
63 | 63 | ||
64 | #ifndef OPENSSL_NO_CMS | ||
65 | #include <openssl/cms.h> | ||
66 | #endif | ||
64 | 67 | ||
65 | #include "asn1_locl.h" | 68 | #include "asn1_locl.h" |
66 | #include "gost_locl.h" | 69 | #include "gost_locl.h" |
@@ -653,6 +656,17 @@ pkey_ctrl_gost01(EVP_PKEY *pkey, int op, long arg1, void *arg2) | |||
653 | if (arg1 == 0) | 656 | if (arg1 == 0) |
654 | PKCS7_RECIP_INFO_get0_alg(arg2, &alg3); | 657 | PKCS7_RECIP_INFO_get0_alg(arg2, &alg3); |
655 | break; | 658 | break; |
659 | #ifndef OPENSSL_NO_CMS | ||
660 | case ASN1_PKEY_CTRL_CMS_SIGN: | ||
661 | if (arg1 == 0) | ||
662 | CMS_SignerInfo_get0_algs(arg2, NULL, NULL, &alg1, &alg2); | ||
663 | break; | ||
664 | |||
665 | case ASN1_PKEY_CTRL_CMS_ENVELOPE: | ||
666 | if (arg1 == 0) | ||
667 | CMS_RecipientInfo_ktri_get0_algs(arg2, NULL, NULL, &alg3); | ||
668 | break; | ||
669 | #endif | ||
656 | case ASN1_PKEY_CTRL_DEFAULT_MD_NID: | 670 | case ASN1_PKEY_CTRL_DEFAULT_MD_NID: |
657 | *(int *)arg2 = GostR3410_get_md_digest(digest); | 671 | *(int *)arg2 = GostR3410_get_md_digest(digest); |
658 | return 2; | 672 | return 2; |
diff --git a/src/lib/libcrypto/gost/gostr341001_pmeth.c b/src/lib/libcrypto/gost/gostr341001_pmeth.c index 89e1ae62cd..0157996a40 100644 --- a/src/lib/libcrypto/gost/gostr341001_pmeth.c +++ b/src/lib/libcrypto/gost/gostr341001_pmeth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gostr341001_pmeth.c,v 1.9 2015/02/11 03:55:42 beck Exp $ */ | 1 | /* $OpenBSD: gostr341001_pmeth.c,v 1.10 2015/02/11 04:05:14 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -597,6 +597,11 @@ pkey_gost01_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) | |||
597 | case EVP_PKEY_CTRL_PKCS7_DECRYPT: | 597 | case EVP_PKEY_CTRL_PKCS7_DECRYPT: |
598 | case EVP_PKEY_CTRL_PKCS7_SIGN: | 598 | case EVP_PKEY_CTRL_PKCS7_SIGN: |
599 | case EVP_PKEY_CTRL_DIGESTINIT: | 599 | case EVP_PKEY_CTRL_DIGESTINIT: |
600 | #ifndef OPENSSL_NO_CMS | ||
601 | case EVP_PKEY_CTRL_CMS_ENCRYPT: | ||
602 | case EVP_PKEY_CTRL_CMS_DECRYPT: | ||
603 | case EVP_PKEY_CTRL_CMS_SIGN: | ||
604 | #endif | ||
600 | return 1; | 605 | return 1; |
601 | 606 | ||
602 | case EVP_PKEY_CTRL_GOST_PARAMSET: | 607 | case EVP_PKEY_CTRL_GOST_PARAMSET: |