Skip to content

Commit

Permalink
Fix for bug 286642 . Move utility functions to new libnssutil shared …
Browse files Browse the repository at this point in the history
…library. r=nelson
  • Loading branch information
julien.pierre.boogz%sun.com committed Oct 12, 2007
1 parent f4ec549 commit bfa5872
Show file tree
Hide file tree
Showing 79 changed files with 2,124 additions and 390 deletions.
6 changes: 6 additions & 0 deletions security/coreconf/config.mk
Expand Up @@ -189,3 +189,9 @@ endif
ifdef BUILD_LIBPKIX_TESTS
DEFINES += -DBUILD_LIBPKIX_TESTS
endif

# This allows all library and tools code to use the util function
# implementations directly from libnssutil3, rather than the wrappers
# in libnss3 which are present for binary compatibility only
DEFINES += -DUSE_UTIL_DIRECTLY

12 changes: 7 additions & 5 deletions security/nss/cmd/platlibs.mk
Expand Up @@ -117,7 +117,7 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
$(CRYPTOLIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssutil.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \
Expand Down Expand Up @@ -180,7 +180,7 @@ EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssb.$(LIB_SUFFIX) \
$(CRYPTOLIB) \
$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)nssutil.$(LIB_SUFFIX) \
$(DIST)/lib/$(LIB_PREFIX)dbm.$(LIB_SUFFIX) \
$(PKIXLIB) \
$(DIST)/lib/$(LIB_PREFIX)nss.$(LIB_SUFFIX) \
Expand Down Expand Up @@ -215,12 +215,13 @@ ifeq ($(OS_ARCH), WINNT)
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
EXTRA_LIBS += \
$(DIST)/lib/$(LIB_PREFIX)sectool.$(LIB_SUFFIX) \
$(DIST)/lib/$(IMPORT_LIB_PREFIX)nssutil3$(IMPORT_LIB_SUFFIX) \
$(DIST)/lib/$(IMPORT_LIB_PREFIX)smime3$(IMPORT_LIB_SUFFIX) \
$(DIST)/lib/$(IMPORT_LIB_PREFIX)ssl3$(IMPORT_LIB_SUFFIX) \
$(DIST)/lib/$(IMPORT_LIB_PREFIX)nss3$(IMPORT_LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4$(IMPORT_LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4$(IMPORT_LIB_SUFFIX) \
$(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4$(IMPORT_LIB_SUFFIX) \
$(NULL)

# $(PROGRAM) has NO explicit dependencies on $(OS_LIBS)
Expand Down Expand Up @@ -266,6 +267,7 @@ EXTRA_SHARED_LIBS += \
-lssl3 \
-lsmime3 \
-lnss3 \
-lnssutil3 \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \
Expand Down
1 change: 1 addition & 0 deletions security/nss/lib/certdb/cert.h
Expand Up @@ -43,6 +43,7 @@
#ifndef _CERT_H_
#define _CERT_H_

#include "utilrename.h"
#include "plarena.h"
#include "plhash.h"
#include "prlong.h"
Expand Down
54 changes: 36 additions & 18 deletions security/nss/lib/certdb/certdb.c
Expand Up @@ -71,6 +71,12 @@
#include "pki.h"
#include "pki3hack.h"

SEC_ASN1_MKSUB(CERT_TimeChoiceTemplate)
SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate)
SEC_ASN1_MKSUB(SEC_BitStringTemplate)
SEC_ASN1_MKSUB(SEC_IntegerTemplate)
SEC_ASN1_MKSUB(SEC_SkipTemplate)

/*
* Certificate database handling code
*/
Expand All @@ -92,18 +98,30 @@ const SEC_ASN1Template CERT_SequenceOfCertExtensionTemplate[] = {
{ SEC_ASN1_SEQUENCE_OF, 0, CERT_CertExtensionTemplate }
};

const SEC_ASN1Template CERT_ValidityTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(CERTValidity) },
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTValidity,notBefore),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate), 0 },
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTValidity,notAfter),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate), 0 },
{ 0 }
};

