X-Git-Url: https://www.wagner.pp.ru/gitweb/?p=oss%2Fctypescrypto.git;a=blobdiff_plain;f=ctypescrypto%2Fcms.py;h=d92b7335f2dc4917352c0c422a6376332dd6f016;hp=8e856f50c24a5f5674282882db78e8aee7dd9268;hb=79425e0192b55dded5b50b2d5216184480b7fc75;hpb=968dd1b70b51b9df1a5ee3f7c6d1645a536fb7e0 diff --git a/ctypescrypto/cms.py b/ctypescrypto/cms.py index 8e856f5..d92b733 100644 --- a/ctypescrypto/cms.py +++ b/ctypescrypto/cms.py @@ -17,6 +17,12 @@ from ctypescrypto.bio import Membio from ctypescrypto.oid import Oid from ctypescrypto.x509 import StackOfX509 +# Check for neccesary functionality in libcrypto +# LibreSSL fails this check + +if not hasattr(libcrypto,"CMS_decrypt"): + raise OSError("libcrypto lacks CMS functionality. Try using different libcrypto") + class CMSError(LibCryptoError): """ Exception which is raised when error occurs