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