Bug 1095307 - Clean up nssPKIX509_GetIssuerAndSerialFromDER(). r=relyea.
This patch:
- Removes the two static issuer_and_serial_from_encoding() functions.
- Rewrites nssPKIX509_GetIssuerAndSerialFromDER() to be almost identical to the
issuer_and_serial_from_encoding() from pkistore.c. This new version avoids
unnecessary heap allocations (and so doesn't need an |arena| argument),
obtains the issuer and serial in the order suggested by the function name,
and is more readable than the old version.
- Tweaks nssTrustDomain_FindCertificateByEncodedCertificate() to be more like
nssTrustDomain_GetCertByDERFromCache() and
nssCertificateStore_FindCertificateByEncodedCertificate(), which are the
other two functions that now call nssPKIX509_GetIssuerAndSerialFromDER().
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
CORE_DEPTH = ../..
DEPTH = ../..
MODULE = nss
CPPSRCS = \
ssl_loopback_unittest.cc \
ssl_gtest.cc \
test_io.cc \
tls_parser.cc \
$(NULL)
INCLUDES += -I$(CORE_DEPTH)/external_tests/google_test/gtest/include
REQUIRES = nspr nss libdbm gtest
PROGRAM = ssl_gtest
EXTRA_LIBS = $(DIST)/lib/$(LIB_PREFIX)gtest.$(LIB_SUFFIX)