From 87112406861c58a342887fb2fe5656b4e40b5397 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 21 Oct 2014 10:56:33 -0700 Subject: whoops, forgotten file --- tests/test_interfaces.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tests/test_interfaces.py (limited to 'tests') diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py new file mode 100644 index 00000000..e8e97022 --- /dev/null +++ b/tests/test_interfaces.py @@ -0,0 +1,40 @@ +import abc + +import pytest + +import six + +from cryptography.utils import ( + InterfaceNotImplemented, register_interface, verify_interface +) + + +class TestVerifyInterface(object): + def test_verify_missing_method(self): + @six.add_metaclass(abc.ABCMeta) + class SimpleInterface(object): + @abc.abstractmethod + def method(self): + pass + + @register_interface(SimpleInterface) + class NonImplementer(object): + pass + + with pytest.raises(InterfaceNotImplemented): + verify_interface(SimpleInterface, NonImplementer) + + def test_different_arguments(self): + @six.add_metaclass(abc.ABCMeta) + class SimpleInterface(object): + @abc.abstractmethod + def method(self, a): + pass + + @register_interface(SimpleInterface) + class NonImplementer(object): + def method(self): + pass + + with pytest.raises(InterfaceNotImplemented): + verify_interface(SimpleInterface, NonImplementer) -- cgit v1.2.3 From f6d8ccc954fb3a2ecd1821b775837398a461ab3a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 21 Oct 2014 11:03:31 -0700 Subject: Added header --- tests/test_interfaces.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py index e8e97022..bcc1010a 100644 --- a/tests/test_interfaces.py +++ b/tests/test_interfaces.py @@ -1,3 +1,16 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import abc import pytest -- cgit v1.2.3 From 15dde27e5e14270f8e8837abe26c4ea1710bf053 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 21 Oct 2014 11:41:53 -0700 Subject: Fix for abstractproperty, and make things nicer --- tests/test_interfaces.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py index bcc1010a..e24f4db2 100644 --- a/tests/test_interfaces.py +++ b/tests/test_interfaces.py @@ -51,3 +51,18 @@ class TestVerifyInterface(object): with pytest.raises(InterfaceNotImplemented): verify_interface(SimpleInterface, NonImplementer) + + def test_handles_abstract_property(self): + @six.add_metaclass(abc.ABCMeta) + class SimpleInterface(object): + @abc.abstractproperty + def property(self): + pass + + @register_interface(SimpleInterface) + class NonImplementer(object): + @property + def property(self): + pass + + verify_interface(SimpleInterface, NonImplementer) -- cgit v1.2.3 From 67a4dd1a2227af1a3461c92edc5316ab9fe7a942 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 21 Oct 2014 23:57:04 -0700 Subject: fix up the line coverage --- tests/test_interfaces.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py index e24f4db2..0c72ad33 100644 --- a/tests/test_interfaces.py +++ b/tests/test_interfaces.py @@ -28,7 +28,7 @@ class TestVerifyInterface(object): class SimpleInterface(object): @abc.abstractmethod def method(self): - pass + """A simple method""" @register_interface(SimpleInterface) class NonImplementer(object): @@ -42,12 +42,12 @@ class TestVerifyInterface(object): class SimpleInterface(object): @abc.abstractmethod def method(self, a): - pass + """Method with one argument""" @register_interface(SimpleInterface) class NonImplementer(object): def method(self): - pass + """Method with no arguments""" with pytest.raises(InterfaceNotImplemented): verify_interface(SimpleInterface, NonImplementer) @@ -57,12 +57,12 @@ class TestVerifyInterface(object): class SimpleInterface(object): @abc.abstractproperty def property(self): - pass + """An abstract property""" @register_interface(SimpleInterface) class NonImplementer(object): @property def property(self): - pass + """A concrete property""" verify_interface(SimpleInterface, NonImplementer) -- cgit v1.2.3 From d918580097506197e0aadaa60c4681536b5f4adf Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 22 Oct 2014 10:12:07 -0700 Subject: Statically verify interface implementations, and fix all the resulting bugs --- tests/hazmat/backends/test_commoncrypto.py | 1 + tests/hazmat/backends/test_openssl.py | 3 +++ tests/hazmat/primitives/test_block.py | 1 + tests/hazmat/primitives/test_ec.py | 11 ++++++++++- tests/hazmat/primitives/test_hashes.py | 2 ++ tests/hazmat/primitives/test_hmac.py | 4 +++- tests/hazmat/primitives/test_pbkdf2hmac.py | 2 ++ 7 files changed, 22 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/backends/test_commoncrypto.py b/tests/hazmat/backends/test_commoncrypto.py index 28d1a6ca..b79c02e0 100644 --- a/tests/hazmat/backends/test_commoncrypto.py +++ b/tests/hazmat/backends/test_commoncrypto.py @@ -30,6 +30,7 @@ from ...utils import raises_unsupported_algorithm class DummyCipher(object): name = "dummy-cipher" block_size = 128 + key_size = 128 @pytest.mark.skipif("commoncrypto" not in diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 3bea413a..83494d0d 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -51,6 +51,7 @@ class DummyMode(object): @utils.register_interface(interfaces.CipherAlgorithm) class DummyCipher(object): name = "dummy-cipher" + key_size = 128 @utils.register_interface(interfaces.AsymmetricPadding) @@ -61,6 +62,8 @@ class DummyPadding(object): @utils.register_interface(interfaces.HashAlgorithm) class DummyHash(object): name = "dummy-hash" + block_size = 128 + digest_size = 128 class DummyMGF(object): diff --git a/tests/hazmat/primitives/test_block.py b/tests/hazmat/primitives/test_block.py index 022e3af7..0b90dd90 100644 --- a/tests/hazmat/primitives/test_block.py +++ b/tests/hazmat/primitives/test_block.py @@ -43,6 +43,7 @@ class DummyMode(object): @utils.register_interface(interfaces.CipherAlgorithm) class DummyCipher(object): name = "dummy-cipher" + key_size = 128 @pytest.mark.cipher diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py index 1b3bb9b3..9ed762cb 100644 --- a/tests/hazmat/primitives/test_ec.py +++ b/tests/hazmat/primitives/test_ec.py @@ -68,11 +68,20 @@ class DummyCurve(object): @utils.register_interface(interfaces.EllipticCurveSignatureAlgorithm) class DummySignatureAlgorithm(object): - pass + algorithm = None @utils.register_interface(EllipticCurveBackend) class DeprecatedDummyECBackend(object): + def _unimplemented(self): + raise NotImplementedError + + elliptic_curve_signature_algorithm_supported = _unimplemented + load_elliptic_curve_private_numbers = _unimplemented + load_elliptic_curve_public_numbers = _unimplemented + elliptic_curve_supported = _unimplemented + generate_elliptic_curve_private_key = _unimplemented + def elliptic_curve_private_key_from_numbers(self, numbers): return b"private_key" diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py index ffd65bde..2bf1f8ef 100644 --- a/tests/hazmat/primitives/test_hashes.py +++ b/tests/hazmat/primitives/test_hashes.py @@ -33,6 +33,8 @@ from ...utils import raises_unsupported_algorithm @utils.register_interface(interfaces.HashAlgorithm) class UnsupportedDummyHash(object): name = "unsupported-dummy-hash" + block_size = 128 + digest_size = 128 @pytest.mark.hash diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py index 77dfb6be..21be73a3 100644 --- a/tests/hazmat/primitives/test_hmac.py +++ b/tests/hazmat/primitives/test_hmac.py @@ -32,7 +32,9 @@ from ...utils import raises_unsupported_algorithm @utils.register_interface(interfaces.HashAlgorithm) class UnsupportedDummyHash(object): - name = "unsupported-dummy-hash" + name = "unsupported-dummy-hash" + block_size = 128 + digest_size = 128 @pytest.mark.supported( diff --git a/tests/hazmat/primitives/test_pbkdf2hmac.py b/tests/hazmat/primitives/test_pbkdf2hmac.py index e928fc6a..fa925877 100644 --- a/tests/hazmat/primitives/test_pbkdf2hmac.py +++ b/tests/hazmat/primitives/test_pbkdf2hmac.py @@ -31,6 +31,8 @@ from ...utils import raises_unsupported_algorithm @utils.register_interface(interfaces.HashAlgorithm) class DummyHash(object): name = "dummy-hash" + block_size = 128 + digest_size = 128 class TestPBKDF2HMAC(object): -- cgit v1.2.3 From 0ea233631ad2ed7e1abf372dfc1850a04eb7343d Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 22 Oct 2014 16:06:18 -0700 Subject: fixed some naming in the tests --- tests/hazmat/backends/test_multibackend.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/backends/test_multibackend.py b/tests/hazmat/backends/test_multibackend.py index c50b6cf6..39c03146 100644 --- a/tests/hazmat/backends/test_multibackend.py +++ b/tests/hazmat/backends/test_multibackend.py @@ -38,15 +38,15 @@ class DummyCipherBackend(object): def __init__(self, supported_ciphers): self._ciphers = supported_ciphers - def cipher_supported(self, algorithm, mode): - return (type(algorithm), type(mode)) in self._ciphers + def cipher_supported(self, cipher, mode): + return (type(cipher), type(mode)) in self._ciphers - def create_symmetric_encryption_ctx(self, algorithm, mode): - if not self.cipher_supported(algorithm, mode): + def create_symmetric_encryption_ctx(self, cipher, mode): + if not self.cipher_supported(cipher, mode): raise UnsupportedAlgorithm("", _Reasons.UNSUPPORTED_CIPHER) - def create_symmetric_decryption_ctx(self, algorithm, mode): - if not self.cipher_supported(algorithm, mode): + def create_symmetric_decryption_ctx(self, cipher, mode): + if not self.cipher_supported(cipher, mode): raise UnsupportedAlgorithm("", _Reasons.UNSUPPORTED_CIPHER) @@ -92,7 +92,7 @@ class DummyPBKDF2HMACBackend(object): @utils.register_interface(RSABackend) class DummyRSABackend(object): - def generate_rsa_private_key(self, public_exponent, private_key): + def generate_rsa_private_key(self, public_exponent, key_size): pass def rsa_padding_supported(self, padding): -- cgit v1.2.3 From d55fa5b92e92675ef160c26126feb01751d91fb0 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 25 Oct 2014 17:59:56 -0700 Subject: make things happy --- tests/hazmat/primitives/test_ec.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py index 683df046..6aea58a5 100644 --- a/tests/hazmat/primitives/test_ec.py +++ b/tests/hazmat/primitives/test_ec.py @@ -71,17 +71,7 @@ class DummySignatureAlgorithm(object): algorithm = None -@utils.register_interface(EllipticCurveBackend) class DeprecatedDummyECBackend(object): - def _unimplemented(self): - raise NotImplementedError - - elliptic_curve_signature_algorithm_supported = _unimplemented - load_elliptic_curve_private_numbers = _unimplemented - load_elliptic_curve_public_numbers = _unimplemented - elliptic_curve_supported = _unimplemented - generate_elliptic_curve_private_key = _unimplemented - def elliptic_curve_private_key_from_numbers(self, numbers): return b"private_key" -- cgit v1.2.3 From 71725db962e6498d63751db3d8048fa56bcb1252 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 25 Oct 2014 18:10:15 -0700 Subject: make this test happy --- tests/hazmat/primitives/test_hashes.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py index 79fc25c3..bab5bfca 100644 --- a/tests/hazmat/primitives/test_hashes.py +++ b/tests/hazmat/primitives/test_hashes.py @@ -23,6 +23,7 @@ from cryptography import utils from cryptography.exceptions import ( AlreadyFinalized, _Reasons ) +from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends.interfaces import HashBackend from cryptography.hazmat.primitives import hashes, interfaces @@ -45,16 +46,11 @@ class TestHashContext(object): m.update(six.u("\u00FC")) def test_copy_backend_object(self): - @utils.register_interface(HashBackend) - class PretendBackend(object): - pass - - pretend_backend = PretendBackend() + backend = default_backend() copied_ctx = pretend.stub() pretend_ctx = pretend.stub(copy=lambda: copied_ctx) - h = hashes.Hash(hashes.SHA1(), backend=pretend_backend, - ctx=pretend_ctx) - assert h._backend is pretend_backend + h = hashes.Hash(hashes.SHA1(), backend=backend, ctx=pretend_ctx) + assert h._backend is backend assert h.copy()._backend is h._backend def test_hash_algorithm_instance(self, backend): -- cgit v1.2.3 From 198bb65302f710957a5f67d53389277c5ab0a58c Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 25 Oct 2014 18:11:46 -0700 Subject: satisfy the cmac tests as well --- tests/hazmat/primitives/test_cmac.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/primitives/test_cmac.py b/tests/hazmat/primitives/test_cmac.py index 49e2043e..d9619daa 100644 --- a/tests/hazmat/primitives/test_cmac.py +++ b/tests/hazmat/primitives/test_cmac.py @@ -21,10 +21,10 @@ import pytest import six -from cryptography import utils from cryptography.exceptions import ( AlreadyFinalized, InvalidSignature, _Reasons ) +from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends.interfaces import CMACBackend from cryptography.hazmat.primitives.ciphers.algorithms import ( AES, ARC4, TripleDES @@ -195,18 +195,14 @@ class TestCMAC(object): def test_copy(): - @utils.register_interface(CMACBackend) - class PretendBackend(object): - pass - - pretend_backend = PretendBackend() + backend = default_backend() copied_ctx = pretend.stub() pretend_ctx = pretend.stub(copy=lambda: copied_ctx) key = b"2b7e151628aed2a6abf7158809cf4f3c" - cmac = CMAC(AES(key), backend=pretend_backend, ctx=pretend_ctx) + cmac = CMAC(AES(key), backend=backend, ctx=pretend_ctx) - assert cmac._backend is pretend_backend - assert cmac.copy()._backend is pretend_backend + assert cmac._backend is backend + assert cmac.copy()._backend is backend def test_invalid_backend(): -- cgit v1.2.3 From 4583ffda28b816359f4351cfe7918b2353cf947e Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 28 Oct 2014 08:30:16 -0700 Subject: sanitize the tests --- tests/hazmat/primitives/test_cmac.py | 6 +++--- tests/hazmat/primitives/test_hashes.py | 8 +++----- tests/hazmat/primitives/test_hmac.py | 14 +++++--------- 3 files changed, 11 insertions(+), 17 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/primitives/test_cmac.py b/tests/hazmat/primitives/test_cmac.py index d9619daa..c778ebee 100644 --- a/tests/hazmat/primitives/test_cmac.py +++ b/tests/hazmat/primitives/test_cmac.py @@ -24,14 +24,14 @@ import six from cryptography.exceptions import ( AlreadyFinalized, InvalidSignature, _Reasons ) -from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends.interfaces import CMACBackend from cryptography.hazmat.primitives.ciphers.algorithms import ( AES, ARC4, TripleDES ) from cryptography.hazmat.primitives.cmac import CMAC -from tests.utils import ( +from ..backends.test_multibackend import DummyCMACBackend +from ...utils import ( load_nist_vectors, load_vectors_from_file, raises_unsupported_algorithm ) @@ -195,7 +195,7 @@ class TestCMAC(object): def test_copy(): - backend = default_backend() + backend = DummyCMACBackend([AES]) copied_ctx = pretend.stub() pretend_ctx = pretend.stub(copy=lambda: copied_ctx) key = b"2b7e151628aed2a6abf7158809cf4f3c" diff --git a/tests/hazmat/primitives/test_hashes.py b/tests/hazmat/primitives/test_hashes.py index 4345a7f4..053a1a46 100644 --- a/tests/hazmat/primitives/test_hashes.py +++ b/tests/hazmat/primitives/test_hashes.py @@ -20,14 +20,12 @@ import pytest import six from cryptography import utils -from cryptography.exceptions import ( - AlreadyFinalized, _Reasons -) -from cryptography.hazmat.backends import default_backend +from cryptography.exceptions import AlreadyFinalized, _Reasons from cryptography.hazmat.backends.interfaces import HashBackend from cryptography.hazmat.primitives import hashes, interfaces from .utils import generate_base_hash_test +from ..backends.test_multibackend import DummyHashBackend from ...utils import raises_unsupported_algorithm @@ -46,7 +44,7 @@ class TestHashContext(object): m.update(six.u("\u00FC")) def test_copy_backend_object(self): - backend = default_backend() + backend = DummyHashBackend([hashes.SHA1]) copied_ctx = pretend.stub() pretend_ctx = pretend.stub(copy=lambda: copied_ctx) h = hashes.Hash(hashes.SHA1(), backend=backend, ctx=pretend_ctx) diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py index 3553632c..497b37e1 100644 --- a/tests/hazmat/primitives/test_hmac.py +++ b/tests/hazmat/primitives/test_hmac.py @@ -27,6 +27,7 @@ from cryptography.hazmat.backends.interfaces import HMACBackend from cryptography.hazmat.primitives import hashes, hmac, interfaces from .utils import generate_base_hmac_test +from ..backends.test_multibackend import DummyHMACBackend from ...utils import raises_unsupported_algorithm @@ -56,17 +57,12 @@ class TestHMAC(object): h.update(six.u("\u00FC")) def test_copy_backend_object(self): - @utils.register_interface(HMACBackend) - class PretendBackend(object): - pass - - pretend_backend = PretendBackend() + backend = DummyHMACBackend([hashes.SHA1]) copied_ctx = pretend.stub() pretend_ctx = pretend.stub(copy=lambda: copied_ctx) - h = hmac.HMAC(b"key", hashes.SHA1(), backend=pretend_backend, - ctx=pretend_ctx) - assert h._backend is pretend_backend - assert h.copy()._backend is pretend_backend + h = hmac.HMAC(b"key", hashes.SHA1(), backend=backend, ctx=pretend_ctx) + assert h._backend is backend + assert h.copy()._backend is backend def test_hmac_algorithm_instance(self, backend): with pytest.raises(TypeError): -- cgit v1.2.3 From be2eec7aabde5f9877ffbbcce96c10eab454ac38 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 28 Oct 2014 08:32:26 -0700 Subject: Fix tests --- tests/test_interfaces.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py index 0c72ad33..b988abee 100644 --- a/tests/test_interfaces.py +++ b/tests/test_interfaces.py @@ -17,9 +17,7 @@ import pytest import six -from cryptography.utils import ( - InterfaceNotImplemented, register_interface, verify_interface -) +from cryptography.utils import InterfaceNotImplemented, verify_interface class TestVerifyInterface(object): @@ -30,7 +28,6 @@ class TestVerifyInterface(object): def method(self): """A simple method""" - @register_interface(SimpleInterface) class NonImplementer(object): pass @@ -44,7 +41,6 @@ class TestVerifyInterface(object): def method(self, a): """Method with one argument""" - @register_interface(SimpleInterface) class NonImplementer(object): def method(self): """Method with no arguments""" @@ -59,7 +55,6 @@ class TestVerifyInterface(object): def property(self): """An abstract property""" - @register_interface(SimpleInterface) class NonImplementer(object): @property def property(self): -- cgit v1.2.3 From e49fafbb8a63e946d3dbff359e284ca05a74589e Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 28 Oct 2014 09:13:00 -0700 Subject: fix --- tests/hazmat/backends/test_commoncrypto.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/backends/test_commoncrypto.py b/tests/hazmat/backends/test_commoncrypto.py index 6bb0ede0..eb61a574 100644 --- a/tests/hazmat/backends/test_commoncrypto.py +++ b/tests/hazmat/backends/test_commoncrypto.py @@ -29,8 +29,8 @@ from ...utils import raises_unsupported_algorithm @utils.register_interface(interfaces.CipherAlgorithm) class DummyCipher(object): name = "dummy-cipher" - block_size = 128 - digest_size = None + block_size = None + key_size = None @pytest.mark.skipif("commoncrypto" not in -- cgit v1.2.3 From eeb14fd91c117acb8138ce4e29323da367d8e2ef Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 28 Oct 2014 09:32:15 -0700 Subject: fix --- tests/hazmat/backends/test_openssl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index ebd8686c..bc6a2bac 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -439,8 +439,7 @@ class TestOpenSSLCMAC(object): def test_unsupported_cipher(self): @utils.register_interface(BlockCipherAlgorithm) class FakeAlgorithm(object): - def __init__(self): - self.block_size = 64 + block_size = 64 with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_CIPHER): backend.create_cmac_ctx(FakeAlgorithm()) -- cgit v1.2.3