1f9fbec18Smcpowers /* ***** BEGIN LICENSE BLOCK ***** 2f9fbec18Smcpowers * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3f9fbec18Smcpowers * 4f9fbec18Smcpowers * The contents of this file are subject to the Mozilla Public License Version 5f9fbec18Smcpowers * 1.1 (the "License"); you may not use this file except in compliance with 6f9fbec18Smcpowers * the License. You may obtain a copy of the License at 7f9fbec18Smcpowers * http://www.mozilla.org/MPL/ 8f9fbec18Smcpowers * 9f9fbec18Smcpowers * Software distributed under the License is distributed on an "AS IS" basis, 10f9fbec18Smcpowers * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11f9fbec18Smcpowers * for the specific language governing rights and limitations under the 12f9fbec18Smcpowers * License. 13f9fbec18Smcpowers * 14f9fbec18Smcpowers * The Original Code is the Netscape security libraries. 15f9fbec18Smcpowers * 16f9fbec18Smcpowers * The Initial Developer of the Original Code is 17f9fbec18Smcpowers * Netscape Communications Corporation. 18f9fbec18Smcpowers * Portions created by the Initial Developer are Copyright (C) 1994-2000 19f9fbec18Smcpowers * the Initial Developer. All Rights Reserved. 20f9fbec18Smcpowers * 21f9fbec18Smcpowers * Contributor(s): 22f9fbec18Smcpowers * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories 23f9fbec18Smcpowers * 24f9fbec18Smcpowers * Alternatively, the contents of this file may be used under the terms of 25f9fbec18Smcpowers * either the GNU General Public License Version 2 or later (the "GPL"), or 26f9fbec18Smcpowers * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27f9fbec18Smcpowers * in which case the provisions of the GPL or the LGPL are applicable instead 28f9fbec18Smcpowers * of those above. If you wish to allow use of your version of this file only 29f9fbec18Smcpowers * under the terms of either the GPL or the LGPL, and not to allow others to 30f9fbec18Smcpowers * use your version of this file under the terms of the MPL, indicate your 31f9fbec18Smcpowers * decision by deleting the provisions above and replace them with the notice 32f9fbec18Smcpowers * and other provisions required by the GPL or the LGPL. If you do not delete 33f9fbec18Smcpowers * the provisions above, a recipient may use your version of this file under 34f9fbec18Smcpowers * the terms of any one of the MPL, the GPL or the LGPL. 35f9fbec18Smcpowers * 36f9fbec18Smcpowers * ***** END LICENSE BLOCK ***** */ 37f9fbec18Smcpowers /* 38f9fbec18Smcpowers * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 39f9fbec18Smcpowers * Use is subject to license terms. 40f9fbec18Smcpowers * 41f9fbec18Smcpowers * Sun elects to use this software under the MPL license. 42f9fbec18Smcpowers */ 43f9fbec18Smcpowers 44f9fbec18Smcpowers #ifndef _SECOIDT_H_ 45f9fbec18Smcpowers #define _SECOIDT_H_ 46f9fbec18Smcpowers 47f9fbec18Smcpowers /* 48f9fbec18Smcpowers * secoidt.h - public data structures for ASN.1 OID functions 49f9fbec18Smcpowers * 50f9fbec18Smcpowers * $Id: secoidt.h,v 1.23 2007/05/05 22:45:16 nelson%bolyard.com Exp $ 51f9fbec18Smcpowers */ 52f9fbec18Smcpowers 53f9fbec18Smcpowers typedef struct SECOidDataStr SECOidData; 54f9fbec18Smcpowers typedef struct SECAlgorithmIDStr SECAlgorithmID; 55f9fbec18Smcpowers 56f9fbec18Smcpowers /* 57f9fbec18Smcpowers ** An X.500 algorithm identifier 58f9fbec18Smcpowers */ 59f9fbec18Smcpowers struct SECAlgorithmIDStr { 60f9fbec18Smcpowers SECItem algorithm; 61f9fbec18Smcpowers SECItem parameters; 62f9fbec18Smcpowers }; 63f9fbec18Smcpowers 64f9fbec18Smcpowers #define SEC_OID_SECG_EC_SECP192R1 SEC_OID_ANSIX962_EC_PRIME192V1 65f9fbec18Smcpowers #define SEC_OID_SECG_EC_SECP256R1 SEC_OID_ANSIX962_EC_PRIME256V1 66f9fbec18Smcpowers #define SEC_OID_PKCS12_KEY_USAGE SEC_OID_X509_KEY_USAGE 67f9fbec18Smcpowers 68f9fbec18Smcpowers /* fake OID for DSS sign/verify */ 69f9fbec18Smcpowers #define SEC_OID_SHA SEC_OID_MISS_DSS 70f9fbec18Smcpowers 71f9fbec18Smcpowers typedef enum { 72f9fbec18Smcpowers INVALID_CERT_EXTENSION = 0, 73f9fbec18Smcpowers UNSUPPORTED_CERT_EXTENSION = 1, 74f9fbec18Smcpowers SUPPORTED_CERT_EXTENSION = 2 75f9fbec18Smcpowers } SECSupportExtenTag; 76f9fbec18Smcpowers 77f9fbec18Smcpowers struct SECOidDataStr { 78f9fbec18Smcpowers SECItem oid; 79f9fbec18Smcpowers ECCurveName offset; 80f9fbec18Smcpowers const char * desc; 81f9fbec18Smcpowers unsigned long mechanism; 82*c40a6cd7SToomas Soome SECSupportExtenTag supportedExtension; 83f9fbec18Smcpowers /* only used for x.509 v3 extensions, so 84f9fbec18Smcpowers that we can print the names of those 85f9fbec18Smcpowers extensions that we don't even support */ 86f9fbec18Smcpowers }; 87f9fbec18Smcpowers 88f9fbec18Smcpowers #endif /* _SECOIDT_H_ */ 89