Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
25 #ifndef __PKCS12ATTRIBUTE_H__
26 #define __PKCS12ATTRIBUTE_H__
33 This class decodes the bagAttributes present in the SafeBag.
34 It has methods to get the AttributeId and the AttributeValue.
36 class CDecPkcs12Attribute : public CBase
40 Creates a new PKCS#12 attribute object.
42 PKCS#12AttrSet ATTRIBUTE ::= {
45 ... -- Other attributes are allowed
48 @param aBagAttributes Contains a PKCS#12 attribute set.
49 @return A pointer to the newly allocated object.
50 @leave if the bag attribute set is not a sequence or class
51 tag name is not Universal.
53 IMPORT_C static CDecPkcs12Attribute* NewL(const TDesC8& aBagAttributes);
56 Returns the ObjectIdentifier indicating the attribute type:
57 - OID ---- 1.2.840.113549.1.9.20 friendlyName
58 - OID ---- 1.2.840.113549.1.9.21 localKeyId
59 @return An object identifier indicating the attribute type.
61 IMPORT_C const TDesC& AttributeId() const;
64 Returns the DER encoded attribute values present in the Safe Bag.
65 @return The ASN1Set of attribute values
67 IMPORT_C const RPointerArray<TDesC8>& AttributeValue() const;
72 virtual ~CDecPkcs12Attribute();
76 This decodes the entire BagAttributes structure
77 @param aBagAttributes Contains a PKCS#12 attribute set.
78 @leave if the bag attribute set is not a sequence or class
79 tag name is not Universal.
81 void ConstructL(const TDesC8& aBagAttributes);
86 CDecPkcs12Attribute();
90 @param aDecPkcs12Atrribute A CDecPkcs12Attribute object.
92 CDecPkcs12Attribute(const CDecPkcs12Attribute& aDecPkcs12Atrribute);
96 @param aDecPkcs12Atrribute A CDecPkcs12Attribute object.
97 @return A reference to CDecPkcs12Attribute class.
99 CDecPkcs12Attribute& operator=(const CDecPkcs12Attribute& aDecPkcs12Atrribute);
102 /** Contains the object identifier indicating the attribute type */
105 /** Contains the attribute value which is an DER encoded value */
106 RPointerArray<TDesC8> iAttributeValue;
108 } // namespace PKCS12
109 #endif // __PKCS12ATTRIBUTE_H__