| 1 | /* |
| 2 | * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. |
| 3 | * Use is subject to license terms. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Lesser General Public License |
| 16 | * along with this library; if not, write to the Free Software Foundation, |
| 17 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 18 | * |
| 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 20 | * or visit www.oracle.com if you need additional information or have any |
| 21 | * questions. |
| 22 | */ |
| 23 | |
| 24 | /* ********************************************************************* |
| 25 | * |
| 26 | * The Original Code is the Netscape security libraries. |
| 27 | * |
| 28 | * The Initial Developer of the Original Code is |
| 29 | * Netscape Communications Corporation. |
| 30 | * Portions created by the Initial Developer are Copyright (C) 1994-2000 |
| 31 | * the Initial Developer. All Rights Reserved. |
| 32 | * |
| 33 | * Contributor(s): |
| 34 | * Dr Vipul Gupta <vipul.gupta@sun.com>, Sun Microsystems Laboratories |
| 35 | * |
| 36 | *********************************************************************** */ |
| 37 | |
| 38 | #ifndef _SECOIDT_H_ |
| 39 | #define _SECOIDT_H_ |
| 40 | |
| 41 | /* |
| 42 | * secoidt.h - public data structures for ASN.1 OID functions |
| 43 | * |
| 44 | * $Id: secoidt.h,v 1.23 2007/05/05 22:45:16 nelson%bolyard.com Exp $ |
| 45 | */ |
| 46 | |
| 47 | typedef struct SECOidDataStr SECOidData; |
| 48 | typedef struct SECAlgorithmIDStr SECAlgorithmID; |
| 49 | |
| 50 | /* |
| 51 | ** An X.500 algorithm identifier |
| 52 | */ |
| 53 | struct SECAlgorithmIDStr { |
| 54 | SECItem algorithm; |
| 55 | SECItem parameters; |
| 56 | }; |
| 57 | |
| 58 | #define SEC_OID_SECG_EC_SECP192R1 SEC_OID_ANSIX962_EC_PRIME192V1 |
| 59 | #define SEC_OID_SECG_EC_SECP256R1 SEC_OID_ANSIX962_EC_PRIME256V1 |
| 60 | #define SEC_OID_PKCS12_KEY_USAGE SEC_OID_X509_KEY_USAGE |
| 61 | |
| 62 | /* fake OID for DSS sign/verify */ |
| 63 | #define SEC_OID_SHA SEC_OID_MISS_DSS |
| 64 | |
| 65 | typedef enum { |
| 66 | INVALID_CERT_EXTENSION = 0, |
| 67 | UNSUPPORTED_CERT_EXTENSION = 1, |
| 68 | SUPPORTED_CERT_EXTENSION = 2 |
| 69 | } SECSupportExtenTag; |
| 70 | |
| 71 | struct SECOidDataStr { |
| 72 | SECItem oid; |
| 73 | ECCurveName offset; |
| 74 | const char * desc; |
| 75 | unsigned long mechanism; |
| 76 | SECSupportExtenTag supportedExtension; |
| 77 | /* only used for x.509 v3 extensions, so |
| 78 | that we can print the names of those |
| 79 | extensions that we don't even support */ |
| 80 | }; |
| 81 | |
| 82 | #endif /* _SECOIDT_H_ */ |
| 83 | |