#
# spec file for package python-asn1crypto
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name:           python-asn1crypto
Version:        0.24.0
Release:        9.4
Summary:        ASN.1 parser and serializer for Python
License:        MIT
Group:          Development/Languages/Python
Url:            https://github.com/wbond/asn1crypto
Source:         https://files.pythonhosted.org/packages/source/a/asn1crypto/asn1crypto-%{version}.tar.gz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  python-rpm-macros
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%python_subpackages

%description
ASN.1 parser and serializer with definitions for private keys, public keys,
certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X509 and TSP

%prep
%setup -q -n asn1crypto-%{version}

%build

%python_build

%install
%python_install

%files %{python_files}
%defattr(-,root,root,-)
%{python_sitelib}/*

%changelog
* Sat Dec 16 2017 arun@gmx.de
- update to version 0.24.0:
  * x509.Certificate().self_signed will no longer return "yes" under
    any circumstances. This helps prevent confusion since the library
    does not verify the signature. Instead a library like oscrypto
    should be used to confirm if a certificate is self-signed.
  * Added various OIDs to x509.KeyPurposeId()
  * Added x509.Certificate().private_key_usage_period_value
  * Added structures for parsing common subject directory attributes
    for X.509 certificates, including x509.SubjectDirectoryAttribute()
  * Added algos.AnyAlgorithmIdentifier() for situations where an
    algorithm identifier may contain a digest, signed digest or
    encryption algorithm OID
  * Fixed a bug with
    x509.Certificate().subject_directory_attributes_value not
    returning the correct value
  * Fixed a bug where explicitly-tagged fields in a core.Sequence()
    would not function properly when the field had a default value
  * Fixed a bug with type checking in pem.armor()
* Sat Nov 11 2017 arun@gmx.de
- update to version 0.23.0:
  * Backwards compatibility break: the tag_type, explicit_tag and
    explicit_class attributes on core.Asn1Value no longer exist and
    were replaced by the implicit and explicit attributes. Field param
    dicts may use the new explicit and implicit keys, or the old
    tag_type and tag keys. The attribute changes will likely to have
    little to no impact since they were primarily an implementation
    detail.
  * Teletex strings used inside of X.509 certificates are now
    interpreted using Windows-1252 (a superset of ISO-8859-1). This
    enables compatibility with certificates generated by
    OpenSSL. Strict parsing of Teletex strings can be retained by
    using the x509.strict_teletex() context manager.
  * Added support for nested explicit tagging, supporting values that
    are defined with explicit tagging and then added as a field of
    another structure using explicit tagging.
  * Fixed a UnicodeDecodeError when trying to find the (optional)
    dependency OpenSSL on Python 2
  * Fixed next_update field of crl.TbsCertList to be optional
  * Added the x509.Certificate.sha256_fingerprint property
  * x509.Certificate.ocsp_urls and x509.DistributionPoint.url will now
    return https://, ldap:// and ldaps:// URLs in addition to http://.
  * Added CMS Attribute Protection definitions from RFC 6211
  * Added OIDs from RFC 6962
* Fri Mar 17 2017 jengelh@inai.de
- Ensure neutrality of descriptions
* Thu Mar 16 2017 tbechtold@suse.com
- Initial packaging (version 0.22.0)