const SEC_ASN1Template CERT_CertificateTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(CERTCertificate) },
{ SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_CONTEXT_SPECIFIC | 0, /* XXX DER_DEFAULT */
SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0, /* XXX DER_DEFAULT */
offsetof(CERTCertificate,version),
SEC_IntegerTemplate },
SEC_ASN1_SUB(SEC_IntegerTemplate) },
{ SEC_ASN1_INTEGER,
offsetof(CERTCertificate,serialNumber) },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCertificate,signature),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
{ SEC_ASN1_SAVE,
offsetof(CERTCertificate,derIssuer) },
{ SEC_ASN1_INLINE,
Expand All @@ -122,12 +140,12 @@ const SEC_ASN1Template CERT_CertificateTemplate[] = {
{ SEC_ASN1_INLINE,
offsetof(CERTCertificate,subjectPublicKeyInfo),
CERT_SubjectPublicKeyInfoTemplate },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | 1,
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1,
offsetof(CERTCertificate,issuerID),
SEC_BitStringTemplate },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | 2,
SEC_ASN1_SUB(SEC_BitStringTemplate) },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 2,
offsetof(CERTCertificate,subjectID),
SEC_BitStringTemplate },
SEC_ASN1_SUB(SEC_BitStringTemplate) },
{ SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_CONTEXT_SPECIFIC | 3,
offsetof(CERTCertificate,extensions),
Expand All @@ -143,9 +161,9 @@ const SEC_ASN1Template SEC_SignedCertificateTemplate[] =
offsetof(CERTCertificate,signatureWrap.data) },
{ SEC_ASN1_INLINE,
0, CERT_CertificateTemplate },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCertificate,signatureWrap.signatureAlgorithm),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
{ SEC_ASN1_BIT_STRING,
offsetof(CERTCertificate,signatureWrap.signature) },
{ 0 }
Expand All @@ -158,8 +176,8 @@ const SEC_ASN1Template SEC_CertSubjectTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(SECItem) },
{ SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_CONTEXT_SPECIFIC | 0,
0, SEC_SkipTemplate }, /* version */
SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
0, SEC_ASN1_SUB(SEC_SkipTemplate) }, /* version */
{ SEC_ASN1_SKIP }, /* serial number */
{ SEC_ASN1_SKIP }, /* signature algorithm */
{ SEC_ASN1_SKIP }, /* issuer */
Expand All @@ -176,8 +194,8 @@ const SEC_ASN1Template SEC_CertIssuerTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(SECItem) },
{ SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_CONTEXT_SPECIFIC | 0,
0, SEC_SkipTemplate }, /* version */
SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
0, SEC_ASN1_SUB(SEC_SkipTemplate) }, /* version */
{ SEC_ASN1_SKIP }, /* serial number */
{ SEC_ASN1_SKIP }, /* signature algorithm */
{ SEC_ASN1_ANY, 0, NULL }, /* issuer */
Expand All @@ -191,8 +209,8 @@ const SEC_ASN1Template SEC_CertSerialNumberTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(SECItem) },
{ SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_CONTEXT_SPECIFIC | 0,
0, SEC_SkipTemplate }, /* version */
SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
0, SEC_ASN1_SUB(SEC_SkipTemplate) }, /* version */
{ SEC_ASN1_ANY, 0, NULL }, /* serial number */
{ SEC_ASN1_SKIP_REST },
{ 0 }
Expand All @@ -207,8 +225,8 @@ const SEC_ASN1Template CERT_CertKeyTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(CERTCertKey) },
{ SEC_ASN1_EXPLICIT | SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED |
SEC_ASN1_CONTEXT_SPECIFIC | 0,
0, SEC_SkipTemplate }, /* version */
SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
0, SEC_ASN1_SUB(SEC_SkipTemplate) }, /* version */
{ SEC_ASN1_INTEGER,
offsetof(CERTCertKey,serialNumber) },
{ SEC_ASN1_SKIP }, /* signature algorithm */
Expand Down
15 changes: 8 additions & 7 deletions security/nss/lib/certdb/certv3.c
Expand Up @@ -145,15 +145,16 @@ CERT_FindCertURLExtension(CERTCertificate *cert, int tag, int catag)
goto loser;
}

rv = SEC_QuickDERDecodeItem(arena, &urlstringitem, SEC_IA5StringTemplate,
&urlitem);
rv = SEC_QuickDERDecodeItem(arena, &urlstringitem,
SEC_ASN1_GET(SEC_IA5StringTemplate), &urlitem);

if ( rv != SECSuccess ) {
goto loser;
}
if ( hasbase ) {
rv = SEC_QuickDERDecodeItem(arena, &basestringitem, SEC_IA5StringTemplate,
&baseitem);
rv = SEC_QuickDERDecodeItem(arena, &basestringitem,
SEC_ASN1_GET(SEC_IA5StringTemplate),
&baseitem);

if ( rv != SECSuccess ) {
goto loser;
Expand Down Expand Up @@ -250,8 +251,8 @@ CERT_FindNSStringExtension(CERTCertificate *cert, int oidtag)
goto loser;
}

rv = SEC_QuickDERDecodeItem(arena, &tmpItem, SEC_IA5StringTemplate,
&wrapperItem);
rv = SEC_QuickDERDecodeItem(arena, &tmpItem,
SEC_ASN1_GET(SEC_IA5StringTemplate), &wrapperItem);

if ( rv != SECSuccess ) {
goto loser;
Expand Down Expand Up @@ -305,7 +306,7 @@ CERT_FindSubjectKeyIDExtension(CERTCertificate *cert, SECItem *retItem)
PLArenaPool * tmpArena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);
if (tmpArena) {
rv = SEC_QuickDERDecodeItem(tmpArena, &decodedValue,
SEC_OctetStringTemplate,
SEC_ASN1_GET(SEC_OctetStringTemplate),
&encodedValue);
if (rv == SECSuccess) {
rv = SECITEM_CopyItem(NULL, retItem, &decodedValue);
Expand Down
8 changes: 5 additions & 3 deletions security/nss/lib/certdb/certxutl.c
Expand Up @@ -305,7 +305,8 @@ CERT_EncodeAndAddBitStrExtension (void *exthandle, int idtag,

PrepareBitStringForEncoding (&bitsmap, value);
return (CERT_EncodeAndAddExtension
(exthandle, idtag, &bitsmap, critical, SEC_BitStringTemplate));
(exthandle, idtag, &bitsmap, critical,
SEC_ASN1_GET(SEC_BitStringTemplate)));
}

SECStatus
Expand Down Expand Up @@ -444,8 +445,9 @@ CERT_FindBitStringExtension (CERTCertExtension **extensions, int tag,
goto loser;
}

rv = SEC_QuickDERDecodeItem(arena, &tmpItem, SEC_BitStringTemplate,
&wrapperItem);
rv = SEC_QuickDERDecodeItem(arena, &tmpItem,
SEC_ASN1_GET(SEC_BitStringTemplate),
&wrapperItem);

if ( rv != SECSuccess ) {
goto loser;
Expand Down
62 changes: 36 additions & 26 deletions security/nss/lib/certdb/crl.c
Expand Up @@ -103,12 +103,15 @@ static const SEC_ASN1Template cert_KrlEntryTemplate[] = {
{ 0 }
};

SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate);
SEC_ASN1_MKSUB(CERT_TimeChoiceTemplate);

static const SEC_ASN1Template cert_KrlTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(CERTCrl) },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCrl,signatureAlg),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
{ SEC_ASN1_SAVE,
offsetof(CERTCrl,derName) },
{ SEC_ASN1_INLINE,
Expand All @@ -132,9 +135,9 @@ static const SEC_ASN1Template cert_SignedKrlTemplate[] = {
{ SEC_ASN1_INLINE,
offsetof(CERTSignedCrl,crl),
cert_KrlTemplate },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTSignedCrl,signatureWrap.signatureAlgorithm),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
{ SEC_ASN1_BIT_STRING,
offsetof(CERTSignedCrl,signatureWrap.signature) },
{ 0 }
Expand All @@ -155,8 +158,9 @@ static const SEC_ASN1Template cert_CrlEntryTemplate[] = {
0, NULL, sizeof(CERTCrlEntry) },
{ SEC_ASN1_INTEGER,
offsetof(CERTCrlEntry,serialNumber) },
{ SEC_ASN1_INLINE,
offsetof(CERTCrlEntry,revocationDate), CERT_TimeChoiceTemplate },
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCrlEntry,revocationDate),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate) },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_SEQUENCE_OF,
offsetof(CERTCrlEntry, extensions),
SEC_CERTExtensionTemplate},
Expand All @@ -167,18 +171,20 @@ const SEC_ASN1Template CERT_CrlTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(CERTCrl) },
{ SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, offsetof (CERTCrl, version) },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCrl,signatureAlg),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate)},
{ SEC_ASN1_SAVE,
offsetof(CERTCrl,derName) },
{ SEC_ASN1_INLINE,
offsetof(CERTCrl,name),
CERT_NameTemplate },
{ SEC_ASN1_INLINE,
offsetof(CERTCrl,lastUpdate), CERT_TimeChoiceTemplate },
{ SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL,
offsetof(CERTCrl,nextUpdate), CERT_TimeChoiceTemplate },
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCrl,lastUpdate),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate) },
{ SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL | SEC_ASN1_XTRN,
offsetof(CERTCrl,nextUpdate),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate) },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_SEQUENCE_OF,
offsetof(CERTCrl,entries),
cert_CrlEntryTemplate },
Expand All @@ -193,18 +199,20 @@ const SEC_ASN1Template CERT_CrlTemplateNoEntries[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(CERTCrl) },
{ SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, offsetof (CERTCrl, version) },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCrl,signatureAlg),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
{ SEC_ASN1_SAVE,
offsetof(CERTCrl,derName) },
{ SEC_ASN1_INLINE,
offsetof(CERTCrl,name),
CERT_NameTemplate },
{ SEC_ASN1_INLINE,
offsetof(CERTCrl,lastUpdate), CERT_TimeChoiceTemplate },
{ SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL,
offsetof(CERTCrl,nextUpdate), CERT_TimeChoiceTemplate },
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCrl,lastUpdate),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate) },
{ SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL | SEC_ASN1_XTRN,
offsetof(CERTCrl,nextUpdate),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate) },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_SEQUENCE_OF |
SEC_ASN1_SKIP }, /* skip entries */
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
Expand All @@ -220,10 +228,12 @@ const SEC_ASN1Template CERT_CrlTemplateEntriesOnly[] = {
{ SEC_ASN1_SKIP | SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL },
{ SEC_ASN1_SKIP },
{ SEC_ASN1_SKIP },
{ SEC_ASN1_SKIP | SEC_ASN1_INLINE,
offsetof(CERTCrl,lastUpdate), CERT_TimeChoiceTemplate },
{ SEC_ASN1_SKIP | SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL,
offsetof(CERTCrl,nextUpdate), CERT_TimeChoiceTemplate },
{ SEC_ASN1_SKIP | SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTCrl,lastUpdate),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate) },
{ SEC_ASN1_SKIP | SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL | SEC_ASN1_XTRN,
offsetof(CERTCrl,nextUpdate),
SEC_ASN1_SUB(CERT_TimeChoiceTemplate) },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_SEQUENCE_OF,
offsetof(CERTCrl,entries),
cert_CrlEntryTemplate }, /* decode entries */
Expand All @@ -239,9 +249,9 @@ const SEC_ASN1Template CERT_SignedCrlTemplate[] = {
{ SEC_ASN1_INLINE,
offsetof(CERTSignedCrl,crl),
CERT_CrlTemplate },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN ,
offsetof(CERTSignedCrl,signatureWrap.signatureAlgorithm),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
{ SEC_ASN1_BIT_STRING,
offsetof(CERTSignedCrl,signatureWrap.signature) },
{ 0 }
Expand All @@ -255,9 +265,9 @@ static const SEC_ASN1Template cert_SignedCrlTemplateNoEntries[] = {
{ SEC_ASN1_INLINE,
offsetof(CERTSignedCrl,crl),
CERT_CrlTemplateNoEntries },
{ SEC_ASN1_INLINE,
{ SEC_ASN1_INLINE | SEC_ASN1_XTRN,
offsetof(CERTSignedCrl,signatureWrap.signatureAlgorithm),
SECOID_AlgorithmIDTemplate },
SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
{ SEC_ASN1_BIT_STRING,
offsetof(CERTSignedCrl,signatureWrap.signature) },
{ 0 }
Expand Down

0 comments on commit bfa5872

Please sign in to comment.