diff options
Diffstat (limited to '')
76 files changed, 0 insertions, 18240 deletions
diff --git a/src/lib/libcrypto/asn1/a_bmp.c b/src/lib/libcrypto/asn1/a_bmp.c deleted file mode 100644 index d9ac5a0475..0000000000 --- a/src/lib/libcrypto/asn1/a_bmp.c +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | /* crypto/asn1/a_bmp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1.h> | ||
| 62 | |||
| 63 | ASN1_BMPSTRING *ASN1_BMPSTRING_new(void) | ||
| 64 | { return M_ASN1_BMPSTRING_new(); } | ||
| 65 | |||
| 66 | void ASN1_BMPSTRING_free(ASN1_BMPSTRING *x) | ||
| 67 | { M_ASN1_BMPSTRING_free(x); } | ||
| 68 | |||
| 69 | int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **pp) | ||
| 70 | { | ||
| 71 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | ||
| 72 | V_ASN1_BMPSTRING,V_ASN1_UNIVERSAL)); | ||
| 73 | } | ||
| 74 | |||
| 75 | ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, unsigned char **pp, | ||
| 76 | long length) | ||
| 77 | { | ||
| 78 | ASN1_BMPSTRING *ret=NULL; | ||
| 79 | |||
| 80 | ret=(ASN1_BMPSTRING *)d2i_ASN1_bytes((ASN1_STRING **)a, | ||
| 81 | pp,length,V_ASN1_BMPSTRING,V_ASN1_UNIVERSAL); | ||
| 82 | if (ret == NULL) | ||
| 83 | { | ||
| 84 | ASN1err(ASN1_F_D2I_ASN1_BMPSTRING,ERR_R_NESTED_ASN1_ERROR); | ||
| 85 | return(NULL); | ||
| 86 | } | ||
| 87 | return(ret); | ||
| 88 | } | ||
| 89 | |||
diff --git a/src/lib/libcrypto/asn1/a_null.c b/src/lib/libcrypto/asn1/a_null.c deleted file mode 100644 index 119fd784be..0000000000 --- a/src/lib/libcrypto/asn1/a_null.c +++ /dev/null | |||
| @@ -1,119 +0,0 @@ | |||
| 1 | /* a_null.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1.h> | ||
| 62 | |||
| 63 | /* ASN1 functions for NULL type. For compatibility with other ASN1 code | ||
| 64 | * it returns a pointer to an "ASN1_NULL" structure. The new/free functions | ||
| 65 | * don't need to do any allocating because nothing is stored in a NULL. | ||
| 66 | */ | ||
| 67 | |||
| 68 | int i2d_ASN1_NULL(ASN1_NULL *a, unsigned char **pp) | ||
| 69 | { | ||
| 70 | if(!a) return 0; | ||
| 71 | if (pp) ASN1_put_object(pp,0,0,V_ASN1_NULL,V_ASN1_UNIVERSAL); | ||
| 72 | return 2; | ||
| 73 | } | ||
| 74 | |||
| 75 | ASN1_NULL *d2i_ASN1_NULL(ASN1_NULL **a, unsigned char **pp, long length) | ||
| 76 | { | ||
| 77 | ASN1_NULL *ret = NULL; | ||
| 78 | unsigned char *p; | ||
| 79 | long len; | ||
| 80 | int inf,tag,xclass; | ||
| 81 | int i=0; | ||
| 82 | |||
| 83 | p= *pp; | ||
| 84 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); | ||
| 85 | if (inf & 0x80) | ||
| 86 | { | ||
| 87 | i=ASN1_R_BAD_OBJECT_HEADER; | ||
| 88 | goto err; | ||
| 89 | } | ||
| 90 | |||
| 91 | if (tag != V_ASN1_NULL) | ||
| 92 | { | ||
| 93 | i=ASN1_R_EXPECTING_A_NULL; | ||
| 94 | goto err; | ||
| 95 | } | ||
| 96 | |||
| 97 | if (len != 0) | ||
| 98 | { | ||
| 99 | i=ASN1_R_NULL_IS_WRONG_LENGTH; | ||
| 100 | goto err; | ||
| 101 | } | ||
| 102 | ret=(ASN1_NULL *)1; | ||
| 103 | if (a != NULL) (*a)=ret; | ||
| 104 | *pp=p; | ||
| 105 | return(ret); | ||
| 106 | err: | ||
| 107 | ASN1err(ASN1_F_D2I_ASN1_NULL,i); | ||
| 108 | return(ret); | ||
| 109 | } | ||
| 110 | |||
| 111 | ASN1_NULL *ASN1_NULL_new(void) | ||
| 112 | { | ||
| 113 | return (ASN1_NULL *)1; | ||
| 114 | } | ||
| 115 | |||
| 116 | void ASN1_NULL_free(ASN1_NULL *a) | ||
| 117 | { | ||
| 118 | return; | ||
| 119 | } | ||
diff --git a/src/lib/libcrypto/asn1/a_vis.c b/src/lib/libcrypto/asn1/a_vis.c deleted file mode 100644 index 5cfc080bec..0000000000 --- a/src/lib/libcrypto/asn1/a_vis.c +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | /* crypto/asn1/a_vis.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1.h> | ||
| 62 | |||
| 63 | ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void) | ||
| 64 | { return M_ASN1_VISIBLESTRING_new(); } | ||
| 65 | |||
| 66 | void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *x) | ||
| 67 | { M_ASN1_VISIBLESTRING_free(x); } | ||
| 68 | |||
| 69 | int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **pp) | ||
| 70 | { | ||
| 71 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | ||
| 72 | V_ASN1_VISIBLESTRING,V_ASN1_UNIVERSAL)); | ||
| 73 | } | ||
| 74 | |||
| 75 | ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a, | ||
| 76 | unsigned char **pp, long length) | ||
| 77 | { | ||
| 78 | ASN1_VISIBLESTRING *ret=NULL; | ||
| 79 | |||
| 80 | ret=(ASN1_VISIBLESTRING *)d2i_ASN1_bytes((ASN1_STRING **)a, | ||
| 81 | pp,length,V_ASN1_VISIBLESTRING,V_ASN1_UNIVERSAL); | ||
| 82 | if (ret == NULL) | ||
| 83 | { | ||
| 84 | ASN1err(ASN1_F_D2I_ASN1_VISIBLESTRING,ERR_R_NESTED_ASN1_ERROR); | ||
| 85 | return(NULL); | ||
| 86 | } | ||
| 87 | return(ret); | ||
| 88 | } | ||
| 89 | |||
diff --git a/src/lib/libcrypto/asn1/d2i_dhp.c b/src/lib/libcrypto/asn1/d2i_dhp.c deleted file mode 100644 index 635ae829db..0000000000 --- a/src/lib/libcrypto/asn1/d2i_dhp.c +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_dhp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DH | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dh.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | DH *d2i_DHparams(DH **a, unsigned char **pp, long length) | ||
| 68 | { | ||
| 69 | int i=ERR_R_NESTED_ASN1_ERROR; | ||
| 70 | ASN1_INTEGER *bs=NULL; | ||
| 71 | long v=0; | ||
| 72 | M_ASN1_D2I_vars(a,DH *,DH_new); | ||
| 73 | |||
| 74 | M_ASN1_D2I_Init(); | ||
| 75 | M_ASN1_D2I_start_sequence(); | ||
| 76 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 77 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 78 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 79 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 80 | |||
| 81 | if (!M_ASN1_D2I_end_sequence()) | ||
| 82 | { | ||
| 83 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 84 | for (i=0; i<bs->length; i++) | ||
| 85 | v=(v<<8)|(bs->data[i]); | ||
| 86 | ret->length=(int)v; | ||
| 87 | } | ||
| 88 | |||
| 89 | M_ASN1_BIT_STRING_free(bs); | ||
| 90 | |||
| 91 | M_ASN1_D2I_Finish_2(a); | ||
| 92 | |||
| 93 | err_bn: | ||
| 94 | i=ERR_R_BN_LIB; | ||
| 95 | err: | ||
| 96 | ASN1err(ASN1_F_D2I_DHPARAMS,i); | ||
| 97 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DH_free(ret); | ||
| 98 | if (bs != NULL) M_ASN1_BIT_STRING_free(bs); | ||
| 99 | return(NULL); | ||
| 100 | } | ||
| 101 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/d2i_dsap.c b/src/lib/libcrypto/asn1/d2i_dsap.c deleted file mode 100644 index 9d4dea6145..0000000000 --- a/src/lib/libcrypto/asn1/d2i_dsap.c +++ /dev/null | |||
| @@ -1,98 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_dsap.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | #ifndef NO_NEG_PUBKEY_BUG | ||
| 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | ||
| 69 | #endif | ||
| 70 | |||
| 71 | DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length) | ||
| 72 | { | ||
| 73 | int i=ERR_R_NESTED_ASN1_ERROR; | ||
| 74 | ASN1_INTEGER *bs=NULL; | ||
| 75 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 76 | |||
| 77 | M_ASN1_D2I_Init(); | ||
| 78 | M_ASN1_D2I_start_sequence(); | ||
| 79 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 80 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 81 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 82 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 83 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 84 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 85 | |||
| 86 | M_ASN1_BIT_STRING_free(bs); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Finish_2(a); | ||
| 89 | |||
| 90 | err_bn: | ||
| 91 | i=ERR_R_BN_LIB; | ||
| 92 | err: | ||
| 93 | ASN1err(ASN1_F_D2I_DSAPARAMS,i); | ||
| 94 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 95 | if (bs != NULL) M_ASN1_BIT_STRING_free(bs); | ||
| 96 | return(NULL); | ||
| 97 | } | ||
| 98 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/d2i_r_pr.c b/src/lib/libcrypto/asn1/d2i_r_pr.c deleted file mode 100644 index 6c8a45f821..0000000000 --- a/src/lib/libcrypto/asn1/d2i_r_pr.c +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_r_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | static ASN1_METHOD method={ | ||
| 68 | (int (*)()) i2d_RSAPrivateKey, | ||
| 69 | (char *(*)())d2i_RSAPrivateKey, | ||
| 70 | (char *(*)())RSA_new, | ||
| 71 | (void (*)()) RSA_free}; | ||
| 72 | |||
| 73 | ASN1_METHOD *RSAPrivateKey_asn1_meth(void) | ||
| 74 | { | ||
| 75 | return(&method); | ||
| 76 | } | ||
| 77 | |||
| 78 | RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length) | ||
| 79 | { | ||
| 80 | int i=ASN1_R_PARSING; | ||
| 81 | ASN1_INTEGER *bs=NULL; | ||
| 82 | M_ASN1_D2I_vars(a,RSA *,RSA_new); | ||
| 83 | |||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 87 | if (bs->length == 0) | ||
| 88 | ret->version=0; | ||
| 89 | else ret->version=bs->data[0]; | ||
| 90 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 91 | if ((ret->n=BN_bin2bn(bs->data,bs->length,ret->n)) == NULL) goto err_bn; | ||
| 92 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 93 | if ((ret->e=BN_bin2bn(bs->data,bs->length,ret->e)) == NULL) goto err_bn; | ||
| 94 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 95 | if ((ret->d=BN_bin2bn(bs->data,bs->length,ret->d)) == NULL) goto err_bn; | ||
| 96 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 97 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 98 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 99 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 100 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 101 | if ((ret->dmp1=BN_bin2bn(bs->data,bs->length,ret->dmp1)) == NULL) | ||
| 102 | goto err_bn; | ||
| 103 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 104 | if ((ret->dmq1=BN_bin2bn(bs->data,bs->length,ret->dmq1)) == NULL) | ||
| 105 | goto err_bn; | ||
| 106 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 107 | if ((ret->iqmp=BN_bin2bn(bs->data,bs->length,ret->iqmp)) == NULL) | ||
| 108 | goto err_bn; | ||
| 109 | |||
| 110 | M_ASN1_INTEGER_free(bs); | ||
| 111 | |||
| 112 | M_ASN1_D2I_Finish_2(a); | ||
| 113 | err_bn: | ||
| 114 | i=ERR_R_BN_LIB; | ||
| 115 | err: | ||
| 116 | ASN1err(ASN1_F_D2I_RSAPRIVATEKEY,i); | ||
| 117 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) RSA_free(ret); | ||
| 118 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 119 | |||
| 120 | return(NULL); | ||
| 121 | } | ||
| 122 | #else /* !NO_RSA */ | ||
| 123 | |||
| 124 | # if PEDANTIC | ||
| 125 | static void *dummy=&dummy; | ||
| 126 | # endif | ||
| 127 | |||
| 128 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/d2i_r_pu.c b/src/lib/libcrypto/asn1/d2i_r_pu.c deleted file mode 100644 index 9e5d41cf53..0000000000 --- a/src/lib/libcrypto/asn1/d2i_r_pu.c +++ /dev/null | |||
| @@ -1,103 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_r_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | #ifndef NO_NEG_PUBKEY_BUG | ||
| 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | ||
| 69 | #endif | ||
| 70 | |||
| 71 | RSA *d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length) | ||
| 72 | { | ||
| 73 | int i=ASN1_R_PARSING; | ||
| 74 | ASN1_INTEGER *bs=NULL; | ||
| 75 | M_ASN1_D2I_vars(a,RSA *,RSA_new); | ||
| 76 | |||
| 77 | M_ASN1_D2I_Init(); | ||
| 78 | M_ASN1_D2I_start_sequence(); | ||
| 79 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 80 | if ((ret->n=BN_bin2bn(bs->data,bs->length,ret->n)) == NULL) goto err_bn; | ||
| 81 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 82 | if ((ret->e=BN_bin2bn(bs->data,bs->length,ret->e)) == NULL) goto err_bn; | ||
| 83 | |||
| 84 | M_ASN1_INTEGER_free(bs); | ||
| 85 | bs=NULL; | ||
| 86 | |||
| 87 | M_ASN1_D2I_Finish_2(a); | ||
| 88 | |||
| 89 | err_bn: | ||
| 90 | i=ERR_R_BN_LIB; | ||
| 91 | err: | ||
| 92 | ASN1err(ASN1_F_D2I_RSAPUBLICKEY,i); | ||
| 93 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) RSA_free(ret); | ||
| 94 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 95 | return(NULL); | ||
| 96 | } | ||
| 97 | #else /* !NO_RSA */ | ||
| 98 | |||
| 99 | # if PEDANTIC | ||
| 100 | static void *dummy=&dummy; | ||
| 101 | # endif | ||
| 102 | |||
| 103 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/d2i_s_pr.c b/src/lib/libcrypto/asn1/d2i_s_pr.c deleted file mode 100644 index 55d5802d70..0000000000 --- a/src/lib/libcrypto/asn1/d2i_s_pr.c +++ /dev/null | |||
| @@ -1,106 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_s_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ | ||
| 60 | |||
| 61 | #ifndef NO_DSA | ||
| 62 | #include <stdio.h> | ||
| 63 | #include "cryptlib.h" | ||
| 64 | #include <openssl/bn.h> | ||
| 65 | #include <openssl/dsa.h> | ||
| 66 | #include <openssl/objects.h> | ||
| 67 | #include <openssl/asn1_mac.h> | ||
| 68 | |||
| 69 | DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length) | ||
| 70 | { | ||
| 71 | int i=ASN1_R_PARSING; | ||
| 72 | ASN1_INTEGER *bs=NULL; | ||
| 73 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 74 | |||
| 75 | M_ASN1_D2I_Init(); | ||
| 76 | M_ASN1_D2I_start_sequence(); | ||
| 77 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 78 | if (bs->length == 0) | ||
| 79 | ret->version=0; | ||
| 80 | else ret->version=bs->data[0]; | ||
| 81 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 82 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 83 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 84 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 85 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 86 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 87 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 88 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 89 | == NULL) goto err_bn; | ||
| 90 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 91 | if ((ret->priv_key=BN_bin2bn(bs->data,bs->length,ret->priv_key)) | ||
| 92 | == NULL) goto err_bn; | ||
| 93 | |||
| 94 | M_ASN1_INTEGER_free(bs); | ||
| 95 | bs = NULL; | ||
| 96 | |||
| 97 | M_ASN1_D2I_Finish_2(a); | ||
| 98 | err_bn: | ||
| 99 | i=ERR_R_BN_LIB; | ||
| 100 | err: | ||
| 101 | ASN1err(ASN1_F_D2I_DSAPRIVATEKEY,i); | ||
| 102 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 103 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 104 | return(NULL); | ||
| 105 | } | ||
| 106 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/d2i_s_pu.c b/src/lib/libcrypto/asn1/d2i_s_pu.c deleted file mode 100644 index 0b7d2fafcc..0000000000 --- a/src/lib/libcrypto/asn1/d2i_s_pu.c +++ /dev/null | |||
| @@ -1,121 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_s_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ | ||
| 60 | |||
| 61 | #ifndef NO_DSA | ||
| 62 | #include <stdio.h> | ||
| 63 | #include "cryptlib.h" | ||
| 64 | #include <openssl/bn.h> | ||
| 65 | #include <openssl/dsa.h> | ||
| 66 | #include <openssl/objects.h> | ||
| 67 | #include <openssl/asn1_mac.h> | ||
| 68 | |||
| 69 | #ifndef NO_NEG_PUBKEY_BUG | ||
| 70 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | ||
| 71 | #endif | ||
| 72 | |||
| 73 | DSA *d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length) | ||
| 74 | { | ||
| 75 | int i=ASN1_R_PARSING; | ||
| 76 | ASN1_INTEGER *bs=NULL; | ||
| 77 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 78 | |||
| 79 | M_ASN1_D2I_Init(); | ||
| 80 | if ((length != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) | ||
| 81 | == (V_ASN1_UNIVERSAL|(V_ASN1_INTEGER)))) | ||
| 82 | { | ||
| 83 | c.slen=length; | ||
| 84 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 85 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 86 | == NULL) | ||
| 87 | goto err_bn; | ||
| 88 | ret->write_params=0; | ||
| 89 | } | ||
| 90 | else | ||
| 91 | { | ||
| 92 | M_ASN1_D2I_start_sequence(); | ||
| 93 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 94 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 95 | == NULL) | ||
| 96 | goto err_bn; | ||
| 97 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 98 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) | ||
| 99 | goto err_bn; | ||
| 100 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 101 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) | ||
| 102 | goto err_bn; | ||
| 103 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 104 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) | ||
| 105 | goto err_bn; | ||
| 106 | |||
| 107 | ret->write_params=1; | ||
| 108 | } | ||
| 109 | |||
| 110 | M_ASN1_INTEGER_free(bs); | ||
| 111 | bs=NULL; | ||
| 112 | M_ASN1_D2I_Finish_2(a); | ||
| 113 | err_bn: | ||
| 114 | i=ERR_R_BN_LIB; | ||
| 115 | err: | ||
| 116 | ASN1err(ASN1_F_D2I_DSAPUBLICKEY,i); | ||
| 117 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 118 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 119 | return(NULL); | ||
| 120 | } | ||
| 121 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/i2d_dhp.c b/src/lib/libcrypto/asn1/i2d_dhp.c deleted file mode 100644 index b1de17fe07..0000000000 --- a/src/lib/libcrypto/asn1/i2d_dhp.c +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_dhp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DH | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/asn1_mac.h> | ||
| 64 | #include <openssl/dh.h> | ||
| 65 | |||
| 66 | int i2d_DHparams(DH *a, unsigned char **pp) | ||
| 67 | { | ||
| 68 | BIGNUM *num[3]; | ||
| 69 | ASN1_INTEGER bs; | ||
| 70 | unsigned int j,i,tot=0,len,max=0; | ||
| 71 | int t,ret= -1; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | num[0]=a->p; | ||
| 76 | num[1]=a->g; | ||
| 77 | if (a->length != 0) | ||
| 78 | { | ||
| 79 | if ((num[2]=BN_new()) == NULL) goto err; | ||
| 80 | if (!BN_set_word(num[2],a->length)) goto err; | ||
| 81 | } | ||
| 82 | else | ||
| 83 | num[2]=NULL; | ||
| 84 | |||
| 85 | for (i=0; i<3; i++) | ||
| 86 | { | ||
| 87 | if (num[i] == NULL) continue; | ||
| 88 | j=BN_num_bits(num[i]); | ||
| 89 | len=((j == 0)?0:((j/8)+1)); | ||
| 90 | if (len > max) max=len; | ||
| 91 | len=ASN1_object_size(0,len, | ||
| 92 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 93 | tot+=len; | ||
| 94 | } | ||
| 95 | |||
| 96 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 97 | if (pp == NULL) | ||
| 98 | { | ||
| 99 | if (num[2] != NULL) | ||
| 100 | BN_free(num[2]); | ||
| 101 | return(t); | ||
| 102 | } | ||
| 103 | |||
| 104 | p= *pp; | ||
| 105 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 106 | |||
| 107 | bs.type=V_ASN1_INTEGER; | ||
| 108 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 109 | if (bs.data == NULL) | ||
| 110 | { | ||
| 111 | ASN1err(ASN1_F_I2D_DHPARAMS,ERR_R_MALLOC_FAILURE); | ||
| 112 | goto err; | ||
| 113 | } | ||
| 114 | |||
| 115 | for (i=0; i<3; i++) | ||
| 116 | { | ||
| 117 | if (num[i] == NULL) continue; | ||
| 118 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 119 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 120 | } | ||
| 121 | OPENSSL_free(bs.data); | ||
| 122 | ret=t; | ||
| 123 | err: | ||
| 124 | if (num[2] != NULL) BN_free(num[2]); | ||
| 125 | *pp=p; | ||
| 126 | return(ret); | ||
| 127 | } | ||
| 128 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/i2d_dsap.c b/src/lib/libcrypto/asn1/i2d_dsap.c deleted file mode 100644 index 157fb43893..0000000000 --- a/src/lib/libcrypto/asn1/i2d_dsap.c +++ /dev/null | |||
| @@ -1,117 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_dsap.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/asn1_mac.h> | ||
| 64 | #include <openssl/dsa.h> | ||
| 65 | |||
| 66 | int i2d_DSAparams(DSA *a, unsigned char **pp) | ||
| 67 | { | ||
| 68 | BIGNUM *num[3]; | ||
| 69 | ASN1_INTEGER bs; | ||
| 70 | unsigned int j,i,tot=0,len,max=0; | ||
| 71 | int t,ret= -1; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | num[0]=a->p; | ||
| 76 | num[1]=a->q; | ||
| 77 | num[2]=a->g; | ||
| 78 | |||
| 79 | for (i=0; i<3; i++) | ||
| 80 | { | ||
| 81 | if (num[i] == NULL) continue; | ||
| 82 | j=BN_num_bits(num[i]); | ||
| 83 | len=((j == 0)?0:((j/8)+1)); | ||
| 84 | if (len > max) max=len; | ||
| 85 | len=ASN1_object_size(0,len, | ||
| 86 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 87 | tot+=len; | ||
| 88 | } | ||
| 89 | |||
| 90 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 91 | if (pp == NULL) return(t); | ||
| 92 | |||
| 93 | p= *pp; | ||
| 94 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 95 | |||
| 96 | bs.type=V_ASN1_INTEGER; | ||
| 97 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 98 | if (bs.data == NULL) | ||
| 99 | { | ||
| 100 | ASN1err(ASN1_F_I2D_DSAPARAMS,ERR_R_MALLOC_FAILURE); | ||
| 101 | goto err; | ||
| 102 | } | ||
| 103 | |||
| 104 | for (i=0; i<3; i++) | ||
| 105 | { | ||
| 106 | if (num[i] == NULL) continue; | ||
| 107 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 108 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 109 | } | ||
| 110 | OPENSSL_free(bs.data); | ||
| 111 | ret=t; | ||
| 112 | err: | ||
| 113 | *pp=p; | ||
| 114 | return(ret); | ||
| 115 | } | ||
| 116 | #endif | ||
| 117 | |||
diff --git a/src/lib/libcrypto/asn1/i2d_r_pr.c b/src/lib/libcrypto/asn1/i2d_r_pr.c deleted file mode 100644 index 88b1aac989..0000000000 --- a/src/lib/libcrypto/asn1/i2d_r_pr.c +++ /dev/null | |||
| @@ -1,133 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_r_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_RSAPrivateKey(RSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[9]; | ||
| 70 | unsigned char data[1]; | ||
| 71 | ASN1_INTEGER bs; | ||
| 72 | unsigned int j,i,tot,t,len,max=0; | ||
| 73 | unsigned char *p; | ||
| 74 | |||
| 75 | if (a == NULL) return(0); | ||
| 76 | |||
| 77 | num[1]=a->n; | ||
| 78 | num[2]=a->e; | ||
| 79 | num[3]=a->d; | ||
| 80 | num[4]=a->p; | ||
| 81 | num[5]=a->q; | ||
| 82 | num[6]=a->dmp1; | ||
| 83 | num[7]=a->dmq1; | ||
| 84 | num[8]=a->iqmp; | ||
| 85 | |||
| 86 | bs.length=1; | ||
| 87 | bs.data=data; | ||
| 88 | bs.type=V_ASN1_INTEGER; | ||
| 89 | data[0]=a->version&0x7f; | ||
| 90 | |||
| 91 | tot=i2d_ASN1_INTEGER(&(bs),NULL); | ||
| 92 | for (i=1; i<9; i++) | ||
| 93 | { | ||
| 94 | j=BN_num_bits(num[i]); | ||
| 95 | len=((j == 0)?0:((j/8)+1)); | ||
| 96 | if (len > max) max=len; | ||
| 97 | len=ASN1_object_size(0,len, | ||
| 98 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 99 | tot+=len; | ||
| 100 | } | ||
| 101 | |||
| 102 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 103 | if (pp == NULL) return(t); | ||
| 104 | |||
| 105 | p= *pp; | ||
| 106 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 107 | |||
| 108 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 109 | |||
| 110 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 111 | if (bs.data == NULL) | ||
| 112 | { | ||
| 113 | ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | ||
| 114 | return(-1); | ||
| 115 | } | ||
| 116 | |||
| 117 | for (i=1; i<9; i++) | ||
| 118 | { | ||
| 119 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 120 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 121 | } | ||
| 122 | OPENSSL_free(bs.data); | ||
| 123 | *pp=p; | ||
| 124 | return(t); | ||
| 125 | } | ||
| 126 | #else /* !NO_RSA */ | ||
| 127 | |||
| 128 | # if PEDANTIC | ||
| 129 | static void *dummy=&dummy; | ||
| 130 | # endif | ||
| 131 | |||
| 132 | #endif | ||
| 133 | |||
diff --git a/src/lib/libcrypto/asn1/i2d_r_pu.c b/src/lib/libcrypto/asn1/i2d_r_pu.c deleted file mode 100644 index 8178c2c3b3..0000000000 --- a/src/lib/libcrypto/asn1/i2d_r_pu.c +++ /dev/null | |||
| @@ -1,118 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_r_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_RSAPublicKey(RSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[2]; | ||
| 70 | ASN1_INTEGER bs; | ||
| 71 | unsigned int j,i,tot=0,len,max=0,t; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | |||
| 76 | num[0]=a->n; | ||
| 77 | num[1]=a->e; | ||
| 78 | |||
| 79 | for (i=0; i<2; i++) | ||
| 80 | { | ||
| 81 | j=BN_num_bits(num[i]); | ||
| 82 | len=((j == 0)?0:((j/8)+1)); | ||
| 83 | if (len > max) max=len; | ||
| 84 | len=ASN1_object_size(0,len, | ||
| 85 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 86 | tot+=len; | ||
| 87 | } | ||
| 88 | |||
| 89 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 90 | if (pp == NULL) return(t); | ||
| 91 | |||
| 92 | p= *pp; | ||
| 93 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 94 | |||
| 95 | bs.type=V_ASN1_INTEGER; | ||
| 96 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 97 | if (bs.data == NULL) | ||
| 98 | { | ||
| 99 | ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | ||
| 100 | return(-1); | ||
| 101 | } | ||
| 102 | |||
| 103 | for (i=0; i<2; i++) | ||
| 104 | { | ||
| 105 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 106 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 107 | } | ||
| 108 | OPENSSL_free(bs.data); | ||
| 109 | *pp=p; | ||
| 110 | return(t); | ||
| 111 | } | ||
| 112 | #else /* !NO_RSA */ | ||
| 113 | |||
| 114 | # if PEDANTIC | ||
| 115 | static void *dummy=&dummy; | ||
| 116 | # endif | ||
| 117 | |||
| 118 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/i2d_s_pr.c b/src/lib/libcrypto/asn1/i2d_s_pr.c deleted file mode 100644 index 9922952ad7..0000000000 --- a/src/lib/libcrypto/asn1/i2d_s_pr.c +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_s_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_DSAPrivateKey(DSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[6]; | ||
| 70 | unsigned char data[1]; | ||
| 71 | ASN1_INTEGER bs; | ||
| 72 | unsigned int j,i,tot,t,len,max=0; | ||
| 73 | unsigned char *p; | ||
| 74 | |||
| 75 | if (a == NULL) return(0); | ||
| 76 | |||
| 77 | num[1]=a->p; | ||
| 78 | num[2]=a->q; | ||
| 79 | num[3]=a->g; | ||
| 80 | num[4]=a->pub_key; | ||
| 81 | num[5]=a->priv_key; | ||
| 82 | |||
| 83 | bs.length=1; | ||
| 84 | bs.data=data; | ||
| 85 | bs.type=V_ASN1_INTEGER; | ||
| 86 | data[0]=a->version&0x7f; | ||
| 87 | |||
| 88 | tot=i2d_ASN1_INTEGER(&(bs),NULL); | ||
| 89 | for (i=1; i<6; i++) | ||
| 90 | { | ||
| 91 | j=BN_num_bits(num[i]); | ||
| 92 | len=((j == 0)?0:((j/8)+1)); | ||
| 93 | if (len > max) max=len; | ||
| 94 | len=ASN1_object_size(0,len, | ||
| 95 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 96 | tot+=len; | ||
| 97 | } | ||
| 98 | |||
| 99 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 100 | if (pp == NULL) return(t); | ||
| 101 | |||
| 102 | p= *pp; | ||
| 103 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 104 | |||
| 105 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 106 | |||
| 107 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 108 | if (bs.data == NULL) | ||
| 109 | { | ||
| 110 | ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | ||
| 111 | return(-1); | ||
| 112 | } | ||
| 113 | |||
| 114 | for (i=1; i<6; i++) | ||
| 115 | { | ||
| 116 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 117 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 118 | } | ||
| 119 | OPENSSL_free(bs.data); | ||
| 120 | *pp=p; | ||
| 121 | return(t); | ||
| 122 | } | ||
| 123 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/i2d_s_pu.c b/src/lib/libcrypto/asn1/i2d_s_pu.c deleted file mode 100644 index e6014b82a8..0000000000 --- a/src/lib/libcrypto/asn1/i2d_s_pu.c +++ /dev/null | |||
| @@ -1,129 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_s_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_DSAPublicKey(DSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[4]; | ||
| 70 | ASN1_INTEGER bs; | ||
| 71 | unsigned int j,i,tot=0,len,max=0,t=0,all,n=1; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | |||
| 76 | all=a->write_params; | ||
| 77 | |||
| 78 | num[0]=a->pub_key; | ||
| 79 | if (all) | ||
| 80 | { | ||
| 81 | num[1]=a->p; | ||
| 82 | num[2]=a->q; | ||
| 83 | num[3]=a->g; | ||
| 84 | n=4; | ||
| 85 | } | ||
| 86 | |||
| 87 | for (i=0; i<n; i++) | ||
| 88 | { | ||
| 89 | j=BN_num_bits(num[i]); | ||
| 90 | len=((j == 0)?0:((j/8)+1)); | ||
| 91 | if (len > max) max=len; | ||
| 92 | len=ASN1_object_size(0,len, | ||
| 93 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 94 | tot+=len; | ||
| 95 | } | ||
| 96 | |||
| 97 | if (all) | ||
| 98 | { | ||
| 99 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 100 | if (pp == NULL) return(t); | ||
| 101 | } | ||
| 102 | else | ||
| 103 | { | ||
| 104 | if (pp == NULL) return(tot); | ||
| 105 | } | ||
| 106 | |||
| 107 | p= *pp; | ||
| 108 | if (all) | ||
| 109 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 110 | |||
| 111 | bs.type=V_ASN1_INTEGER; | ||
| 112 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 113 | if (bs.data == NULL) | ||
| 114 | { | ||
| 115 | ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | ||
| 116 | return(-1); | ||
| 117 | } | ||
| 118 | |||
| 119 | for (i=0; i<n; i++) | ||
| 120 | { | ||
| 121 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 122 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 123 | } | ||
| 124 | OPENSSL_free(bs.data); | ||
| 125 | *pp=p; | ||
| 126 | if(all) return(t); | ||
| 127 | else return(tot); | ||
| 128 | } | ||
| 129 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/p7_dgst.c b/src/lib/libcrypto/asn1/p7_dgst.c deleted file mode 100644 index c170244616..0000000000 --- a/src/lib/libcrypto/asn1/p7_dgst.c +++ /dev/null | |||
| @@ -1,121 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_dgst.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->md,i2d_X509_ALGOR); | ||
| 70 | M_ASN1_I2D_len(a->contents,i2d_PKCS7); | ||
| 71 | M_ASN1_I2D_len(a->digest,i2d_ASN1_OCTET_STRING); | ||
| 72 | |||
| 73 | M_ASN1_I2D_seq_total(); | ||
| 74 | |||
| 75 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_put(a->md,i2d_X509_ALGOR); | ||
| 77 | M_ASN1_I2D_put(a->contents,i2d_PKCS7); | ||
| 78 | M_ASN1_I2D_put(a->digest,i2d_ASN1_OCTET_STRING); | ||
| 79 | |||
| 80 | M_ASN1_I2D_finish(); | ||
| 81 | } | ||
| 82 | |||
| 83 | PKCS7_DIGEST *d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, unsigned char **pp, | ||
| 84 | long length) | ||
| 85 | { | ||
| 86 | M_ASN1_D2I_vars(a,PKCS7_DIGEST *,PKCS7_DIGEST_new); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Init(); | ||
| 89 | M_ASN1_D2I_start_sequence(); | ||
| 90 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 91 | M_ASN1_D2I_get(ret->md,d2i_X509_ALGOR); | ||
| 92 | M_ASN1_D2I_get(ret->contents,d2i_PKCS7); | ||
| 93 | M_ASN1_D2I_get(ret->digest,d2i_ASN1_OCTET_STRING); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Finish(a,PKCS7_DIGEST_free,ASN1_F_D2I_PKCS7_DIGEST); | ||
| 96 | } | ||
| 97 | |||
| 98 | PKCS7_DIGEST *PKCS7_DIGEST_new(void) | ||
| 99 | { | ||
| 100 | PKCS7_DIGEST *ret=NULL; | ||
| 101 | ASN1_CTX c; | ||
| 102 | |||
| 103 | M_ASN1_New_Malloc(ret,PKCS7_DIGEST); | ||
| 104 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 105 | M_ASN1_New(ret->md,X509_ALGOR_new); | ||
| 106 | M_ASN1_New(ret->contents,PKCS7_new); | ||
| 107 | M_ASN1_New(ret->digest,M_ASN1_OCTET_STRING_new); | ||
| 108 | return(ret); | ||
| 109 | M_ASN1_New_Error(ASN1_F_PKCS7_DIGEST_NEW); | ||
| 110 | } | ||
| 111 | |||
| 112 | void PKCS7_DIGEST_free(PKCS7_DIGEST *a) | ||
| 113 | { | ||
| 114 | if (a == NULL) return; | ||
| 115 | M_ASN1_INTEGER_free(a->version); | ||
| 116 | X509_ALGOR_free(a->md); | ||
| 117 | PKCS7_free(a->contents); | ||
| 118 | M_ASN1_OCTET_STRING_free(a->digest); | ||
| 119 | OPENSSL_free(a); | ||
| 120 | } | ||
| 121 | |||
diff --git a/src/lib/libcrypto/asn1/p7_enc.c b/src/lib/libcrypto/asn1/p7_enc.c deleted file mode 100644 index 38ccafbdb0..0000000000 --- a/src/lib/libcrypto/asn1/p7_enc.c +++ /dev/null | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_enc.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 70 | |||
| 71 | M_ASN1_I2D_seq_total(); | ||
| 72 | |||
| 73 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 74 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 75 | |||
| 76 | M_ASN1_I2D_finish(); | ||
| 77 | } | ||
| 78 | |||
| 79 | PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, unsigned char **pp, | ||
| 80 | long length) | ||
| 81 | { | ||
| 82 | M_ASN1_D2I_vars(a,PKCS7_ENCRYPT *,PKCS7_ENCRYPT_new); | ||
| 83 | |||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 87 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 88 | |||
| 89 | M_ASN1_D2I_Finish(a,PKCS7_ENCRYPT_free,ASN1_F_D2I_PKCS7_ENCRYPT); | ||
| 90 | } | ||
| 91 | |||
| 92 | PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void) | ||
| 93 | { | ||
| 94 | PKCS7_ENCRYPT *ret=NULL; | ||
| 95 | ASN1_CTX c; | ||
| 96 | |||
| 97 | M_ASN1_New_Malloc(ret,PKCS7_ENCRYPT); | ||
| 98 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 99 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 100 | return(ret); | ||
| 101 | M_ASN1_New_Error(ASN1_F_PKCS7_ENCRYPT_NEW); | ||
| 102 | } | ||
| 103 | |||
| 104 | void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a) | ||
| 105 | { | ||
| 106 | if (a == NULL) return; | ||
| 107 | M_ASN1_INTEGER_free(a->version); | ||
| 108 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 109 | OPENSSL_free(a); | ||
| 110 | } | ||
| 111 | |||
diff --git a/src/lib/libcrypto/asn1/p7_enc_c.c b/src/lib/libcrypto/asn1/p7_enc_c.c deleted file mode 100644 index 031178ab52..0000000000 --- a/src/lib/libcrypto/asn1/p7_enc_c.c +++ /dev/null | |||
| @@ -1,120 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_enc_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->content_type,i2d_ASN1_OBJECT); | ||
| 69 | M_ASN1_I2D_len(a->algorithm,i2d_X509_ALGOR); | ||
| 70 | M_ASN1_I2D_len_IMP_opt(a->enc_data,i2d_ASN1_OCTET_STRING); | ||
| 71 | |||
| 72 | M_ASN1_I2D_seq_total(); | ||
| 73 | |||
| 74 | M_ASN1_I2D_put(a->content_type,i2d_ASN1_OBJECT); | ||
| 75 | M_ASN1_I2D_put(a->algorithm,i2d_X509_ALGOR); | ||
| 76 | M_ASN1_I2D_put_IMP_opt(a->enc_data,i2d_ASN1_OCTET_STRING,0); | ||
| 77 | |||
| 78 | M_ASN1_I2D_finish(); | ||
| 79 | } | ||
| 80 | |||
| 81 | PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a, | ||
| 82 | unsigned char **pp, long length) | ||
| 83 | { | ||
| 84 | M_ASN1_D2I_vars(a,PKCS7_ENC_CONTENT *,PKCS7_ENC_CONTENT_new); | ||
| 85 | |||
| 86 | M_ASN1_D2I_Init(); | ||
| 87 | M_ASN1_D2I_start_sequence(); | ||
| 88 | M_ASN1_D2I_get(ret->content_type,d2i_ASN1_OBJECT); | ||
| 89 | M_ASN1_D2I_get(ret->algorithm,d2i_X509_ALGOR); | ||
| 90 | M_ASN1_D2I_get_IMP_opt(ret->enc_data,d2i_ASN1_OCTET_STRING,0, | ||
| 91 | V_ASN1_OCTET_STRING); | ||
| 92 | |||
| 93 | M_ASN1_D2I_Finish(a,PKCS7_ENC_CONTENT_free, | ||
| 94 | ASN1_F_D2I_PKCS7_ENC_CONTENT); | ||
| 95 | } | ||
| 96 | |||
| 97 | PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void) | ||
| 98 | { | ||
| 99 | PKCS7_ENC_CONTENT *ret=NULL; | ||
| 100 | ASN1_CTX c; | ||
| 101 | |||
| 102 | M_ASN1_New_Malloc(ret,PKCS7_ENC_CONTENT); | ||
| 103 | /* M_ASN1_New(ret->content_type,ASN1_OBJECT_new); */ | ||
| 104 | /* We will almost always want this: so make it the default */ | ||
| 105 | ret->content_type=OBJ_nid2obj(NID_pkcs7_data); | ||
| 106 | M_ASN1_New(ret->algorithm,X509_ALGOR_new); | ||
| 107 | ret->enc_data=NULL; | ||
| 108 | return(ret); | ||
| 109 | M_ASN1_New_Error(ASN1_F_PKCS7_ENC_CONTENT_NEW); | ||
| 110 | } | ||
| 111 | |||
| 112 | void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a) | ||
| 113 | { | ||
| 114 | if (a == NULL) return; | ||
| 115 | ASN1_OBJECT_free(a->content_type); | ||
| 116 | X509_ALGOR_free(a->algorithm); | ||
| 117 | M_ASN1_OCTET_STRING_free(a->enc_data); | ||
| 118 | OPENSSL_free(a); | ||
| 119 | } | ||
| 120 | |||
diff --git a/src/lib/libcrypto/asn1/p7_evp.c b/src/lib/libcrypto/asn1/p7_evp.c deleted file mode 100644 index 60be3e5f66..0000000000 --- a/src/lib/libcrypto/asn1/p7_evp.c +++ /dev/null | |||
| @@ -1,119 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_evp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 70 | i2d_PKCS7_RECIP_INFO); | ||
| 71 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 72 | |||
| 73 | M_ASN1_I2D_seq_total(); | ||
| 74 | |||
| 75 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_put_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 77 | i2d_PKCS7_RECIP_INFO); | ||
| 78 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 79 | |||
| 80 | M_ASN1_I2D_finish(); | ||
| 81 | } | ||
| 82 | |||
| 83 | PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, unsigned char **pp, | ||
| 84 | long length) | ||
| 85 | { | ||
| 86 | M_ASN1_D2I_vars(a,PKCS7_ENVELOPE *,PKCS7_ENVELOPE_new); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Init(); | ||
| 89 | M_ASN1_D2I_start_sequence(); | ||
| 90 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 91 | M_ASN1_D2I_get_set_type(PKCS7_RECIP_INFO,ret->recipientinfo, | ||
| 92 | d2i_PKCS7_RECIP_INFO,PKCS7_RECIP_INFO_free); | ||
| 93 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Finish(a,PKCS7_ENVELOPE_free,ASN1_F_D2I_PKCS7_ENVELOPE); | ||
| 96 | } | ||
| 97 | |||
| 98 | PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void) | ||
| 99 | { | ||
| 100 | PKCS7_ENVELOPE *ret=NULL; | ||
| 101 | ASN1_CTX c; | ||
| 102 | |||
| 103 | M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE); | ||
| 104 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 105 | M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null); | ||
| 106 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 107 | return(ret); | ||
| 108 | M_ASN1_New_Error(ASN1_F_PKCS7_ENVELOPE_NEW); | ||
| 109 | } | ||
| 110 | |||
| 111 | void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a) | ||
| 112 | { | ||
| 113 | if (a == NULL) return; | ||
| 114 | M_ASN1_INTEGER_free(a->version); | ||
| 115 | sk_PKCS7_RECIP_INFO_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); | ||
| 116 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 117 | OPENSSL_free(a); | ||
| 118 | } | ||
| 119 | |||
diff --git a/src/lib/libcrypto/asn1/p7_i_s.c b/src/lib/libcrypto/asn1/p7_i_s.c deleted file mode 100644 index 4a7260a5c8..0000000000 --- a/src/lib/libcrypto/asn1/p7_i_s.c +++ /dev/null | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_i_s.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a, | ||
| 65 | unsigned char **pp) | ||
| 66 | { | ||
| 67 | M_ASN1_I2D_vars(a); | ||
| 68 | |||
| 69 | M_ASN1_I2D_len(a->issuer,i2d_X509_NAME); | ||
| 70 | M_ASN1_I2D_len(a->serial,i2d_ASN1_INTEGER); | ||
| 71 | |||
| 72 | M_ASN1_I2D_seq_total(); | ||
| 73 | |||
| 74 | M_ASN1_I2D_put(a->issuer,i2d_X509_NAME); | ||
| 75 | M_ASN1_I2D_put(a->serial,i2d_ASN1_INTEGER); | ||
| 76 | |||
| 77 | M_ASN1_I2D_finish(); | ||
| 78 | } | ||
| 79 | |||
| 80 | PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, unsigned char **pp, long length) | ||
| 81 | { | ||
| 82 | M_ASN1_D2I_vars(a,PKCS7_ISSUER_AND_SERIAL *,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 83 | |||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get(ret->issuer,d2i_X509_NAME); | ||
| 87 | M_ASN1_D2I_get(ret->serial,d2i_ASN1_INTEGER); | ||
| 88 | M_ASN1_D2I_Finish(a,PKCS7_ISSUER_AND_SERIAL_free, | ||
| 89 | ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL); | ||
| 90 | } | ||
| 91 | |||
| 92 | PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new(void) | ||
| 93 | { | ||
| 94 | PKCS7_ISSUER_AND_SERIAL *ret=NULL; | ||
| 95 | ASN1_CTX c; | ||
| 96 | |||
| 97 | M_ASN1_New_Malloc(ret,PKCS7_ISSUER_AND_SERIAL); | ||
| 98 | M_ASN1_New(ret->issuer,X509_NAME_new); | ||
| 99 | M_ASN1_New(ret->serial,M_ASN1_INTEGER_new); | ||
| 100 | return(ret); | ||
| 101 | M_ASN1_New_Error(ASN1_F_PKCS7_ISSUER_AND_SERIAL_NEW); | ||
| 102 | } | ||
| 103 | |||
| 104 | void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a) | ||
| 105 | { | ||
| 106 | if (a == NULL) return; | ||
| 107 | X509_NAME_free(a->issuer); | ||
| 108 | M_ASN1_INTEGER_free(a->serial); | ||
| 109 | OPENSSL_free(a); | ||
| 110 | } | ||
| 111 | |||
diff --git a/src/lib/libcrypto/asn1/p7_lib.c b/src/lib/libcrypto/asn1/p7_lib.c deleted file mode 100644 index 8a340b0119..0000000000 --- a/src/lib/libcrypto/asn1/p7_lib.c +++ /dev/null | |||
| @@ -1,393 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_lib.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs7.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | #ifdef PKCS7_INDEFINITE_ENCODING | ||
| 66 | |||
| 67 | int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | M_ASN1_I2D_vars(a); | ||
| 70 | |||
| 71 | if (a->asn1 != NULL) | ||
| 72 | { | ||
| 73 | if (pp == NULL) | ||
| 74 | return((int)a->length); | ||
| 75 | memcpy(*pp,a->asn1,(int)a->length); | ||
| 76 | *pp+=a->length; | ||
| 77 | return((int)a->length); | ||
| 78 | } | ||
| 79 | |||
| 80 | ret+=4; /* sequence, BER header plus '0 0' end padding */ | ||
| 81 | M_ASN1_I2D_len(a->type,i2d_ASN1_OBJECT); | ||
| 82 | if (a->d.ptr != NULL) | ||
| 83 | { | ||
| 84 | ret+=4; /* explicit tag [ 0 ] BER plus '0 0' */ | ||
| 85 | switch (OBJ_obj2nid(a->type)) | ||
| 86 | { | ||
| 87 | case NID_pkcs7_data: | ||
| 88 | M_ASN1_I2D_len(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 89 | break; | ||
| 90 | case NID_pkcs7_signed: | ||
| 91 | M_ASN1_I2D_len(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 92 | break; | ||
| 93 | case NID_pkcs7_enveloped: | ||
| 94 | M_ASN1_I2D_len(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 95 | break; | ||
| 96 | case NID_pkcs7_signedAndEnveloped: | ||
| 97 | M_ASN1_I2D_len(a->d.signed_and_enveloped, | ||
| 98 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 99 | break; | ||
| 100 | case NID_pkcs7_digest: | ||
| 101 | M_ASN1_I2D_len(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 102 | break; | ||
| 103 | case NID_pkcs7_encrypted: | ||
| 104 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 105 | break; | ||
| 106 | default: | ||
| 107 | M_ASN1_I2D_len(a->d.other,i2d_ASN1_TYPE); | ||
| 108 | break; | ||
| 109 | } | ||
| 110 | } | ||
| 111 | r=ret; | ||
| 112 | if (pp == NULL) return(r); | ||
| 113 | p= *pp; | ||
| 114 | M_ASN1_I2D_INF_seq_start(V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 115 | M_ASN1_I2D_put(a->type,i2d_ASN1_OBJECT); | ||
| 116 | |||
| 117 | if (a->d.ptr != NULL) | ||
| 118 | { | ||
| 119 | M_ASN1_I2D_INF_seq_start(0,V_ASN1_CONTEXT_SPECIFIC); | ||
| 120 | switch (OBJ_obj2nid(a->type)) | ||
| 121 | { | ||
| 122 | case NID_pkcs7_data: | ||
| 123 | M_ASN1_I2D_put(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 124 | break; | ||
| 125 | case NID_pkcs7_signed: | ||
| 126 | M_ASN1_I2D_put(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 127 | break; | ||
| 128 | case NID_pkcs7_enveloped: | ||
| 129 | M_ASN1_I2D_put(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 130 | break; | ||
| 131 | case NID_pkcs7_signedAndEnveloped: | ||
| 132 | M_ASN1_I2D_put(a->d.signed_and_enveloped, | ||
| 133 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 134 | break; | ||
| 135 | case NID_pkcs7_digest: | ||
| 136 | M_ASN1_I2D_put(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 137 | break; | ||
| 138 | case NID_pkcs7_encrypted: | ||
| 139 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 140 | break; | ||
| 141 | default: | ||
| 142 | M_ASN1_I2D_put(a->d.other,i2d_ASN1_TYPE); | ||
| 143 | break; | ||
| 144 | } | ||
| 145 | M_ASN1_I2D_INF_seq_end(); | ||
| 146 | } | ||
| 147 | M_ASN1_I2D_INF_seq_end(); | ||
| 148 | M_ASN1_I2D_finish(); | ||
| 149 | } | ||
| 150 | |||
| 151 | #else | ||
| 152 | |||
| 153 | int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | ||
| 154 | { | ||
| 155 | int explen = 0; | ||
| 156 | M_ASN1_I2D_vars(a); | ||
| 157 | |||
| 158 | if (a->asn1 != NULL) | ||
| 159 | { | ||
| 160 | if (pp == NULL) | ||
| 161 | return((int)a->length); | ||
| 162 | memcpy(*pp,a->asn1,(int)a->length); | ||
| 163 | *pp+=a->length; | ||
| 164 | return((int)a->length); | ||
| 165 | } | ||
| 166 | |||
| 167 | M_ASN1_I2D_len(a->type,i2d_ASN1_OBJECT); | ||
| 168 | if (a->d.ptr != NULL) | ||
| 169 | { | ||
| 170 | /* Save current length */ | ||
| 171 | r = ret; | ||
| 172 | switch (OBJ_obj2nid(a->type)) | ||
| 173 | { | ||
| 174 | case NID_pkcs7_data: | ||
| 175 | M_ASN1_I2D_len(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 176 | break; | ||
| 177 | case NID_pkcs7_signed: | ||
| 178 | M_ASN1_I2D_len(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 179 | break; | ||
| 180 | case NID_pkcs7_enveloped: | ||
| 181 | M_ASN1_I2D_len(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 182 | break; | ||
| 183 | case NID_pkcs7_signedAndEnveloped: | ||
| 184 | M_ASN1_I2D_len(a->d.signed_and_enveloped, | ||
| 185 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 186 | break; | ||
| 187 | case NID_pkcs7_digest: | ||
| 188 | M_ASN1_I2D_len(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 189 | break; | ||
| 190 | case NID_pkcs7_encrypted: | ||
| 191 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 192 | break; | ||
| 193 | default: | ||
| 194 | M_ASN1_I2D_len(a->d.other,i2d_ASN1_TYPE); | ||
| 195 | break; | ||
| 196 | } | ||
| 197 | /* Work out explicit tag content size */ | ||
| 198 | explen = ret - r; | ||
| 199 | /* Work out explicit tag size: Note: ASN1_object_size | ||
| 200 | * includes the content length. | ||
| 201 | */ | ||
| 202 | ret = r + ASN1_object_size(1, explen, 0); | ||
| 203 | } | ||
| 204 | |||
| 205 | M_ASN1_I2D_seq_total(); | ||
| 206 | |||
| 207 | M_ASN1_I2D_put(a->type,i2d_ASN1_OBJECT); | ||
| 208 | |||
| 209 | if (a->d.ptr != NULL) | ||
| 210 | { | ||
| 211 | ASN1_put_object(&p, 1, explen, 0, V_ASN1_CONTEXT_SPECIFIC); | ||
| 212 | switch (OBJ_obj2nid(a->type)) | ||
| 213 | { | ||
| 214 | case NID_pkcs7_data: | ||
| 215 | M_ASN1_I2D_put(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 216 | break; | ||
| 217 | case NID_pkcs7_signed: | ||
| 218 | M_ASN1_I2D_put(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 219 | break; | ||
| 220 | case NID_pkcs7_enveloped: | ||
| 221 | M_ASN1_I2D_put(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 222 | break; | ||
| 223 | case NID_pkcs7_signedAndEnveloped: | ||
| 224 | M_ASN1_I2D_put(a->d.signed_and_enveloped, | ||
| 225 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 226 | break; | ||
| 227 | case NID_pkcs7_digest: | ||
| 228 | M_ASN1_I2D_put(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 229 | break; | ||
| 230 | case NID_pkcs7_encrypted: | ||
| 231 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 232 | break; | ||
| 233 | default: | ||
| 234 | M_ASN1_I2D_put(a->d.other,i2d_ASN1_TYPE); | ||
| 235 | break; | ||
| 236 | } | ||
| 237 | } | ||
| 238 | M_ASN1_I2D_finish(); | ||
| 239 | } | ||
| 240 | |||
| 241 | #endif | ||
| 242 | |||
| 243 | PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length) | ||
| 244 | { | ||
| 245 | M_ASN1_D2I_vars(a,PKCS7 *,PKCS7_new); | ||
| 246 | |||
| 247 | if ((a != NULL) && ((*a) != NULL)) | ||
| 248 | { | ||
| 249 | if ((*a)->asn1 != NULL) | ||
| 250 | { | ||
| 251 | OPENSSL_free((*a)->asn1); | ||
| 252 | (*a)->asn1=NULL; | ||
| 253 | } | ||
| 254 | (*a)->length=0; | ||
| 255 | } | ||
| 256 | |||
| 257 | M_ASN1_D2I_Init(); | ||
| 258 | M_ASN1_D2I_start_sequence(); | ||
| 259 | M_ASN1_D2I_get(ret->type,d2i_ASN1_OBJECT); | ||
| 260 | if (!M_ASN1_D2I_end_sequence()) | ||
| 261 | { | ||
| 262 | int Tinf,Ttag,Tclass; | ||
| 263 | long Tlen; | ||
| 264 | |||
| 265 | if (M_ASN1_next != (V_ASN1_CONSTRUCTED| | ||
| 266 | V_ASN1_CONTEXT_SPECIFIC|0)) | ||
| 267 | { | ||
| 268 | c.error=ASN1_R_BAD_PKCS7_CONTENT; | ||
| 269 | c.line=__LINE__; | ||
| 270 | goto err; | ||
| 271 | } | ||
| 272 | |||
| 273 | ret->detached=0; | ||
| 274 | |||
| 275 | c.q=c.p; | ||
| 276 | Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass, | ||
| 277 | (c.inf & 1)?(length+ *pp-c.q):c.slen); | ||
| 278 | if (Tinf & 0x80) { c.line=__LINE__; goto err; } | ||
| 279 | c.slen-=(c.p-c.q); | ||
| 280 | |||
| 281 | switch (OBJ_obj2nid(ret->type)) | ||
| 282 | { | ||
| 283 | case NID_pkcs7_data: | ||
| 284 | M_ASN1_D2I_get(ret->d.data,d2i_ASN1_OCTET_STRING); | ||
| 285 | break; | ||
| 286 | case NID_pkcs7_signed: | ||
| 287 | M_ASN1_D2I_get(ret->d.sign,d2i_PKCS7_SIGNED); | ||
| 288 | if (ret->d.sign->contents->d.ptr == NULL) | ||
| 289 | ret->detached=1; | ||
| 290 | break; | ||
| 291 | case NID_pkcs7_enveloped: | ||
| 292 | M_ASN1_D2I_get(ret->d.enveloped,d2i_PKCS7_ENVELOPE); | ||
| 293 | break; | ||
| 294 | case NID_pkcs7_signedAndEnveloped: | ||
| 295 | M_ASN1_D2I_get(ret->d.signed_and_enveloped, | ||
| 296 | d2i_PKCS7_SIGN_ENVELOPE); | ||
| 297 | break; | ||
| 298 | case NID_pkcs7_digest: | ||
| 299 | M_ASN1_D2I_get(ret->d.digest,d2i_PKCS7_DIGEST); | ||
| 300 | break; | ||
| 301 | case NID_pkcs7_encrypted: | ||
| 302 | M_ASN1_D2I_get(ret->d.encrypted,d2i_PKCS7_ENCRYPT); | ||
| 303 | break; | ||
| 304 | default: | ||
| 305 | M_ASN1_D2I_get(ret->d.other,d2i_ASN1_TYPE); | ||
| 306 | break; | ||
| 307 | } | ||
| 308 | if (Tinf == (1|V_ASN1_CONSTRUCTED)) | ||
| 309 | { | ||
| 310 | c.q=c.p; | ||
| 311 | if (!ASN1_check_infinite_end(&c.p,c.slen)) | ||
| 312 | { | ||
| 313 | c.error=ERR_R_MISSING_ASN1_EOS; | ||
| 314 | c.line=__LINE__; | ||
| 315 | goto err; | ||
| 316 | } | ||
| 317 | c.slen-=(c.p-c.q); | ||
| 318 | } | ||
| 319 | } | ||
| 320 | else | ||
| 321 | ret->detached=1; | ||
| 322 | |||
| 323 | M_ASN1_D2I_Finish(a,PKCS7_free,ASN1_F_D2I_PKCS7); | ||
| 324 | } | ||
| 325 | |||
| 326 | PKCS7 *PKCS7_new(void) | ||
| 327 | { | ||
| 328 | PKCS7 *ret=NULL; | ||
| 329 | ASN1_CTX c; | ||
| 330 | |||
| 331 | M_ASN1_New_Malloc(ret,PKCS7); | ||
| 332 | ret->type=OBJ_nid2obj(NID_undef); | ||
| 333 | ret->asn1=NULL; | ||
| 334 | ret->length=0; | ||
| 335 | ret->detached=0; | ||
| 336 | ret->d.ptr=NULL; | ||
| 337 | return(ret); | ||
| 338 | M_ASN1_New_Error(ASN1_F_PKCS7_NEW); | ||
| 339 | } | ||
| 340 | |||
| 341 | void PKCS7_free(PKCS7 *a) | ||
| 342 | { | ||
| 343 | if (a == NULL) return; | ||
| 344 | |||
| 345 | PKCS7_content_free(a); | ||
| 346 | if (a->type != NULL) | ||
| 347 | { | ||
| 348 | ASN1_OBJECT_free(a->type); | ||
| 349 | } | ||
| 350 | OPENSSL_free(a); | ||
| 351 | } | ||
| 352 | |||
| 353 | void PKCS7_content_free(PKCS7 *a) | ||
| 354 | { | ||
| 355 | if(a == NULL) | ||
| 356 | return; | ||
| 357 | |||
| 358 | if (a->asn1 != NULL) OPENSSL_free(a->asn1); | ||
| 359 | |||
| 360 | if (a->d.ptr != NULL) | ||
| 361 | { | ||
| 362 | if (a->type == NULL) return; | ||
| 363 | |||
| 364 | switch (OBJ_obj2nid(a->type)) | ||
| 365 | { | ||
| 366 | case NID_pkcs7_data: | ||
| 367 | M_ASN1_OCTET_STRING_free(a->d.data); | ||
| 368 | break; | ||
| 369 | case NID_pkcs7_signed: | ||
| 370 | PKCS7_SIGNED_free(a->d.sign); | ||
| 371 | break; | ||
| 372 | case NID_pkcs7_enveloped: | ||
| 373 | PKCS7_ENVELOPE_free(a->d.enveloped); | ||
| 374 | break; | ||
| 375 | case NID_pkcs7_signedAndEnveloped: | ||
| 376 | PKCS7_SIGN_ENVELOPE_free(a->d.signed_and_enveloped); | ||
| 377 | break; | ||
| 378 | case NID_pkcs7_digest: | ||
| 379 | PKCS7_DIGEST_free(a->d.digest); | ||
| 380 | break; | ||
| 381 | case NID_pkcs7_encrypted: | ||
| 382 | PKCS7_ENCRYPT_free(a->d.encrypted); | ||
| 383 | break; | ||
| 384 | default: | ||
| 385 | ASN1_TYPE_free(a->d.other); | ||
| 386 | break; | ||
| 387 | } | ||
| 388 | } | ||
| 389 | a->d.ptr=NULL; | ||
| 390 | } | ||
| 391 | |||
| 392 | IMPLEMENT_STACK_OF(PKCS7) | ||
| 393 | IMPLEMENT_ASN1_SET_OF(PKCS7) | ||
diff --git a/src/lib/libcrypto/asn1/p7_recip.c b/src/lib/libcrypto/asn1/p7_recip.c deleted file mode 100644 index 5f6c88a2fa..0000000000 --- a/src/lib/libcrypto/asn1/p7_recip.c +++ /dev/null | |||
| @@ -1,125 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_recip.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 70 | M_ASN1_I2D_len(a->key_enc_algor,i2d_X509_ALGOR); | ||
| 71 | M_ASN1_I2D_len(a->enc_key,i2d_ASN1_OCTET_STRING); | ||
| 72 | |||
| 73 | M_ASN1_I2D_seq_total(); | ||
| 74 | |||
| 75 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_put(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 77 | M_ASN1_I2D_put(a->key_enc_algor,i2d_X509_ALGOR); | ||
| 78 | M_ASN1_I2D_put(a->enc_key,i2d_ASN1_OCTET_STRING); | ||
| 79 | |||
| 80 | M_ASN1_I2D_finish(); | ||
| 81 | } | ||
| 82 | |||
| 83 | PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a, | ||
| 84 | unsigned char **pp, long length) | ||
| 85 | { | ||
| 86 | M_ASN1_D2I_vars(a,PKCS7_RECIP_INFO *,PKCS7_RECIP_INFO_new); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Init(); | ||
| 89 | M_ASN1_D2I_start_sequence(); | ||
| 90 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 91 | M_ASN1_D2I_get(ret->issuer_and_serial,d2i_PKCS7_ISSUER_AND_SERIAL); | ||
| 92 | M_ASN1_D2I_get(ret->key_enc_algor,d2i_X509_ALGOR); | ||
| 93 | M_ASN1_D2I_get(ret->enc_key,d2i_ASN1_OCTET_STRING); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Finish(a,PKCS7_RECIP_INFO_free,ASN1_F_D2I_PKCS7_RECIP_INFO); | ||
| 96 | } | ||
| 97 | |||
| 98 | PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void) | ||
| 99 | { | ||
| 100 | PKCS7_RECIP_INFO *ret=NULL; | ||
| 101 | ASN1_CTX c; | ||
| 102 | |||
| 103 | M_ASN1_New_Malloc(ret,PKCS7_RECIP_INFO); | ||
| 104 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 105 | M_ASN1_New(ret->issuer_and_serial,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 106 | M_ASN1_New(ret->key_enc_algor,X509_ALGOR_new); | ||
| 107 | M_ASN1_New(ret->enc_key,M_ASN1_OCTET_STRING_new); | ||
| 108 | ret->cert=NULL; | ||
| 109 | return(ret); | ||
| 110 | M_ASN1_New_Error(ASN1_F_PKCS7_RECIP_INFO_NEW); | ||
| 111 | } | ||
| 112 | |||
| 113 | void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a) | ||
| 114 | { | ||
| 115 | if (a == NULL) return; | ||
| 116 | M_ASN1_INTEGER_free(a->version); | ||
| 117 | PKCS7_ISSUER_AND_SERIAL_free(a->issuer_and_serial); | ||
| 118 | X509_ALGOR_free(a->key_enc_algor); | ||
| 119 | M_ASN1_OCTET_STRING_free(a->enc_key); | ||
| 120 | if (a->cert != NULL) X509_free(a->cert); | ||
| 121 | OPENSSL_free(a); | ||
| 122 | } | ||
| 123 | |||
| 124 | IMPLEMENT_STACK_OF(PKCS7_RECIP_INFO) | ||
| 125 | IMPLEMENT_ASN1_SET_OF(PKCS7_RECIP_INFO) | ||
diff --git a/src/lib/libcrypto/asn1/p7_s_e.c b/src/lib/libcrypto/asn1/p7_s_e.c deleted file mode 100644 index 709eb24b27..0000000000 --- a/src/lib/libcrypto/asn1/p7_s_e.c +++ /dev/null | |||
| @@ -1,145 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_s_e.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 70 | i2d_PKCS7_RECIP_INFO); | ||
| 71 | M_ASN1_I2D_len_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 72 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 73 | M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 74 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 75 | M_ASN1_I2D_len_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 76 | i2d_PKCS7_SIGNER_INFO); | ||
| 77 | |||
| 78 | M_ASN1_I2D_seq_total(); | ||
| 79 | |||
| 80 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 81 | M_ASN1_I2D_put_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 82 | i2d_PKCS7_RECIP_INFO); | ||
| 83 | M_ASN1_I2D_put_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 84 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 85 | M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 86 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 87 | M_ASN1_I2D_put_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 88 | i2d_PKCS7_SIGNER_INFO); | ||
| 89 | |||
| 90 | M_ASN1_I2D_finish(); | ||
| 91 | } | ||
| 92 | |||
| 93 | PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a, | ||
| 94 | unsigned char **pp, long length) | ||
| 95 | { | ||
| 96 | M_ASN1_D2I_vars(a,PKCS7_SIGN_ENVELOPE *,PKCS7_SIGN_ENVELOPE_new); | ||
| 97 | |||
| 98 | M_ASN1_D2I_Init(); | ||
| 99 | M_ASN1_D2I_start_sequence(); | ||
| 100 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 101 | M_ASN1_D2I_get_set_type(PKCS7_RECIP_INFO,ret->recipientinfo, | ||
| 102 | d2i_PKCS7_RECIP_INFO,PKCS7_RECIP_INFO_free); | ||
| 103 | M_ASN1_D2I_get_set_type(X509_ALGOR,ret->md_algs,d2i_X509_ALGOR, | ||
| 104 | X509_ALGOR_free); | ||
| 105 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 106 | M_ASN1_D2I_get_IMP_set_opt_type(X509,ret->cert,d2i_X509,X509_free,0); | ||
| 107 | M_ASN1_D2I_get_IMP_set_opt_type(X509_CRL,ret->crl,d2i_X509_CRL, | ||
| 108 | X509_CRL_free,1); | ||
| 109 | M_ASN1_D2I_get_set_type(PKCS7_SIGNER_INFO,ret->signer_info, | ||
| 110 | d2i_PKCS7_SIGNER_INFO,PKCS7_SIGNER_INFO_free); | ||
| 111 | |||
| 112 | M_ASN1_D2I_Finish(a,PKCS7_SIGN_ENVELOPE_free, | ||
| 113 | ASN1_F_D2I_PKCS7_SIGN_ENVELOPE); | ||
| 114 | } | ||
| 115 | |||
| 116 | PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void) | ||
| 117 | { | ||
| 118 | PKCS7_SIGN_ENVELOPE *ret=NULL; | ||
| 119 | ASN1_CTX c; | ||
| 120 | |||
| 121 | M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE); | ||
| 122 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 123 | M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null); | ||
| 124 | M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null); | ||
| 125 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 126 | ret->cert=NULL; | ||
| 127 | ret->crl=NULL; | ||
| 128 | M_ASN1_New(ret->signer_info,sk_PKCS7_SIGNER_INFO_new_null); | ||
| 129 | return(ret); | ||
| 130 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGN_ENVELOPE_NEW); | ||
| 131 | } | ||
| 132 | |||
| 133 | void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a) | ||
| 134 | { | ||
| 135 | if (a == NULL) return; | ||
| 136 | M_ASN1_INTEGER_free(a->version); | ||
| 137 | sk_PKCS7_RECIP_INFO_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); | ||
| 138 | sk_X509_ALGOR_pop_free(a->md_algs,X509_ALGOR_free); | ||
| 139 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 140 | sk_X509_pop_free(a->cert,X509_free); | ||
| 141 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); | ||
| 142 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | ||
| 143 | OPENSSL_free(a); | ||
| 144 | } | ||
| 145 | |||
diff --git a/src/lib/libcrypto/asn1/p7_signd.c b/src/lib/libcrypto/asn1/p7_signd.c deleted file mode 100644 index c835f5475f..0000000000 --- a/src/lib/libcrypto/asn1/p7_signd.c +++ /dev/null | |||
| @@ -1,135 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_signd.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 70 | M_ASN1_I2D_len(a->contents,i2d_PKCS7); | ||
| 71 | M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 72 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 73 | M_ASN1_I2D_len_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 74 | i2d_PKCS7_SIGNER_INFO); | ||
| 75 | |||
| 76 | M_ASN1_I2D_seq_total(); | ||
| 77 | |||
| 78 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 79 | M_ASN1_I2D_put_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 80 | M_ASN1_I2D_put(a->contents,i2d_PKCS7); | ||
| 81 | M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 82 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 83 | M_ASN1_I2D_put_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 84 | i2d_PKCS7_SIGNER_INFO); | ||
| 85 | |||
| 86 | M_ASN1_I2D_finish(); | ||
| 87 | } | ||
| 88 | |||
| 89 | PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, unsigned char **pp, | ||
| 90 | long length) | ||
| 91 | { | ||
| 92 | M_ASN1_D2I_vars(a,PKCS7_SIGNED *,PKCS7_SIGNED_new); | ||
| 93 | |||
| 94 | M_ASN1_D2I_Init(); | ||
| 95 | M_ASN1_D2I_start_sequence(); | ||
| 96 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 97 | M_ASN1_D2I_get_set_type(X509_ALGOR,ret->md_algs,d2i_X509_ALGOR, | ||
| 98 | X509_ALGOR_free); | ||
| 99 | M_ASN1_D2I_get(ret->contents,d2i_PKCS7); | ||
| 100 | M_ASN1_D2I_get_IMP_set_opt_type(X509,ret->cert,d2i_X509,X509_free,0); | ||
| 101 | M_ASN1_D2I_get_IMP_set_opt_type(X509_CRL,ret->crl,d2i_X509_CRL, | ||
| 102 | X509_CRL_free,1); | ||
| 103 | M_ASN1_D2I_get_set_type(PKCS7_SIGNER_INFO,ret->signer_info, | ||
| 104 | d2i_PKCS7_SIGNER_INFO,PKCS7_SIGNER_INFO_free); | ||
| 105 | |||
| 106 | M_ASN1_D2I_Finish(a,PKCS7_SIGNED_free,ASN1_F_D2I_PKCS7_SIGNED); | ||
| 107 | } | ||
| 108 | |||
| 109 | PKCS7_SIGNED *PKCS7_SIGNED_new(void) | ||
| 110 | { | ||
| 111 | PKCS7_SIGNED *ret=NULL; | ||
| 112 | ASN1_CTX c; | ||
| 113 | |||
| 114 | M_ASN1_New_Malloc(ret,PKCS7_SIGNED); | ||
| 115 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 116 | M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null); | ||
| 117 | M_ASN1_New(ret->contents,PKCS7_new); | ||
| 118 | ret->cert=NULL; | ||
| 119 | ret->crl=NULL; | ||
| 120 | M_ASN1_New(ret->signer_info,sk_PKCS7_SIGNER_INFO_new_null); | ||
| 121 | return(ret); | ||
| 122 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGNED_NEW); | ||
| 123 | } | ||
| 124 | |||
| 125 | void PKCS7_SIGNED_free(PKCS7_SIGNED *a) | ||
| 126 | { | ||
| 127 | if (a == NULL) return; | ||
| 128 | M_ASN1_INTEGER_free(a->version); | ||
| 129 | sk_X509_ALGOR_pop_free(a->md_algs,X509_ALGOR_free); | ||
| 130 | PKCS7_free(a->contents); | ||
| 131 | sk_X509_pop_free(a->cert,X509_free); | ||
| 132 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); | ||
| 133 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | ||
| 134 | OPENSSL_free(a); | ||
| 135 | } | ||
diff --git a/src/lib/libcrypto/asn1/p7_signi.c b/src/lib/libcrypto/asn1/p7_signi.c deleted file mode 100644 index 248bf00945..0000000000 --- a/src/lib/libcrypto/asn1/p7_signi.c +++ /dev/null | |||
| @@ -1,150 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_signi.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 70 | M_ASN1_I2D_len(a->digest_alg,i2d_X509_ALGOR); | ||
| 71 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_ATTRIBUTE,a->auth_attr, | ||
| 72 | i2d_X509_ATTRIBUTE,0); | ||
| 73 | M_ASN1_I2D_len(a->digest_enc_alg,i2d_X509_ALGOR); | ||
| 74 | M_ASN1_I2D_len(a->enc_digest,i2d_ASN1_OCTET_STRING); | ||
| 75 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_ATTRIBUTE,a->unauth_attr, | ||
| 76 | i2d_X509_ATTRIBUTE,1); | ||
| 77 | |||
| 78 | M_ASN1_I2D_seq_total(); | ||
| 79 | |||
| 80 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 81 | M_ASN1_I2D_put(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 82 | M_ASN1_I2D_put(a->digest_alg,i2d_X509_ALGOR); | ||
| 83 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_ATTRIBUTE,a->auth_attr, | ||
| 84 | i2d_X509_ATTRIBUTE,0); | ||
| 85 | M_ASN1_I2D_put(a->digest_enc_alg,i2d_X509_ALGOR); | ||
| 86 | M_ASN1_I2D_put(a->enc_digest,i2d_ASN1_OCTET_STRING); | ||
| 87 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_ATTRIBUTE,a->unauth_attr, | ||
| 88 | i2d_X509_ATTRIBUTE,1); | ||
| 89 | |||
| 90 | M_ASN1_I2D_finish(); | ||
| 91 | } | ||
| 92 | |||
| 93 | PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a, | ||
| 94 | unsigned char **pp, long length) | ||
| 95 | { | ||
| 96 | M_ASN1_D2I_vars(a,PKCS7_SIGNER_INFO *,PKCS7_SIGNER_INFO_new); | ||
| 97 | |||
| 98 | M_ASN1_D2I_Init(); | ||
| 99 | M_ASN1_D2I_start_sequence(); | ||
| 100 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 101 | M_ASN1_D2I_get(ret->issuer_and_serial,d2i_PKCS7_ISSUER_AND_SERIAL); | ||
| 102 | M_ASN1_D2I_get(ret->digest_alg,d2i_X509_ALGOR); | ||
| 103 | M_ASN1_D2I_get_IMP_set_opt_type(X509_ATTRIBUTE,ret->auth_attr, | ||
| 104 | d2i_X509_ATTRIBUTE,X509_ATTRIBUTE_free, | ||
| 105 | 0); | ||
| 106 | M_ASN1_D2I_get(ret->digest_enc_alg,d2i_X509_ALGOR); | ||
| 107 | M_ASN1_D2I_get(ret->enc_digest,d2i_ASN1_OCTET_STRING); | ||
| 108 | M_ASN1_D2I_get_IMP_set_opt_type(X509_ATTRIBUTE,ret->unauth_attr, | ||
| 109 | d2i_X509_ATTRIBUTE, | ||
| 110 | X509_ATTRIBUTE_free,1); | ||
| 111 | |||
| 112 | M_ASN1_D2I_Finish(a,PKCS7_SIGNER_INFO_free, | ||
| 113 | ASN1_F_D2I_PKCS7_SIGNER_INFO); | ||
| 114 | } | ||
| 115 | |||
| 116 | PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void) | ||
| 117 | { | ||
| 118 | PKCS7_SIGNER_INFO *ret=NULL; | ||
| 119 | ASN1_CTX c; | ||
| 120 | |||
| 121 | M_ASN1_New_Malloc(ret,PKCS7_SIGNER_INFO); | ||
| 122 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 123 | M_ASN1_New(ret->issuer_and_serial,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 124 | M_ASN1_New(ret->digest_alg,X509_ALGOR_new); | ||
| 125 | ret->auth_attr=NULL; | ||
| 126 | M_ASN1_New(ret->digest_enc_alg,X509_ALGOR_new); | ||
| 127 | M_ASN1_New(ret->enc_digest,M_ASN1_OCTET_STRING_new); | ||
| 128 | ret->unauth_attr=NULL; | ||
| 129 | ret->pkey=NULL; | ||
| 130 | return(ret); | ||
| 131 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGNER_INFO_NEW); | ||
| 132 | } | ||
| 133 | |||
| 134 | void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a) | ||
| 135 | { | ||
| 136 | if (a == NULL) return; | ||
| 137 | M_ASN1_INTEGER_free(a->version); | ||
| 138 | PKCS7_ISSUER_AND_SERIAL_free(a->issuer_and_serial); | ||
| 139 | X509_ALGOR_free(a->digest_alg); | ||
| 140 | sk_X509_ATTRIBUTE_pop_free(a->auth_attr,X509_ATTRIBUTE_free); | ||
| 141 | X509_ALGOR_free(a->digest_enc_alg); | ||
| 142 | M_ASN1_OCTET_STRING_free(a->enc_digest); | ||
| 143 | sk_X509_ATTRIBUTE_pop_free(a->unauth_attr,X509_ATTRIBUTE_free); | ||
| 144 | if (a->pkey != NULL) | ||
| 145 | EVP_PKEY_free(a->pkey); | ||
| 146 | OPENSSL_free(a); | ||
| 147 | } | ||
| 148 | |||
| 149 | IMPLEMENT_STACK_OF(PKCS7_SIGNER_INFO) | ||
| 150 | IMPLEMENT_ASN1_SET_OF(PKCS7_SIGNER_INFO) | ||
diff --git a/src/lib/libcrypto/conf/conf.c b/src/lib/libcrypto/conf/conf.c deleted file mode 100644 index 3031fa3b44..0000000000 --- a/src/lib/libcrypto/conf/conf.c +++ /dev/null | |||
| @@ -1,730 +0,0 @@ | |||
| 1 | /* crypto/conf/conf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <errno.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/stack.h> | ||
| 63 | #include <openssl/lhash.h> | ||
| 64 | #include <openssl/conf.h> | ||
| 65 | #include <openssl/buffer.h> | ||
| 66 | #include <openssl/err.h> | ||
| 67 | |||
| 68 | #include "conf_lcl.h" | ||
| 69 | |||
| 70 | static void value_free_hash(CONF_VALUE *a, LHASH *conf); | ||
| 71 | static void value_free_stack(CONF_VALUE *a,LHASH *conf); | ||
| 72 | static unsigned long hash(CONF_VALUE *v); | ||
| 73 | static int cmp_conf(CONF_VALUE *a,CONF_VALUE *b); | ||
| 74 | static char *eat_ws(char *p); | ||
| 75 | static char *eat_alpha_numeric(char *p); | ||
| 76 | static void clear_comments(char *p); | ||
| 77 | static int str_copy(LHASH *conf,char *section,char **to, char *from); | ||
| 78 | static char *scan_quote(char *p); | ||
| 79 | static CONF_VALUE *new_section(LHASH *conf,char *section); | ||
| 80 | static CONF_VALUE *get_section(LHASH *conf,char *section); | ||
| 81 | #define scan_esc(p) ((((p)[1] == '\0')?(p++):(p+=2)),p) | ||
| 82 | |||
| 83 | const char *CONF_version="CONF" OPENSSL_VERSION_PTEXT; | ||
| 84 | |||
| 85 | |||
| 86 | LHASH *CONF_load(LHASH *h, const char *file, long *line) | ||
| 87 | { | ||
| 88 | LHASH *ltmp; | ||
| 89 | BIO *in=NULL; | ||
| 90 | |||
| 91 | #ifdef VMS | ||
| 92 | in=BIO_new_file(file, "r"); | ||
| 93 | #else | ||
| 94 | in=BIO_new_file(file, "rb"); | ||
| 95 | #endif | ||
| 96 | if (in == NULL) | ||
| 97 | { | ||
| 98 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
| 99 | return NULL; | ||
| 100 | } | ||
| 101 | |||
| 102 | ltmp = CONF_load_bio(h, in, line); | ||
| 103 | BIO_free(in); | ||
| 104 | |||
| 105 | return ltmp; | ||
| 106 | } | ||
| 107 | #ifndef NO_FP_API | ||
| 108 | LHASH *CONF_load_fp(LHASH *h, FILE *in, long *line) | ||
| 109 | { | ||
| 110 | BIO *btmp; | ||
| 111 | LHASH *ltmp; | ||
| 112 | if(!(btmp = BIO_new_fp(in, BIO_NOCLOSE))) { | ||
| 113 | CONFerr(CONF_F_CONF_LOAD_FP,ERR_R_BUF_LIB); | ||
| 114 | return NULL; | ||
| 115 | } | ||
| 116 | ltmp = CONF_load_bio(h, btmp, line); | ||
| 117 | BIO_free(btmp); | ||
| 118 | return ltmp; | ||
| 119 | } | ||
| 120 | #endif | ||
| 121 | |||
| 122 | LHASH *CONF_load_bio(LHASH *h, BIO *in, long *line) | ||
| 123 | { | ||
| 124 | LHASH *ret=NULL; | ||
| 125 | #define BUFSIZE 512 | ||
| 126 | char btmp[16]; | ||
| 127 | int bufnum=0,i,ii; | ||
| 128 | BUF_MEM *buff=NULL; | ||
| 129 | char *s,*p,*end; | ||
| 130 | int again,n; | ||
| 131 | long eline=0; | ||
| 132 | CONF_VALUE *v=NULL,*vv,*tv; | ||
| 133 | CONF_VALUE *sv=NULL; | ||
| 134 | char *section=NULL,*buf; | ||
| 135 | STACK_OF(CONF_VALUE) *section_sk=NULL,*ts; | ||
| 136 | char *start,*psection,*pname; | ||
| 137 | |||
| 138 | if ((buff=BUF_MEM_new()) == NULL) | ||
| 139 | { | ||
| 140 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 141 | goto err; | ||
| 142 | } | ||
| 143 | |||
| 144 | section=(char *)Malloc(10); | ||
| 145 | if (section == NULL) | ||
| 146 | { | ||
| 147 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 148 | goto err; | ||
| 149 | } | ||
| 150 | strcpy(section,"default"); | ||
| 151 | |||
| 152 | if (h == NULL) | ||
| 153 | { | ||
| 154 | if ((ret=lh_new(hash,cmp_conf)) == NULL) | ||
| 155 | { | ||
| 156 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 157 | goto err; | ||
| 158 | } | ||
| 159 | } | ||
| 160 | else | ||
| 161 | ret=h; | ||
| 162 | |||
| 163 | sv=new_section(ret,section); | ||
| 164 | if (sv == NULL) | ||
| 165 | { | ||
| 166 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 167 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 168 | goto err; | ||
| 169 | } | ||
| 170 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 171 | |||
| 172 | bufnum=0; | ||
| 173 | for (;;) | ||
| 174 | { | ||
| 175 | again=0; | ||
| 176 | if (!BUF_MEM_grow(buff,bufnum+BUFSIZE)) | ||
| 177 | { | ||
| 178 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 179 | goto err; | ||
| 180 | } | ||
| 181 | p= &(buff->data[bufnum]); | ||
| 182 | *p='\0'; | ||
| 183 | BIO_gets(in, p, BUFSIZE-1); | ||
| 184 | p[BUFSIZE-1]='\0'; | ||
| 185 | ii=i=strlen(p); | ||
| 186 | if (i == 0) break; | ||
| 187 | while (i > 0) | ||
| 188 | { | ||
| 189 | if ((p[i-1] != '\r') && (p[i-1] != '\n')) | ||
| 190 | break; | ||
| 191 | else | ||
| 192 | i--; | ||
| 193 | } | ||
| 194 | /* we removed some trailing stuff so there is a new | ||
| 195 | * line on the end. */ | ||
| 196 | if (i == ii) | ||
| 197 | again=1; /* long line */ | ||
| 198 | else | ||
| 199 | { | ||
| 200 | p[i]='\0'; | ||
| 201 | eline++; /* another input line */ | ||
| 202 | } | ||
| 203 | |||
| 204 | /* we now have a line with trailing \r\n removed */ | ||
| 205 | |||
| 206 | /* i is the number of bytes */ | ||
| 207 | bufnum+=i; | ||
| 208 | |||
| 209 | v=NULL; | ||
| 210 | /* check for line continuation */ | ||
| 211 | if (bufnum >= 1) | ||
| 212 | { | ||
| 213 | /* If we have bytes and the last char '\\' and | ||
| 214 | * second last char is not '\\' */ | ||
| 215 | p= &(buff->data[bufnum-1]); | ||
| 216 | if ( IS_ESC(p[0]) && | ||
| 217 | ((bufnum <= 1) || !IS_ESC(p[-1]))) | ||
| 218 | { | ||
| 219 | bufnum--; | ||
| 220 | again=1; | ||
| 221 | } | ||
| 222 | } | ||
| 223 | if (again) continue; | ||
| 224 | bufnum=0; | ||
| 225 | buf=buff->data; | ||
| 226 | |||
| 227 | clear_comments(buf); | ||
| 228 | n=strlen(buf); | ||
| 229 | s=eat_ws(buf); | ||
| 230 | if (IS_EOF(*s)) continue; /* blank line */ | ||
| 231 | if (*s == '[') | ||
| 232 | { | ||
| 233 | char *ss; | ||
| 234 | |||
| 235 | s++; | ||
| 236 | start=eat_ws(s); | ||
| 237 | ss=start; | ||
| 238 | again: | ||
| 239 | end=eat_alpha_numeric(ss); | ||
| 240 | p=eat_ws(end); | ||
| 241 | if (*p != ']') | ||
| 242 | { | ||
| 243 | if (*p != '\0') | ||
| 244 | { | ||
| 245 | ss=p; | ||
| 246 | goto again; | ||
| 247 | } | ||
| 248 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 249 | CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | ||
| 250 | goto err; | ||
| 251 | } | ||
| 252 | *end='\0'; | ||
| 253 | if (!str_copy(ret,NULL,§ion,start)) goto err; | ||
| 254 | if ((sv=get_section(ret,section)) == NULL) | ||
| 255 | sv=new_section(ret,section); | ||
| 256 | if (sv == NULL) | ||
| 257 | { | ||
| 258 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 259 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 260 | goto err; | ||
| 261 | } | ||
| 262 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 263 | continue; | ||
| 264 | } | ||
| 265 | else | ||
| 266 | { | ||
| 267 | pname=s; | ||
| 268 | psection=NULL; | ||
| 269 | end=eat_alpha_numeric(s); | ||
| 270 | if ((end[0] == ':') && (end[1] == ':')) | ||
| 271 | { | ||
| 272 | *end='\0'; | ||
| 273 | end+=2; | ||
| 274 | psection=pname; | ||
| 275 | pname=end; | ||
| 276 | end=eat_alpha_numeric(end); | ||
| 277 | } | ||
| 278 | p=eat_ws(end); | ||
| 279 | if (*p != '=') | ||
| 280 | { | ||
| 281 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 282 | CONF_R_MISSING_EQUAL_SIGN); | ||
| 283 | goto err; | ||
| 284 | } | ||
| 285 | *end='\0'; | ||
| 286 | p++; | ||
| 287 | start=eat_ws(p); | ||
| 288 | while (!IS_EOF(*p)) | ||
| 289 | p++; | ||
| 290 | p--; | ||
| 291 | while ((p != start) && (IS_WS(*p))) | ||
| 292 | p--; | ||
| 293 | p++; | ||
| 294 | *p='\0'; | ||
| 295 | |||
| 296 | if (!(v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE)))) | ||
| 297 | { | ||
| 298 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 299 | ERR_R_MALLOC_FAILURE); | ||
| 300 | goto err; | ||
| 301 | } | ||
| 302 | if (psection == NULL) psection=section; | ||
| 303 | v->name=(char *)Malloc(strlen(pname)+1); | ||
| 304 | v->value=NULL; | ||
| 305 | if (v->name == NULL) | ||
| 306 | { | ||
| 307 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 308 | ERR_R_MALLOC_FAILURE); | ||
| 309 | goto err; | ||
| 310 | } | ||
| 311 | strcpy(v->name,pname); | ||
| 312 | if (!str_copy(ret,psection,&(v->value),start)) goto err; | ||
| 313 | |||
| 314 | if (strcmp(psection,section) != 0) | ||
| 315 | { | ||
| 316 | if ((tv=get_section(ret,psection)) | ||
| 317 | == NULL) | ||
| 318 | tv=new_section(ret,psection); | ||
| 319 | if (tv == NULL) | ||
| 320 | { | ||
| 321 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 322 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 323 | goto err; | ||
| 324 | } | ||
| 325 | ts=(STACK_OF(CONF_VALUE) *)tv->value; | ||
| 326 | } | ||
| 327 | else | ||
| 328 | { | ||
| 329 | tv=sv; | ||
| 330 | ts=section_sk; | ||
| 331 | } | ||
| 332 | v->section=tv->section; | ||
| 333 | if (!sk_CONF_VALUE_push(ts,v)) | ||
| 334 | { | ||
| 335 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 336 | ERR_R_MALLOC_FAILURE); | ||
| 337 | goto err; | ||
| 338 | } | ||
| 339 | vv=(CONF_VALUE *)lh_insert(ret,v); | ||
| 340 | if (vv != NULL) | ||
| 341 | { | ||
| 342 | sk_CONF_VALUE_delete_ptr(ts,vv); | ||
| 343 | Free(vv->name); | ||
| 344 | Free(vv->value); | ||
| 345 | Free(vv); | ||
| 346 | } | ||
| 347 | v=NULL; | ||
| 348 | } | ||
| 349 | } | ||
| 350 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 351 | if (section != NULL) Free(section); | ||
| 352 | return(ret); | ||
| 353 | err: | ||
| 354 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 355 | if (section != NULL) Free(section); | ||
| 356 | if (line != NULL) *line=eline; | ||
| 357 | sprintf(btmp,"%ld",eline); | ||
| 358 | ERR_add_error_data(2,"line ",btmp); | ||
| 359 | if ((h != ret) && (ret != NULL)) CONF_free(ret); | ||
| 360 | if (v != NULL) | ||
| 361 | { | ||
| 362 | if (v->name != NULL) Free(v->name); | ||
| 363 | if (v->value != NULL) Free(v->value); | ||
| 364 | if (v != NULL) Free(v); | ||
| 365 | } | ||
| 366 | return(NULL); | ||
| 367 | } | ||
| 368 | |||
| 369 | char *CONF_get_string(LHASH *conf, char *section, char *name) | ||
| 370 | { | ||
| 371 | CONF_VALUE *v,vv; | ||
| 372 | char *p; | ||
| 373 | |||
| 374 | if (name == NULL) return(NULL); | ||
| 375 | if (conf != NULL) | ||
| 376 | { | ||
| 377 | if (section != NULL) | ||
| 378 | { | ||
| 379 | vv.name=name; | ||
| 380 | vv.section=section; | ||
| 381 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 382 | if (v != NULL) return(v->value); | ||
| 383 | if (strcmp(section,"ENV") == 0) | ||
| 384 | { | ||
| 385 | p=Getenv(name); | ||
| 386 | if (p != NULL) return(p); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | vv.section="default"; | ||
| 390 | vv.name=name; | ||
| 391 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 392 | if (v != NULL) | ||
| 393 | return(v->value); | ||
| 394 | else | ||
| 395 | return(NULL); | ||
| 396 | } | ||
| 397 | else | ||
| 398 | return(Getenv(name)); | ||
| 399 | } | ||
| 400 | |||
| 401 | static CONF_VALUE *get_section(LHASH *conf, char *section) | ||
| 402 | { | ||
| 403 | CONF_VALUE *v,vv; | ||
| 404 | |||
| 405 | if ((conf == NULL) || (section == NULL)) return(NULL); | ||
| 406 | vv.name=NULL; | ||
| 407 | vv.section=section; | ||
| 408 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 409 | return(v); | ||
| 410 | } | ||
| 411 | |||
| 412 | STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf, char *section) | ||
| 413 | { | ||
| 414 | CONF_VALUE *v; | ||
| 415 | |||
| 416 | v=get_section(conf,section); | ||
| 417 | if (v != NULL) | ||
| 418 | return((STACK_OF(CONF_VALUE) *)v->value); | ||
| 419 | else | ||
| 420 | return(NULL); | ||
| 421 | } | ||
| 422 | |||
| 423 | long CONF_get_number(LHASH *conf, char *section, char *name) | ||
| 424 | { | ||
| 425 | char *str; | ||
| 426 | long ret=0; | ||
| 427 | |||
| 428 | str=CONF_get_string(conf,section,name); | ||
| 429 | if (str == NULL) return(0); | ||
| 430 | for (;;) | ||
| 431 | { | ||
| 432 | if (IS_NUMER(*str)) | ||
| 433 | ret=ret*10+(*str -'0'); | ||
| 434 | else | ||
| 435 | return(ret); | ||
| 436 | str++; | ||
| 437 | } | ||
| 438 | } | ||
| 439 | |||
| 440 | void CONF_free(LHASH *conf) | ||
| 441 | { | ||
| 442 | if (conf == NULL) return; | ||
| 443 | |||
| 444 | conf->down_load=0; /* evil thing to make sure the 'Free()' | ||
| 445 | * works as expected */ | ||
| 446 | lh_doall_arg(conf,(void (*)())value_free_hash,conf); | ||
| 447 | |||
| 448 | /* We now have only 'section' entries in the hash table. | ||
| 449 | * Due to problems with */ | ||
| 450 | |||
| 451 | lh_doall_arg(conf,(void (*)())value_free_stack,conf); | ||
| 452 | lh_free(conf); | ||
| 453 | } | ||
| 454 | |||
| 455 | static void value_free_hash(CONF_VALUE *a, LHASH *conf) | ||
| 456 | { | ||
| 457 | if (a->name != NULL) | ||
| 458 | { | ||
| 459 | a=(CONF_VALUE *)lh_delete(conf,a); | ||
| 460 | } | ||
| 461 | } | ||
| 462 | |||
| 463 | static void value_free_stack(CONF_VALUE *a, LHASH *conf) | ||
| 464 | { | ||
| 465 | CONF_VALUE *vv; | ||
| 466 | STACK *sk; | ||
| 467 | int i; | ||
| 468 | |||
| 469 | if (a->name != NULL) return; | ||
| 470 | |||
| 471 | sk=(STACK *)a->value; | ||
| 472 | for (i=sk_num(sk)-1; i>=0; i--) | ||
| 473 | { | ||
| 474 | vv=(CONF_VALUE *)sk_value(sk,i); | ||
| 475 | Free(vv->value); | ||
| 476 | Free(vv->name); | ||
| 477 | Free(vv); | ||
| 478 | } | ||
| 479 | if (sk != NULL) sk_free(sk); | ||
| 480 | Free(a->section); | ||
| 481 | Free(a); | ||
| 482 | } | ||
| 483 | |||
| 484 | static void clear_comments(char *p) | ||
| 485 | { | ||
| 486 | char *to; | ||
| 487 | |||
| 488 | to=p; | ||
| 489 | for (;;) | ||
| 490 | { | ||
| 491 | if (IS_COMMENT(*p)) | ||
| 492 | { | ||
| 493 | *p='\0'; | ||
| 494 | return; | ||
| 495 | } | ||
| 496 | if (IS_QUOTE(*p)) | ||
| 497 | { | ||
| 498 | p=scan_quote(p); | ||
| 499 | continue; | ||
| 500 | } | ||
| 501 | if (IS_ESC(*p)) | ||
| 502 | { | ||
| 503 | p=scan_esc(p); | ||
| 504 | continue; | ||
| 505 | } | ||
| 506 | if (IS_EOF(*p)) | ||
| 507 | return; | ||
| 508 | else | ||
| 509 | p++; | ||
| 510 | } | ||
| 511 | } | ||
| 512 | |||
| 513 | static int str_copy(LHASH *conf, char *section, char **pto, char *from) | ||
| 514 | { | ||
| 515 | int q,r,rr=0,to=0,len=0; | ||
| 516 | char *s,*e,*rp,*p,*rrp,*np,*cp,v; | ||
| 517 | BUF_MEM *buf; | ||
| 518 | |||
| 519 | if ((buf=BUF_MEM_new()) == NULL) return(0); | ||
| 520 | |||
| 521 | len=strlen(from)+1; | ||
| 522 | if (!BUF_MEM_grow(buf,len)) goto err; | ||
| 523 | |||
| 524 | for (;;) | ||
| 525 | { | ||
| 526 | if (IS_QUOTE(*from)) | ||
| 527 | { | ||
| 528 | q= *from; | ||
| 529 | from++; | ||
| 530 | while ((*from != '\0') && (*from != q)) | ||
| 531 | { | ||
| 532 | if (*from == '\\') | ||
| 533 | { | ||
| 534 | from++; | ||
| 535 | if (*from == '\0') break; | ||
| 536 | } | ||
| 537 | buf->data[to++]= *(from++); | ||
| 538 | } | ||
| 539 | } | ||
| 540 | else if (*from == '\\') | ||
| 541 | { | ||
| 542 | from++; | ||
| 543 | v= *(from++); | ||
| 544 | if (v == '\0') break; | ||
| 545 | else if (v == 'r') v='\r'; | ||
| 546 | else if (v == 'n') v='\n'; | ||
| 547 | else if (v == 'b') v='\b'; | ||
| 548 | else if (v == 't') v='\t'; | ||
| 549 | buf->data[to++]= v; | ||
| 550 | } | ||
| 551 | else if (*from == '\0') | ||
| 552 | break; | ||
| 553 | else if (*from == '$') | ||
| 554 | { | ||
| 555 | /* try to expand it */ | ||
| 556 | rrp=NULL; | ||
| 557 | s= &(from[1]); | ||
| 558 | if (*s == '{') | ||
| 559 | q='}'; | ||
| 560 | else if (*s == '(') | ||
| 561 | q=')'; | ||
| 562 | else q=0; | ||
| 563 | |||
| 564 | if (q) s++; | ||
| 565 | cp=section; | ||
| 566 | e=np=s; | ||
| 567 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 568 | e++; | ||
| 569 | if ((e[0] == ':') && (e[1] == ':')) | ||
| 570 | { | ||
| 571 | cp=np; | ||
| 572 | rrp=e; | ||
| 573 | rr= *e; | ||
| 574 | *rrp='\0'; | ||
| 575 | e+=2; | ||
| 576 | np=e; | ||
| 577 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 578 | e++; | ||
| 579 | } | ||
| 580 | r= *e; | ||
| 581 | *e='\0'; | ||
| 582 | rp=e; | ||
| 583 | if (q) | ||
| 584 | { | ||
| 585 | if (r != q) | ||
| 586 | { | ||
| 587 | CONFerr(CONF_F_STR_COPY,CONF_R_NO_CLOSE_BRACE); | ||
| 588 | goto err; | ||
| 589 | } | ||
| 590 | e++; | ||
| 591 | } | ||
| 592 | /* So at this point we have | ||
| 593 | * ns which is the start of the name string which is | ||
| 594 | * '\0' terminated. | ||
| 595 | * cs which is the start of the section string which is | ||
| 596 | * '\0' terminated. | ||
| 597 | * e is the 'next point after'. | ||
| 598 | * r and s are the chars replaced by the '\0' | ||
| 599 | * rp and sp is where 'r' and 's' came from. | ||
| 600 | */ | ||
| 601 | p=CONF_get_string(conf,cp,np); | ||
| 602 | if (rrp != NULL) *rrp=rr; | ||
| 603 | *rp=r; | ||
| 604 | if (p == NULL) | ||
| 605 | { | ||
| 606 | CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); | ||
| 607 | goto err; | ||
| 608 | } | ||
| 609 | BUF_MEM_grow(buf,(strlen(p)+len-(e-from))); | ||
| 610 | while (*p) | ||
| 611 | buf->data[to++]= *(p++); | ||
| 612 | from=e; | ||
| 613 | } | ||
| 614 | else | ||
| 615 | buf->data[to++]= *(from++); | ||
| 616 | } | ||
| 617 | buf->data[to]='\0'; | ||
| 618 | if (*pto != NULL) Free(*pto); | ||
| 619 | *pto=buf->data; | ||
| 620 | Free(buf); | ||
| 621 | return(1); | ||
| 622 | err: | ||
| 623 | if (buf != NULL) BUF_MEM_free(buf); | ||
| 624 | return(0); | ||
| 625 | } | ||
| 626 | |||
| 627 | static char *eat_ws(char *p) | ||
| 628 | { | ||
| 629 | while (IS_WS(*p) && (!IS_EOF(*p))) | ||
| 630 | p++; | ||
| 631 | return(p); | ||
| 632 | } | ||
| 633 | |||
| 634 | static char *eat_alpha_numeric(char *p) | ||
| 635 | { | ||
| 636 | for (;;) | ||
| 637 | { | ||
| 638 | if (IS_ESC(*p)) | ||
| 639 | { | ||
| 640 | p=scan_esc(p); | ||
| 641 | continue; | ||
| 642 | } | ||
| 643 | if (!IS_ALPHA_NUMERIC_PUNCT(*p)) | ||
| 644 | return(p); | ||
| 645 | p++; | ||
| 646 | } | ||
| 647 | } | ||
| 648 | |||
| 649 | static unsigned long hash(CONF_VALUE *v) | ||
| 650 | { | ||
| 651 | return((lh_strhash(v->section)<<2)^lh_strhash(v->name)); | ||
| 652 | } | ||
| 653 | |||
| 654 | static int cmp_conf(CONF_VALUE *a, CONF_VALUE *b) | ||
| 655 | { | ||
| 656 | int i; | ||
| 657 | |||
| 658 | if (a->section != b->section) | ||
| 659 | { | ||
| 660 | i=strcmp(a->section,b->section); | ||
| 661 | if (i) return(i); | ||
| 662 | } | ||
| 663 | |||
| 664 | if ((a->name != NULL) && (b->name != NULL)) | ||
| 665 | { | ||
| 666 | i=strcmp(a->name,b->name); | ||
| 667 | return(i); | ||
| 668 | } | ||
| 669 | else if (a->name == b->name) | ||
| 670 | return(0); | ||
| 671 | else | ||
| 672 | return((a->name == NULL)?-1:1); | ||
| 673 | } | ||
| 674 | |||
| 675 | static char *scan_quote(char *p) | ||
| 676 | { | ||
| 677 | int q= *p; | ||
| 678 | |||
| 679 | p++; | ||
| 680 | while (!(IS_EOF(*p)) && (*p != q)) | ||
| 681 | { | ||
| 682 | if (IS_ESC(*p)) | ||
| 683 | { | ||
| 684 | p++; | ||
| 685 | if (IS_EOF(*p)) return(p); | ||
| 686 | } | ||
| 687 | p++; | ||
| 688 | } | ||
| 689 | if (*p == q) p++; | ||
| 690 | return(p); | ||
| 691 | } | ||
| 692 | |||
| 693 | static CONF_VALUE *new_section(LHASH *conf, char *section) | ||
| 694 | { | ||
| 695 | STACK *sk=NULL; | ||
| 696 | int ok=0,i; | ||
| 697 | CONF_VALUE *v=NULL,*vv; | ||
| 698 | |||
| 699 | if ((sk=sk_new_null()) == NULL) | ||
| 700 | goto err; | ||
| 701 | if ((v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE))) == NULL) | ||
| 702 | goto err; | ||
| 703 | i=strlen(section)+1; | ||
| 704 | if ((v->section=(char *)Malloc(i)) == NULL) | ||
| 705 | goto err; | ||
| 706 | |||
| 707 | memcpy(v->section,section,i); | ||
| 708 | v->name=NULL; | ||
| 709 | v->value=(char *)sk; | ||
| 710 | |||
| 711 | vv=(CONF_VALUE *)lh_insert(conf,v); | ||
| 712 | if (vv != NULL) | ||
| 713 | { | ||
| 714 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
| 715 | fprintf(stderr,"internal fault\n"); | ||
| 716 | #endif | ||
| 717 | abort(); | ||
| 718 | } | ||
| 719 | ok=1; | ||
| 720 | err: | ||
| 721 | if (!ok) | ||
| 722 | { | ||
| 723 | if (sk != NULL) sk_free(sk); | ||
| 724 | if (v != NULL) Free(v); | ||
| 725 | v=NULL; | ||
| 726 | } | ||
| 727 | return(v); | ||
| 728 | } | ||
| 729 | |||
| 730 | IMPLEMENT_STACK_OF(CONF_VALUE) | ||
diff --git a/src/lib/libcrypto/des/supp.c b/src/lib/libcrypto/des/supp.c deleted file mode 100644 index 7afea886a9..0000000000 --- a/src/lib/libcrypto/des/supp.c +++ /dev/null | |||
| @@ -1,107 +0,0 @@ | |||
| 1 | /* $OpenBSD: supp.c,v 1.3 2000/03/02 00:29:51 todd Exp $ */ | ||
| 2 | /* crypto/des/supp.c */ | ||
| 3 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * This package is an SSL implementation written | ||
| 7 | * by Eric Young (eay@cryptsoft.com). | ||
| 8 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 9 | * | ||
| 10 | * This library is free for commercial and non-commercial use as long as | ||
| 11 | * the following conditions are aheared to. The following conditions | ||
| 12 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 13 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 14 | * included with this distribution is covered by the same copyright terms | ||
| 15 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 16 | * | ||
| 17 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 18 | * the code are not to be removed. | ||
| 19 | * If this package is used in a product, Eric Young should be given attribution | ||
| 20 | * as the author of the parts of the library used. | ||
| 21 | * This can be in the form of a textual message at program startup or | ||
| 22 | * in documentation (online or textual) provided with the package. | ||
| 23 | * | ||
| 24 | * Redistribution and use in source and binary forms, with or without | ||
| 25 | * modification, are permitted provided that the following conditions | ||
| 26 | * are met: | ||
| 27 | * 1. Redistributions of source code must retain the copyright | ||
| 28 | * notice, this list of conditions and the following disclaimer. | ||
| 29 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 30 | * notice, this list of conditions and the following disclaimer in the | ||
| 31 | * documentation and/or other materials provided with the distribution. | ||
| 32 | * 3. All advertising materials mentioning features or use of this software | ||
| 33 | * must display the following acknowledgement: | ||
| 34 | * "This product includes cryptographic software written by | ||
| 35 | * Eric Young (eay@cryptsoft.com)" | ||
| 36 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 37 | * being used are not cryptographic related :-). | ||
| 38 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 39 | * the apps directory (application code) you must include an acknowledgement: | ||
| 40 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 41 | * | ||
| 42 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 43 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 44 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 45 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 46 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 47 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 48 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 49 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 50 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 51 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 52 | * SUCH DAMAGE. | ||
| 53 | * | ||
| 54 | * The licence and distribution terms for any publically available version or | ||
| 55 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 56 | * copied and put under another distribution licence | ||
| 57 | * [including the GNU Public Licence.] | ||
| 58 | */ | ||
| 59 | |||
| 60 | /* | ||
| 61 | * Copyright (c) 1995 | ||
| 62 | * Mark Murray. All rights reserved. | ||
| 63 | * | ||
| 64 | * Redistribution and use in source and binary forms, with or without | ||
| 65 | * modification, are permitted provided that the following conditions | ||
| 66 | * are met: | ||
| 67 | * 1. Redistributions of source code must retain the above copyright | ||
| 68 | * notice, this list of conditions and the following disclaimer. | ||
| 69 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 70 | * notice, this list of conditions and the following disclaimer in the | ||
| 71 | * documentation and/or other materials provided with the distribution. | ||
| 72 | * 3. All advertising materials mentioning features or use of this software | ||
| 73 | * must display the following acknowledgement: | ||
| 74 | * This product includes software developed by Mark Murray | ||
| 75 | * 4. Neither the name of the author nor the names of any co-contributors | ||
| 76 | * may be used to endorse or promote products derived from this software | ||
| 77 | * without specific prior written permission. | ||
| 78 | * | ||
| 79 | * THIS SOFTWARE IS PROVIDED BY MARK MURRAY AND CONTRIBUTORS ``AS IS'' AND | ||
| 80 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 81 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 82 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 83 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 84 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 85 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 86 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 87 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 88 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 89 | * SUCH DAMAGE. | ||
| 90 | * | ||
| 91 | */ | ||
| 92 | |||
| 93 | #include <stdio.h> | ||
| 94 | #include "des_locl.h" | ||
| 95 | |||
| 96 | void des_cblock_print_file(const_des_cblock *cb, FILE *fp) | ||
| 97 | { | ||
| 98 | int i; | ||
| 99 | const unsigned int *p = (const unsigned int *)cb; | ||
| 100 | |||
| 101 | fprintf(fp, " 0x { "); | ||
| 102 | for (i = 0; i < 8; i++) { | ||
| 103 | fprintf(fp, "%x", p[i]); | ||
| 104 | if (i != 7) fprintf(fp, ", "); | ||
| 105 | } | ||
| 106 | fprintf(fp, " }"); | ||
| 107 | } | ||
diff --git a/src/lib/libcrypto/engine/engine_err.c b/src/lib/libcrypto/engine/engine_err.c deleted file mode 100644 index 0d7a31f6d5..0000000000 --- a/src/lib/libcrypto/engine/engine_err.c +++ /dev/null | |||
| @@ -1,183 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_err.c */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@OpenSSL.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | * ==================================================================== | ||
| 49 | * | ||
| 50 | * This product includes cryptographic software written by Eric Young | ||
| 51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 52 | * Hudson (tjh@cryptsoft.com). | ||
| 53 | * | ||
| 54 | */ | ||
| 55 | |||
| 56 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes | ||
| 57 | * made to it will be overwritten when the script next updates this file, | ||
| 58 | * only reason strings will be preserved. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | #include <openssl/engine.h> | ||
| 64 | |||
| 65 | /* BEGIN ERROR CODES */ | ||
| 66 | #ifndef NO_ERR | ||
| 67 | static ERR_STRING_DATA ENGINE_str_functs[]= | ||
| 68 | { | ||
| 69 | {ERR_PACK(0,ENGINE_F_ATALLA_FINISH,0), "ATALLA_FINISH"}, | ||
| 70 | {ERR_PACK(0,ENGINE_F_ATALLA_INIT,0), "ATALLA_INIT"}, | ||
| 71 | {ERR_PACK(0,ENGINE_F_ATALLA_MOD_EXP,0), "ATALLA_MOD_EXP"}, | ||
| 72 | {ERR_PACK(0,ENGINE_F_ATALLA_RSA_MOD_EXP,0), "ATALLA_RSA_MOD_EXP"}, | ||
| 73 | {ERR_PACK(0,ENGINE_F_CSWIFT_DSA_SIGN,0), "CSWIFT_DSA_SIGN"}, | ||
| 74 | {ERR_PACK(0,ENGINE_F_CSWIFT_DSA_VERIFY,0), "CSWIFT_DSA_VERIFY"}, | ||
| 75 | {ERR_PACK(0,ENGINE_F_CSWIFT_FINISH,0), "CSWIFT_FINISH"}, | ||
| 76 | {ERR_PACK(0,ENGINE_F_CSWIFT_INIT,0), "CSWIFT_INIT"}, | ||
| 77 | {ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP,0), "CSWIFT_MOD_EXP"}, | ||
| 78 | {ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP_CRT,0), "CSWIFT_MOD_EXP_CRT"}, | ||
| 79 | {ERR_PACK(0,ENGINE_F_CSWIFT_RSA_MOD_EXP,0), "CSWIFT_RSA_MOD_EXP"}, | ||
| 80 | {ERR_PACK(0,ENGINE_F_ENGINE_ADD,0), "ENGINE_add"}, | ||
| 81 | {ERR_PACK(0,ENGINE_F_ENGINE_BY_ID,0), "ENGINE_by_id"}, | ||
| 82 | {ERR_PACK(0,ENGINE_F_ENGINE_CTRL,0), "ENGINE_ctrl"}, | ||
| 83 | {ERR_PACK(0,ENGINE_F_ENGINE_FINISH,0), "ENGINE_finish"}, | ||
| 84 | {ERR_PACK(0,ENGINE_F_ENGINE_FREE,0), "ENGINE_free"}, | ||
| 85 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP,0), "ENGINE_get_BN_mod_exp"}, | ||
| 86 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT,0), "ENGINE_get_BN_mod_exp_crt"}, | ||
| 87 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_CTRL_FUNCTION,0), "ENGINE_get_ctrl_function"}, | ||
| 88 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_DH,0), "ENGINE_get_DH"}, | ||
| 89 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_DSA,0), "ENGINE_get_DSA"}, | ||
| 90 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_FINISH_FUNCTION,0), "ENGINE_get_finish_function"}, | ||
| 91 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_ID,0), "ENGINE_get_id"}, | ||
| 92 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_INIT_FUNCTION,0), "ENGINE_get_init_function"}, | ||
| 93 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_NAME,0), "ENGINE_get_name"}, | ||
| 94 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_NEXT,0), "ENGINE_get_next"}, | ||
| 95 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_PREV,0), "ENGINE_get_prev"}, | ||
| 96 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_RAND,0), "ENGINE_get_RAND"}, | ||
| 97 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_RSA,0), "ENGINE_get_RSA"}, | ||
| 98 | {ERR_PACK(0,ENGINE_F_ENGINE_INIT,0), "ENGINE_init"}, | ||
| 99 | {ERR_PACK(0,ENGINE_F_ENGINE_LIST_ADD,0), "ENGINE_LIST_ADD"}, | ||
| 100 | {ERR_PACK(0,ENGINE_F_ENGINE_LIST_REMOVE,0), "ENGINE_LIST_REMOVE"}, | ||
| 101 | {ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,0), "ENGINE_load_private_key"}, | ||
| 102 | {ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,0), "ENGINE_load_public_key"}, | ||
| 103 | {ERR_PACK(0,ENGINE_F_ENGINE_NEW,0), "ENGINE_new"}, | ||
| 104 | {ERR_PACK(0,ENGINE_F_ENGINE_REMOVE,0), "ENGINE_remove"}, | ||
| 105 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP,0), "ENGINE_set_BN_mod_exp"}, | ||
| 106 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT,0), "ENGINE_set_BN_mod_exp_crt"}, | ||
| 107 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_CTRL_FUNCTION,0), "ENGINE_set_ctrl_function"}, | ||
| 108 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DEFAULT_TYPE,0), "ENGINE_SET_DEFAULT_TYPE"}, | ||
| 109 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DH,0), "ENGINE_set_DH"}, | ||
| 110 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DSA,0), "ENGINE_set_DSA"}, | ||
| 111 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_FINISH_FUNCTION,0), "ENGINE_set_finish_function"}, | ||
| 112 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_ID,0), "ENGINE_set_id"}, | ||
| 113 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_INIT_FUNCTION,0), "ENGINE_set_init_function"}, | ||
| 114 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_NAME,0), "ENGINE_set_name"}, | ||
| 115 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_RAND,0), "ENGINE_set_RAND"}, | ||
| 116 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_RSA,0), "ENGINE_set_RSA"}, | ||
| 117 | {ERR_PACK(0,ENGINE_F_ENGINE_UNLOAD_KEY,0), "ENGINE_UNLOAD_KEY"}, | ||
| 118 | {ERR_PACK(0,ENGINE_F_HWCRHK_CTRL,0), "HWCRHK_CTRL"}, | ||
| 119 | {ERR_PACK(0,ENGINE_F_HWCRHK_FINISH,0), "HWCRHK_FINISH"}, | ||
| 120 | {ERR_PACK(0,ENGINE_F_HWCRHK_GET_PASS,0), "HWCRHK_GET_PASS"}, | ||
| 121 | {ERR_PACK(0,ENGINE_F_HWCRHK_INIT,0), "HWCRHK_INIT"}, | ||
| 122 | {ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PRIVKEY,0), "HWCRHK_LOAD_PRIVKEY"}, | ||
| 123 | {ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PUBKEY,0), "HWCRHK_LOAD_PUBKEY"}, | ||
| 124 | {ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP,0), "HWCRHK_MOD_EXP"}, | ||
| 125 | {ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP_CRT,0), "HWCRHK_MOD_EXP_CRT"}, | ||
| 126 | {ERR_PACK(0,ENGINE_F_HWCRHK_RAND_BYTES,0), "HWCRHK_RAND_BYTES"}, | ||
| 127 | {ERR_PACK(0,ENGINE_F_HWCRHK_RSA_MOD_EXP,0), "HWCRHK_RSA_MOD_EXP"}, | ||
| 128 | {ERR_PACK(0,ENGINE_F_LOG_MESSAGE,0), "LOG_MESSAGE"}, | ||
| 129 | {0,NULL} | ||
| 130 | }; | ||
| 131 | |||
| 132 | static ERR_STRING_DATA ENGINE_str_reasons[]= | ||
| 133 | { | ||
| 134 | {ENGINE_R_ALREADY_LOADED ,"already loaded"}, | ||
| 135 | {ENGINE_R_BIO_WAS_FREED ,"bio was freed"}, | ||
| 136 | {ENGINE_R_BN_CTX_FULL ,"BN_CTX full"}, | ||
| 137 | {ENGINE_R_BN_EXPAND_FAIL ,"bn_expand fail"}, | ||
| 138 | {ENGINE_R_CHIL_ERROR ,"chil error"}, | ||
| 139 | {ENGINE_R_CONFLICTING_ENGINE_ID ,"conflicting engine id"}, | ||
| 140 | {ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"}, | ||
| 141 | {ENGINE_R_DSO_FAILURE ,"DSO failure"}, | ||
| 142 | {ENGINE_R_ENGINE_IS_NOT_IN_LIST ,"engine is not in the list"}, | ||
| 143 | {ENGINE_R_FAILED_LOADING_PRIVATE_KEY ,"failed loading private key"}, | ||
| 144 | {ENGINE_R_FAILED_LOADING_PUBLIC_KEY ,"failed loading public key"}, | ||
| 145 | {ENGINE_R_FINISH_FAILED ,"finish failed"}, | ||
| 146 | {ENGINE_R_GET_HANDLE_FAILED ,"could not obtain hardware handle"}, | ||
| 147 | {ENGINE_R_ID_OR_NAME_MISSING ,"'id' or 'name' missing"}, | ||
| 148 | {ENGINE_R_INIT_FAILED ,"init failed"}, | ||
| 149 | {ENGINE_R_INTERNAL_LIST_ERROR ,"internal list error"}, | ||
| 150 | {ENGINE_R_MISSING_KEY_COMPONENTS ,"missing key components"}, | ||
| 151 | {ENGINE_R_NOT_INITIALISED ,"not initialised"}, | ||
| 152 | {ENGINE_R_NOT_LOADED ,"not loaded"}, | ||
| 153 | {ENGINE_R_NO_CALLBACK ,"no callback"}, | ||
| 154 | {ENGINE_R_NO_CONTROL_FUNCTION ,"no control function"}, | ||
| 155 | {ENGINE_R_NO_KEY ,"no key"}, | ||
| 156 | {ENGINE_R_NO_LOAD_FUNCTION ,"no load function"}, | ||
| 157 | {ENGINE_R_NO_REFERENCE ,"no reference"}, | ||
| 158 | {ENGINE_R_NO_SUCH_ENGINE ,"no such engine"}, | ||
| 159 | {ENGINE_R_NO_UNLOAD_FUNCTION ,"no unload function"}, | ||
| 160 | {ENGINE_R_PROVIDE_PARAMETERS ,"provide parameters"}, | ||
| 161 | {ENGINE_R_REQUEST_FAILED ,"request failed"}, | ||
| 162 | {ENGINE_R_REQUEST_FALLBACK ,"request fallback"}, | ||
| 163 | {ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"}, | ||
| 164 | {ENGINE_R_UNIT_FAILURE ,"unit failure"}, | ||
| 165 | {0,NULL} | ||
| 166 | }; | ||
| 167 | |||
| 168 | #endif | ||
| 169 | |||
| 170 | void ERR_load_ENGINE_strings(void) | ||
| 171 | { | ||
| 172 | static int init=1; | ||
| 173 | |||
| 174 | if (init) | ||
| 175 | { | ||
| 176 | init=0; | ||
| 177 | #ifndef NO_ERR | ||
| 178 | ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_functs); | ||
| 179 | ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_reasons); | ||
| 180 | #endif | ||
| 181 | |||
| 182 | } | ||
| 183 | } | ||
diff --git a/src/lib/libcrypto/engine/engine_int.h b/src/lib/libcrypto/engine/engine_int.h deleted file mode 100644 index 447fa2a320..0000000000 --- a/src/lib/libcrypto/engine/engine_int.h +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_int.h */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_ENGINE_INT_H | ||
| 60 | #define HEADER_ENGINE_INT_H | ||
| 61 | |||
| 62 | #include <openssl/rsa.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/dh.h> | ||
| 65 | #include <openssl/rand.h> | ||
| 66 | #include <openssl/bn.h> | ||
| 67 | #include <openssl/evp.h> | ||
| 68 | |||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 73 | /* Bitwise OR-able values for the "flags" variable in ENGINE. */ | ||
| 74 | #define ENGINE_FLAGS_MALLOCED 0x0001 | ||
| 75 | |||
| 76 | #ifndef HEADER_ENGINE_H | ||
| 77 | /* Regrettably, we need to reproduce the "BN" function types here | ||
| 78 | * because there is no such "BIGNUM_METHOD" as there is with RSA, | ||
| 79 | * DSA, etc. We do this so that we don't have a case where engine.h | ||
| 80 | * and engine_int.h conflict with each other. */ | ||
| 81 | typedef int (*BN_MOD_EXP)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 82 | const BIGNUM *m, BN_CTX *ctx); | ||
| 83 | |||
| 84 | /* private key operation for RSA, provided seperately in case other | ||
| 85 | * RSA implementations wish to use it. */ | ||
| 86 | typedef int (*BN_MOD_EXP_CRT)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 87 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 88 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 89 | |||
| 90 | /* Generic function pointer */ | ||
| 91 | typedef int (*ENGINE_GEN_FUNC_PTR)(); | ||
| 92 | /* Generic function pointer taking no arguments */ | ||
| 93 | typedef int (*ENGINE_GEN_INT_FUNC_PTR)(void); | ||
| 94 | /* Specific control function pointer */ | ||
| 95 | typedef int (*ENGINE_CTRL_FUNC_PTR)(int cmd, long i, void *p, void (*f)()); | ||
| 96 | |||
| 97 | #endif | ||
| 98 | |||
| 99 | /* This is a structure for storing implementations of various crypto | ||
| 100 | * algorithms and functions. */ | ||
| 101 | typedef struct engine_st | ||
| 102 | { | ||
| 103 | const char *id; | ||
| 104 | const char *name; | ||
| 105 | RSA_METHOD *rsa_meth; | ||
| 106 | DSA_METHOD *dsa_meth; | ||
| 107 | DH_METHOD *dh_meth; | ||
| 108 | RAND_METHOD *rand_meth; | ||
| 109 | BN_MOD_EXP bn_mod_exp; | ||
| 110 | BN_MOD_EXP_CRT bn_mod_exp_crt; | ||
| 111 | int (*init)(void); | ||
| 112 | int (*finish)(void); | ||
| 113 | int (*ctrl)(int cmd, long i, void *p, void (*f)()); | ||
| 114 | EVP_PKEY *(*load_privkey)(const char *key_id, const char *passphrase); | ||
| 115 | EVP_PKEY *(*load_pubkey)(const char *key_id, const char *passphrase); | ||
| 116 | int flags; | ||
| 117 | /* reference count on the structure itself */ | ||
| 118 | int struct_ref; | ||
| 119 | /* reference count on usability of the engine type. NB: This | ||
| 120 | * controls the loading and initialisation of any functionlity | ||
| 121 | * required by this engine, whereas the previous count is | ||
| 122 | * simply to cope with (de)allocation of this structure. Hence, | ||
| 123 | * running_ref <= struct_ref at all times. */ | ||
| 124 | int funct_ref; | ||
| 125 | /* Used to maintain the linked-list of engines. */ | ||
| 126 | struct engine_st *prev; | ||
| 127 | struct engine_st *next; | ||
| 128 | } ENGINE; | ||
| 129 | |||
| 130 | /* BUILT-IN ENGINES. (these functions are only ever called once and | ||
| 131 | * do not return references - they are purely for bootstrapping). */ | ||
| 132 | |||
| 133 | /* Returns a structure of software only methods (the default). */ | ||
| 134 | ENGINE *ENGINE_openssl(); | ||
| 135 | |||
| 136 | #ifndef NO_HW | ||
| 137 | |||
| 138 | #ifndef NO_HW_CSWIFT | ||
| 139 | /* Returns a structure of cswift methods ... NB: This can exist and be | ||
| 140 | * "used" even on non-cswift systems because the "init" will fail if the | ||
| 141 | * card/library are not found. */ | ||
| 142 | ENGINE *ENGINE_cswift(); | ||
| 143 | #endif /* !NO_HW_CSWIFT */ | ||
| 144 | |||
| 145 | #ifndef NO_HW_NCIPHER | ||
| 146 | ENGINE *ENGINE_ncipher(); | ||
| 147 | #endif /* !NO_HW_NCIPHER */ | ||
| 148 | |||
| 149 | #ifndef NO_HW_ATALLA | ||
| 150 | /* Returns a structure of atalla methods. */ | ||
| 151 | ENGINE *ENGINE_atalla(); | ||
| 152 | #endif /* !NO_HW_ATALLA */ | ||
| 153 | |||
| 154 | #endif /* !NO_HW */ | ||
| 155 | |||
| 156 | #ifdef __cplusplus | ||
| 157 | } | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #endif /* HEADER_ENGINE_INT_H */ | ||
diff --git a/src/lib/libcrypto/engine/engine_lib.c b/src/lib/libcrypto/engine/engine_lib.c deleted file mode 100644 index d6e9109f6e..0000000000 --- a/src/lib/libcrypto/engine/engine_lib.c +++ /dev/null | |||
| @@ -1,489 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_lib.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <openssl/crypto.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "engine_int.h" | ||
| 62 | #include <openssl/engine.h> | ||
| 63 | |||
| 64 | /* These pointers each have their own "functional reference" when they | ||
| 65 | * are non-NULL. Similarly, when they are retrieved by a call to | ||
| 66 | * ENGINE_get_default_[RSA|DSA|...] the returned pointer is also a | ||
| 67 | * reference and the caller is responsible for freeing that when they | ||
| 68 | * are finished with it (with a call to ENGINE_finish() *NOT* just | ||
| 69 | * ENGINE_free()!!!!!!). */ | ||
| 70 | static ENGINE *engine_def_rsa = NULL; | ||
| 71 | static ENGINE *engine_def_dsa = NULL; | ||
| 72 | static ENGINE *engine_def_dh = NULL; | ||
| 73 | static ENGINE *engine_def_rand = NULL; | ||
| 74 | static ENGINE *engine_def_bn_mod_exp = NULL; | ||
| 75 | static ENGINE *engine_def_bn_mod_exp_crt = NULL; | ||
| 76 | /* A static "once-only" flag used to control if/when the above were | ||
| 77 | * initialised to suitable start-up defaults. */ | ||
| 78 | static int engine_def_flag = 0; | ||
| 79 | |||
| 80 | /* This is used in certain static utility functions to save code | ||
| 81 | * repetition for per-algorithm functions. */ | ||
| 82 | typedef enum { | ||
| 83 | ENGINE_TYPE_RSA, | ||
| 84 | ENGINE_TYPE_DSA, | ||
| 85 | ENGINE_TYPE_DH, | ||
| 86 | ENGINE_TYPE_RAND, | ||
| 87 | ENGINE_TYPE_BN_MOD_EXP, | ||
| 88 | ENGINE_TYPE_BN_MOD_EXP_CRT | ||
| 89 | } ENGINE_TYPE; | ||
| 90 | |||
| 91 | static void engine_def_check_util(ENGINE **def, ENGINE *val) | ||
| 92 | { | ||
| 93 | *def = val; | ||
| 94 | val->struct_ref++; | ||
| 95 | val->funct_ref++; | ||
| 96 | } | ||
| 97 | |||
| 98 | /* In a slight break with convention - this static function must be | ||
| 99 | * called *outside* any locking of CRYPTO_LOCK_ENGINE. */ | ||
| 100 | static void engine_def_check(void) | ||
| 101 | { | ||
| 102 | ENGINE *e; | ||
| 103 | if(engine_def_flag) | ||
| 104 | return; | ||
| 105 | e = ENGINE_get_first(); | ||
| 106 | if(e == NULL) | ||
| 107 | /* The list is empty ... not much we can do! */ | ||
| 108 | return; | ||
| 109 | /* We have a structural reference, see if getting a functional | ||
| 110 | * reference is possible. This is done to cope with init errors | ||
| 111 | * in the engine - the following locked code does a bunch of | ||
| 112 | * manual "ENGINE_init"s which do *not* allow such an init | ||
| 113 | * error so this is worth doing. */ | ||
| 114 | if(ENGINE_init(e)) | ||
| 115 | { | ||
| 116 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 117 | /* Doing another check here prevents an obvious race | ||
| 118 | * condition because the whole function itself cannot | ||
| 119 | * be locked. */ | ||
| 120 | if(engine_def_flag) | ||
| 121 | goto skip_set_defaults; | ||
| 122 | /* OK, we got a functional reference, so we get one each | ||
| 123 | * for the defaults too. */ | ||
| 124 | engine_def_check_util(&engine_def_rsa, e); | ||
| 125 | engine_def_check_util(&engine_def_dsa, e); | ||
| 126 | engine_def_check_util(&engine_def_dh, e); | ||
| 127 | engine_def_check_util(&engine_def_rand, e); | ||
| 128 | engine_def_check_util(&engine_def_bn_mod_exp, e); | ||
| 129 | engine_def_check_util(&engine_def_bn_mod_exp_crt, e); | ||
| 130 | engine_def_flag = 1; | ||
| 131 | skip_set_defaults: | ||
| 132 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 133 | /* The "if" needs to be balanced out. */ | ||
| 134 | ENGINE_finish(e); | ||
| 135 | } | ||
| 136 | /* We need to balance out the fact we obtained a structural | ||
| 137 | * reference to begin with from ENGINE_get_first(). */ | ||
| 138 | ENGINE_free(e); | ||
| 139 | } | ||
| 140 | |||
| 141 | /* Initialise a engine type for use (or up its functional reference count | ||
| 142 | * if it's already in use). */ | ||
| 143 | int ENGINE_init(ENGINE *e) | ||
| 144 | { | ||
| 145 | int to_return = 1; | ||
| 146 | |||
| 147 | if(e == NULL) | ||
| 148 | { | ||
| 149 | ENGINEerr(ENGINE_F_ENGINE_INIT,ERR_R_PASSED_NULL_PARAMETER); | ||
| 150 | return 0; | ||
| 151 | } | ||
| 152 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 153 | if((e->funct_ref == 0) && e->init) | ||
| 154 | /* This is the first functional reference and the engine | ||
| 155 | * requires initialisation so we do it now. */ | ||
| 156 | to_return = e->init(); | ||
| 157 | if(to_return) | ||
| 158 | { | ||
| 159 | /* OK, we return a functional reference which is also a | ||
| 160 | * structural reference. */ | ||
| 161 | e->struct_ref++; | ||
| 162 | e->funct_ref++; | ||
| 163 | } | ||
| 164 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 165 | return to_return; | ||
| 166 | } | ||
| 167 | |||
| 168 | /* Free a functional reference to a engine type */ | ||
| 169 | int ENGINE_finish(ENGINE *e) | ||
| 170 | { | ||
| 171 | int to_return = 1; | ||
| 172 | |||
| 173 | if(e == NULL) | ||
| 174 | { | ||
| 175 | ENGINEerr(ENGINE_F_ENGINE_FINISH,ERR_R_PASSED_NULL_PARAMETER); | ||
| 176 | return 0; | ||
| 177 | } | ||
| 178 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 179 | if((e->funct_ref == 1) && e->finish) | ||
| 180 | #if 0 | ||
| 181 | /* This is the last functional reference and the engine | ||
| 182 | * requires cleanup so we do it now. */ | ||
| 183 | to_return = e->finish(); | ||
| 184 | if(to_return) | ||
| 185 | { | ||
| 186 | /* Cleanup the functional reference which is also a | ||
| 187 | * structural reference. */ | ||
| 188 | e->struct_ref--; | ||
| 189 | e->funct_ref--; | ||
| 190 | } | ||
| 191 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 192 | #else | ||
| 193 | /* I'm going to deliberately do a convoluted version of this | ||
| 194 | * piece of code because we don't want "finish" functions | ||
| 195 | * being called inside a locked block of code, if at all | ||
| 196 | * possible. I'd rather have this call take an extra couple | ||
| 197 | * of ticks than have throughput serialised on a externally- | ||
| 198 | * provided callback function that may conceivably never come | ||
| 199 | * back. :-( */ | ||
| 200 | { | ||
| 201 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 202 | /* CODE ALERT: This *IS* supposed to be "=" and NOT "==" :-) */ | ||
| 203 | if((to_return = e->finish())) | ||
| 204 | { | ||
| 205 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 206 | /* Cleanup the functional reference which is also a | ||
| 207 | * structural reference. */ | ||
| 208 | e->struct_ref--; | ||
| 209 | e->funct_ref--; | ||
| 210 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 211 | } | ||
| 212 | } | ||
| 213 | else | ||
| 214 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 215 | #endif | ||
| 216 | return to_return; | ||
| 217 | } | ||
| 218 | |||
| 219 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, | ||
| 220 | const char *passphrase) | ||
| 221 | { | ||
| 222 | EVP_PKEY *pkey; | ||
| 223 | |||
| 224 | if(e == NULL) | ||
| 225 | { | ||
| 226 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 227 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 228 | return 0; | ||
| 229 | } | ||
| 230 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 231 | if(e->funct_ref == 0) | ||
| 232 | { | ||
| 233 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 234 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 235 | ENGINE_R_NOT_INITIALISED); | ||
| 236 | return 0; | ||
| 237 | } | ||
| 238 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 239 | if (!e->load_privkey) | ||
| 240 | { | ||
| 241 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 242 | ENGINE_R_NO_LOAD_FUNCTION); | ||
| 243 | return 0; | ||
| 244 | } | ||
| 245 | pkey = e->load_privkey(key_id, passphrase); | ||
| 246 | if (!pkey) | ||
| 247 | { | ||
| 248 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 249 | ENGINE_R_FAILED_LOADING_PRIVATE_KEY); | ||
| 250 | return 0; | ||
| 251 | } | ||
| 252 | return pkey; | ||
| 253 | } | ||
| 254 | |||
| 255 | EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, | ||
| 256 | const char *passphrase) | ||
| 257 | { | ||
| 258 | EVP_PKEY *pkey; | ||
| 259 | |||
| 260 | if(e == NULL) | ||
| 261 | { | ||
| 262 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 263 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 264 | return 0; | ||
| 265 | } | ||
| 266 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 267 | if(e->funct_ref == 0) | ||
| 268 | { | ||
| 269 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 270 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 271 | ENGINE_R_NOT_INITIALISED); | ||
| 272 | return 0; | ||
| 273 | } | ||
| 274 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 275 | if (!e->load_pubkey) | ||
| 276 | { | ||
| 277 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 278 | ENGINE_R_NO_LOAD_FUNCTION); | ||
| 279 | return 0; | ||
| 280 | } | ||
| 281 | pkey = e->load_pubkey(key_id, passphrase); | ||
| 282 | if (!pkey) | ||
| 283 | { | ||
| 284 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 285 | ENGINE_R_FAILED_LOADING_PUBLIC_KEY); | ||
| 286 | return 0; | ||
| 287 | } | ||
| 288 | return pkey; | ||
| 289 | } | ||
| 290 | |||
| 291 | int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) | ||
| 292 | { | ||
| 293 | if(e == NULL) | ||
| 294 | { | ||
| 295 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 296 | return 0; | ||
| 297 | } | ||
| 298 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 299 | if(e->struct_ref == 0) | ||
| 300 | { | ||
| 301 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 302 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_REFERENCE); | ||
| 303 | return 0; | ||
| 304 | } | ||
| 305 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 306 | if (!e->ctrl) | ||
| 307 | { | ||
| 308 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_CONTROL_FUNCTION); | ||
| 309 | return 0; | ||
| 310 | } | ||
| 311 | return e->ctrl(cmd, i, p, f); | ||
| 312 | } | ||
| 313 | |||
| 314 | static ENGINE *engine_get_default_type(ENGINE_TYPE t) | ||
| 315 | { | ||
| 316 | ENGINE *ret = NULL; | ||
| 317 | |||
| 318 | /* engine_def_check is lean and mean and won't replace any | ||
| 319 | * prior default engines ... so we must ensure that it is always | ||
| 320 | * the first function to get to touch the default values. */ | ||
| 321 | engine_def_check(); | ||
| 322 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 323 | switch(t) | ||
| 324 | { | ||
| 325 | case ENGINE_TYPE_RSA: | ||
| 326 | ret = engine_def_rsa; break; | ||
| 327 | case ENGINE_TYPE_DSA: | ||
| 328 | ret = engine_def_dsa; break; | ||
| 329 | case ENGINE_TYPE_DH: | ||
| 330 | ret = engine_def_dh; break; | ||
| 331 | case ENGINE_TYPE_RAND: | ||
| 332 | ret = engine_def_rand; break; | ||
| 333 | case ENGINE_TYPE_BN_MOD_EXP: | ||
| 334 | ret = engine_def_bn_mod_exp; break; | ||
| 335 | case ENGINE_TYPE_BN_MOD_EXP_CRT: | ||
| 336 | ret = engine_def_bn_mod_exp_crt; break; | ||
| 337 | } | ||
| 338 | /* Unforunately we can't do this work outside the lock with a | ||
| 339 | * call to ENGINE_init() because that would leave a race | ||
| 340 | * condition open. */ | ||
| 341 | if(ret) | ||
| 342 | { | ||
| 343 | ret->struct_ref++; | ||
| 344 | ret->funct_ref++; | ||
| 345 | } | ||
| 346 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 347 | return ret; | ||
| 348 | } | ||
| 349 | |||
| 350 | ENGINE *ENGINE_get_default_RSA(void) | ||
| 351 | { | ||
| 352 | return engine_get_default_type(ENGINE_TYPE_RSA); | ||
| 353 | } | ||
| 354 | |||
| 355 | ENGINE *ENGINE_get_default_DSA(void) | ||
| 356 | { | ||
| 357 | return engine_get_default_type(ENGINE_TYPE_DSA); | ||
| 358 | } | ||
| 359 | |||
| 360 | ENGINE *ENGINE_get_default_DH(void) | ||
| 361 | { | ||
| 362 | return engine_get_default_type(ENGINE_TYPE_DH); | ||
| 363 | } | ||
| 364 | |||
| 365 | ENGINE *ENGINE_get_default_RAND(void) | ||
| 366 | { | ||
| 367 | return engine_get_default_type(ENGINE_TYPE_RAND); | ||
| 368 | } | ||
| 369 | |||
| 370 | ENGINE *ENGINE_get_default_BN_mod_exp(void) | ||
| 371 | { | ||
| 372 | return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP); | ||
| 373 | } | ||
| 374 | |||
| 375 | ENGINE *ENGINE_get_default_BN_mod_exp_crt(void) | ||
| 376 | { | ||
| 377 | return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT); | ||
| 378 | } | ||
| 379 | |||
| 380 | static int engine_set_default_type(ENGINE_TYPE t, ENGINE *e) | ||
| 381 | { | ||
| 382 | ENGINE *old = NULL; | ||
| 383 | |||
| 384 | if(e == NULL) | ||
| 385 | { | ||
| 386 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 387 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 388 | return 0; | ||
| 389 | } | ||
| 390 | /* engine_def_check is lean and mean and won't replace any | ||
| 391 | * prior default engines ... so we must ensure that it is always | ||
| 392 | * the first function to get to touch the default values. */ | ||
| 393 | engine_def_check(); | ||
| 394 | /* Attempt to get a functional reference (we need one anyway, but | ||
| 395 | * also, 'e' may be just a structural reference being passed in so | ||
| 396 | * this call may actually be the first). */ | ||
| 397 | if(!ENGINE_init(e)) | ||
| 398 | { | ||
| 399 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 400 | ENGINE_R_INIT_FAILED); | ||
| 401 | return 0; | ||
| 402 | } | ||
| 403 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 404 | switch(t) | ||
| 405 | { | ||
| 406 | case ENGINE_TYPE_RSA: | ||
| 407 | old = engine_def_rsa; | ||
| 408 | engine_def_rsa = e; break; | ||
| 409 | case ENGINE_TYPE_DSA: | ||
| 410 | old = engine_def_dsa; | ||
| 411 | engine_def_dsa = e; break; | ||
| 412 | case ENGINE_TYPE_DH: | ||
| 413 | old = engine_def_dh; | ||
| 414 | engine_def_dh = e; break; | ||
| 415 | case ENGINE_TYPE_RAND: | ||
| 416 | old = engine_def_rand; | ||
| 417 | engine_def_rand = e; break; | ||
| 418 | case ENGINE_TYPE_BN_MOD_EXP: | ||
| 419 | old = engine_def_bn_mod_exp; | ||
| 420 | engine_def_bn_mod_exp = e; break; | ||
| 421 | case ENGINE_TYPE_BN_MOD_EXP_CRT: | ||
| 422 | old = engine_def_bn_mod_exp_crt; | ||
| 423 | engine_def_bn_mod_exp_crt = e; break; | ||
| 424 | } | ||
| 425 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 426 | /* If we've replaced a previous value, then we need to remove the | ||
| 427 | * functional reference we had. */ | ||
| 428 | if(old && !ENGINE_finish(old)) | ||
| 429 | { | ||
| 430 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 431 | ENGINE_R_FINISH_FAILED); | ||
| 432 | return 0; | ||
| 433 | } | ||
| 434 | return 1; | ||
| 435 | } | ||
| 436 | |||
| 437 | int ENGINE_set_default_RSA(ENGINE *e) | ||
| 438 | { | ||
| 439 | return engine_set_default_type(ENGINE_TYPE_RSA, e); | ||
| 440 | } | ||
| 441 | |||
| 442 | int ENGINE_set_default_DSA(ENGINE *e) | ||
| 443 | { | ||
| 444 | return engine_set_default_type(ENGINE_TYPE_DSA, e); | ||
| 445 | } | ||
| 446 | |||
| 447 | int ENGINE_set_default_DH(ENGINE *e) | ||
| 448 | { | ||
| 449 | return engine_set_default_type(ENGINE_TYPE_DH, e); | ||
| 450 | } | ||
| 451 | |||
| 452 | int ENGINE_set_default_RAND(ENGINE *e) | ||
| 453 | { | ||
| 454 | return engine_set_default_type(ENGINE_TYPE_RAND, e); | ||
| 455 | } | ||
| 456 | |||
| 457 | int ENGINE_set_default_BN_mod_exp(ENGINE *e) | ||
| 458 | { | ||
| 459 | return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP, e); | ||
| 460 | } | ||
| 461 | |||
| 462 | int ENGINE_set_default_BN_mod_exp_crt(ENGINE *e) | ||
| 463 | { | ||
| 464 | return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT, e); | ||
| 465 | } | ||
| 466 | |||
| 467 | int ENGINE_set_default(ENGINE *e, unsigned int flags) | ||
| 468 | { | ||
| 469 | if((flags & ENGINE_METHOD_RSA) && e->rsa_meth && | ||
| 470 | !ENGINE_set_default_RSA(e)) | ||
| 471 | return 0; | ||
| 472 | if((flags & ENGINE_METHOD_DSA) && e->dsa_meth && | ||
| 473 | !ENGINE_set_default_DSA(e)) | ||
| 474 | return 0; | ||
| 475 | if((flags & ENGINE_METHOD_DH) && e->dh_meth && | ||
| 476 | !ENGINE_set_default_DH(e)) | ||
| 477 | return 0; | ||
| 478 | if((flags & ENGINE_METHOD_RAND) && e->rand_meth && | ||
| 479 | !ENGINE_set_default_RAND(e)) | ||
| 480 | return 0; | ||
| 481 | if((flags & ENGINE_METHOD_BN_MOD_EXP) && e->bn_mod_exp && | ||
| 482 | !ENGINE_set_default_BN_mod_exp(e)) | ||
| 483 | return 0; | ||
| 484 | if((flags & ENGINE_METHOD_BN_MOD_EXP_CRT) && e->bn_mod_exp_crt && | ||
| 485 | !ENGINE_set_default_BN_mod_exp_crt(e)) | ||
| 486 | return 0; | ||
| 487 | return 1; | ||
| 488 | } | ||
| 489 | |||
diff --git a/src/lib/libcrypto/engine/engine_list.c b/src/lib/libcrypto/engine/engine_list.c deleted file mode 100644 index d764c60661..0000000000 --- a/src/lib/libcrypto/engine/engine_list.c +++ /dev/null | |||
| @@ -1,675 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_list.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <openssl/crypto.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "engine_int.h" | ||
| 62 | #include <openssl/engine.h> | ||
| 63 | |||
| 64 | /* The linked-list of pointers to engine types. engine_list_head | ||
| 65 | * incorporates an implicit structural reference but engine_list_tail | ||
| 66 | * does not - the latter is a computational niceity and only points | ||
| 67 | * to something that is already pointed to by its predecessor in the | ||
| 68 | * list (or engine_list_head itself). In the same way, the use of the | ||
| 69 | * "prev" pointer in each ENGINE is to save excessive list iteration, | ||
| 70 | * it doesn't correspond to an extra structural reference. Hence, | ||
| 71 | * engine_list_head, and each non-null "next" pointer account for | ||
| 72 | * the list itself assuming exactly 1 structural reference on each | ||
| 73 | * list member. */ | ||
| 74 | static ENGINE *engine_list_head = NULL; | ||
| 75 | static ENGINE *engine_list_tail = NULL; | ||
| 76 | /* A boolean switch, used to ensure we only initialise once. This | ||
| 77 | * is needed because the engine list may genuinely become empty during | ||
| 78 | * use (so we can't use engine_list_head as an indicator for example. */ | ||
| 79 | static int engine_list_flag = 0; | ||
| 80 | |||
| 81 | /* These static functions starting with a lower case "engine_" always | ||
| 82 | * take place when CRYPTO_LOCK_ENGINE has been locked up. */ | ||
| 83 | static int engine_list_add(ENGINE *e) | ||
| 84 | { | ||
| 85 | int conflict = 0; | ||
| 86 | ENGINE *iterator = NULL; | ||
| 87 | |||
| 88 | if(e == NULL) | ||
| 89 | { | ||
| 90 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 91 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 92 | return 0; | ||
| 93 | } | ||
| 94 | iterator = engine_list_head; | ||
| 95 | while(iterator && !conflict) | ||
| 96 | { | ||
| 97 | conflict = (strcmp(iterator->id, e->id) == 0); | ||
| 98 | iterator = iterator->next; | ||
| 99 | } | ||
| 100 | if(conflict) | ||
| 101 | { | ||
| 102 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 103 | ENGINE_R_CONFLICTING_ENGINE_ID); | ||
| 104 | return 0; | ||
| 105 | } | ||
| 106 | if(engine_list_head == NULL) | ||
| 107 | { | ||
| 108 | /* We are adding to an empty list. */ | ||
| 109 | if(engine_list_tail) | ||
| 110 | { | ||
| 111 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 112 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 113 | return 0; | ||
| 114 | } | ||
| 115 | engine_list_head = e; | ||
| 116 | e->prev = NULL; | ||
| 117 | } | ||
| 118 | else | ||
| 119 | { | ||
| 120 | /* We are adding to the tail of an existing list. */ | ||
| 121 | if((engine_list_tail == NULL) || | ||
| 122 | (engine_list_tail->next != NULL)) | ||
| 123 | { | ||
| 124 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 125 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 126 | return 0; | ||
| 127 | } | ||
| 128 | engine_list_tail->next = e; | ||
| 129 | e->prev = engine_list_tail; | ||
| 130 | } | ||
| 131 | /* Having the engine in the list assumes a structural | ||
| 132 | * reference. */ | ||
| 133 | e->struct_ref++; | ||
| 134 | /* However it came to be, e is the last item in the list. */ | ||
| 135 | engine_list_tail = e; | ||
| 136 | e->next = NULL; | ||
| 137 | return 1; | ||
| 138 | } | ||
| 139 | |||
| 140 | static int engine_list_remove(ENGINE *e) | ||
| 141 | { | ||
| 142 | ENGINE *iterator; | ||
| 143 | |||
| 144 | if(e == NULL) | ||
| 145 | { | ||
| 146 | ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE, | ||
| 147 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | /* We need to check that e is in our linked list! */ | ||
| 151 | iterator = engine_list_head; | ||
| 152 | while(iterator && (iterator != e)) | ||
| 153 | iterator = iterator->next; | ||
| 154 | if(iterator == NULL) | ||
| 155 | { | ||
| 156 | ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE, | ||
| 157 | ENGINE_R_ENGINE_IS_NOT_IN_LIST); | ||
| 158 | return 0; | ||
| 159 | } | ||
| 160 | /* un-link e from the chain. */ | ||
| 161 | if(e->next) | ||
| 162 | e->next->prev = e->prev; | ||
| 163 | if(e->prev) | ||
| 164 | e->prev->next = e->next; | ||
| 165 | /* Correct our head/tail if necessary. */ | ||
| 166 | if(engine_list_head == e) | ||
| 167 | engine_list_head = e->next; | ||
| 168 | if(engine_list_tail == e) | ||
| 169 | engine_list_tail = e->prev; | ||
| 170 | /* remove our structural reference. */ | ||
| 171 | e->struct_ref--; | ||
| 172 | return 1; | ||
| 173 | } | ||
| 174 | |||
| 175 | /* This check always takes place with CRYPTO_LOCK_ENGINE locked up | ||
| 176 | * so we're synchronised, but we can't call anything that tries to | ||
| 177 | * lock it again! :-) NB: For convenience (and code-clarity) we | ||
| 178 | * don't output errors for failures of the engine_list_add function | ||
| 179 | * as it will generate errors itself. */ | ||
| 180 | static int engine_internal_check(void) | ||
| 181 | { | ||
| 182 | if(engine_list_flag) | ||
| 183 | return 1; | ||
| 184 | /* This is our first time up, we need to populate the list | ||
| 185 | * with our statically compiled-in engines. */ | ||
| 186 | if(!engine_list_add(ENGINE_openssl())) | ||
| 187 | return 0; | ||
| 188 | #ifndef NO_HW | ||
| 189 | #ifndef NO_HW_CSWIFT | ||
| 190 | if(!engine_list_add(ENGINE_cswift())) | ||
| 191 | return 0; | ||
| 192 | #endif /* !NO_HW_CSWIFT */ | ||
| 193 | #ifndef NO_HW_NCIPHER | ||
| 194 | if(!engine_list_add(ENGINE_ncipher())) | ||
| 195 | return 0; | ||
| 196 | #endif /* !NO_HW_NCIPHER */ | ||
| 197 | #ifndef NO_HW_ATALLA | ||
| 198 | if(!engine_list_add(ENGINE_atalla())) | ||
| 199 | return 0; | ||
| 200 | #endif /* !NO_HW_ATALLA */ | ||
| 201 | #endif /* !NO_HW */ | ||
| 202 | engine_list_flag = 1; | ||
| 203 | return 1; | ||
| 204 | } | ||
| 205 | |||
| 206 | /* Get the first/last "ENGINE" type available. */ | ||
| 207 | ENGINE *ENGINE_get_first(void) | ||
| 208 | { | ||
| 209 | ENGINE *ret = NULL; | ||
| 210 | |||
| 211 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 212 | if(engine_internal_check()) | ||
| 213 | { | ||
| 214 | ret = engine_list_head; | ||
| 215 | if(ret) | ||
| 216 | ret->struct_ref++; | ||
| 217 | } | ||
| 218 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 219 | return ret; | ||
| 220 | } | ||
| 221 | ENGINE *ENGINE_get_last(void) | ||
| 222 | { | ||
| 223 | ENGINE *ret = NULL; | ||
| 224 | |||
| 225 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 226 | if(engine_internal_check()) | ||
| 227 | { | ||
| 228 | ret = engine_list_tail; | ||
| 229 | if(ret) | ||
| 230 | ret->struct_ref++; | ||
| 231 | } | ||
| 232 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 233 | return ret; | ||
| 234 | } | ||
| 235 | |||
| 236 | /* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ | ||
| 237 | ENGINE *ENGINE_get_next(ENGINE *e) | ||
| 238 | { | ||
| 239 | ENGINE *ret = NULL; | ||
| 240 | if(e == NULL) | ||
| 241 | { | ||
| 242 | ENGINEerr(ENGINE_F_ENGINE_GET_NEXT, | ||
| 243 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 244 | return 0; | ||
| 245 | } | ||
| 246 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 247 | ret = e->next; | ||
| 248 | e->struct_ref--; | ||
| 249 | if(ret) | ||
| 250 | ret->struct_ref++; | ||
| 251 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 252 | return ret; | ||
| 253 | } | ||
| 254 | ENGINE *ENGINE_get_prev(ENGINE *e) | ||
| 255 | { | ||
| 256 | ENGINE *ret = NULL; | ||
| 257 | if(e == NULL) | ||
| 258 | { | ||
| 259 | ENGINEerr(ENGINE_F_ENGINE_GET_PREV, | ||
| 260 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 261 | return 0; | ||
| 262 | } | ||
| 263 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 264 | ret = e->prev; | ||
| 265 | e->struct_ref--; | ||
| 266 | if(ret) | ||
| 267 | ret->struct_ref++; | ||
| 268 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 269 | return ret; | ||
| 270 | } | ||
| 271 | |||
| 272 | /* Add another "ENGINE" type into the list. */ | ||
| 273 | int ENGINE_add(ENGINE *e) | ||
| 274 | { | ||
| 275 | int to_return = 1; | ||
| 276 | if(e == NULL) | ||
| 277 | { | ||
| 278 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 279 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 280 | return 0; | ||
| 281 | } | ||
| 282 | if((e->id == NULL) || (e->name == NULL)) | ||
| 283 | { | ||
| 284 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 285 | ENGINE_R_ID_OR_NAME_MISSING); | ||
| 286 | } | ||
| 287 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 288 | if(!engine_internal_check() || !engine_list_add(e)) | ||
| 289 | { | ||
| 290 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 291 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 292 | to_return = 0; | ||
| 293 | } | ||
| 294 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 295 | return to_return; | ||
| 296 | } | ||
| 297 | |||
| 298 | /* Remove an existing "ENGINE" type from the array. */ | ||
| 299 | int ENGINE_remove(ENGINE *e) | ||
| 300 | { | ||
| 301 | int to_return = 1; | ||
| 302 | if(e == NULL) | ||
| 303 | { | ||
| 304 | ENGINEerr(ENGINE_F_ENGINE_REMOVE, | ||
| 305 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 306 | return 0; | ||
| 307 | } | ||
| 308 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 309 | if(!engine_internal_check() || !engine_list_remove(e)) | ||
| 310 | { | ||
| 311 | ENGINEerr(ENGINE_F_ENGINE_REMOVE, | ||
| 312 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 313 | to_return = 0; | ||
| 314 | } | ||
| 315 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 316 | return to_return; | ||
| 317 | } | ||
| 318 | |||
| 319 | ENGINE *ENGINE_by_id(const char *id) | ||
| 320 | { | ||
| 321 | ENGINE *iterator = NULL; | ||
| 322 | if(id == NULL) | ||
| 323 | { | ||
| 324 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 325 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 326 | return NULL; | ||
| 327 | } | ||
| 328 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 329 | if(!engine_internal_check()) | ||
| 330 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 331 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 332 | else | ||
| 333 | { | ||
| 334 | iterator = engine_list_head; | ||
| 335 | while(iterator && (strcmp(id, iterator->id) != 0)) | ||
| 336 | iterator = iterator->next; | ||
| 337 | if(iterator) | ||
| 338 | /* We need to return a structural reference */ | ||
| 339 | iterator->struct_ref++; | ||
| 340 | } | ||
| 341 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 342 | if(iterator == NULL) | ||
| 343 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 344 | ENGINE_R_NO_SUCH_ENGINE); | ||
| 345 | return iterator; | ||
| 346 | } | ||
| 347 | |||
| 348 | /* As per the comments in engine.h, it is generally better all round | ||
| 349 | * if the ENGINE structure is allocated within this framework. */ | ||
| 350 | #if 0 | ||
| 351 | int ENGINE_get_struct_size(void) | ||
| 352 | { | ||
| 353 | return sizeof(ENGINE); | ||
| 354 | } | ||
| 355 | |||
| 356 | ENGINE *ENGINE_new(ENGINE *e) | ||
| 357 | { | ||
| 358 | ENGINE *ret; | ||
| 359 | |||
| 360 | if(e == NULL) | ||
| 361 | { | ||
| 362 | ret = (ENGINE *)(OPENSSL_malloc(sizeof(ENGINE)); | ||
| 363 | if(ret == NULL) | ||
| 364 | { | ||
| 365 | ENGINEerr(ENGINE_F_ENGINE_NEW, | ||
| 366 | ERR_R_MALLOC_FAILURE); | ||
| 367 | return NULL; | ||
| 368 | } | ||
| 369 | } | ||
| 370 | else | ||
| 371 | ret = e; | ||
| 372 | memset(ret, 0, sizeof(ENGINE)); | ||
| 373 | if(e) | ||
| 374 | ret->flags = ENGINE_FLAGS_MALLOCED; | ||
| 375 | ret->struct_ref = 1; | ||
| 376 | return ret; | ||
| 377 | } | ||
| 378 | #else | ||
| 379 | ENGINE *ENGINE_new(void) | ||
| 380 | { | ||
| 381 | ENGINE *ret; | ||
| 382 | |||
| 383 | ret = (ENGINE *)OPENSSL_malloc(sizeof(ENGINE)); | ||
| 384 | if(ret == NULL) | ||
| 385 | { | ||
| 386 | ENGINEerr(ENGINE_F_ENGINE_NEW, ERR_R_MALLOC_FAILURE); | ||
| 387 | return NULL; | ||
| 388 | } | ||
| 389 | memset(ret, 0, sizeof(ENGINE)); | ||
| 390 | ret->flags = ENGINE_FLAGS_MALLOCED; | ||
| 391 | ret->struct_ref = 1; | ||
| 392 | return ret; | ||
| 393 | } | ||
| 394 | #endif | ||
| 395 | |||
| 396 | int ENGINE_free(ENGINE *e) | ||
| 397 | { | ||
| 398 | int i; | ||
| 399 | |||
| 400 | if(e == NULL) | ||
| 401 | { | ||
| 402 | ENGINEerr(ENGINE_F_ENGINE_FREE, | ||
| 403 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 404 | return 0; | ||
| 405 | } | ||
| 406 | i = CRYPTO_add(&e->struct_ref,-1,CRYPTO_LOCK_ENGINE); | ||
| 407 | #ifdef REF_PRINT | ||
| 408 | REF_PRINT("ENGINE",e); | ||
| 409 | #endif | ||
| 410 | if (i > 0) return 1; | ||
| 411 | #ifdef REF_CHECK | ||
| 412 | if (i < 0) | ||
| 413 | { | ||
| 414 | fprintf(stderr,"ENGINE_free, bad reference count\n"); | ||
| 415 | abort(); | ||
| 416 | } | ||
| 417 | #endif | ||
| 418 | if(e->flags & ENGINE_FLAGS_MALLOCED) | ||
| 419 | OPENSSL_free(e); | ||
| 420 | return 1; | ||
| 421 | } | ||
| 422 | |||
| 423 | int ENGINE_set_id(ENGINE *e, const char *id) | ||
| 424 | { | ||
| 425 | if((e == NULL) || (id == NULL)) | ||
| 426 | { | ||
| 427 | ENGINEerr(ENGINE_F_ENGINE_SET_ID, | ||
| 428 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 429 | return 0; | ||
| 430 | } | ||
| 431 | e->id = id; | ||
| 432 | return 1; | ||
| 433 | } | ||
| 434 | |||
| 435 | int ENGINE_set_name(ENGINE *e, const char *name) | ||
| 436 | { | ||
| 437 | if((e == NULL) || (name == NULL)) | ||
| 438 | { | ||
| 439 | ENGINEerr(ENGINE_F_ENGINE_SET_NAME, | ||
| 440 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 441 | return 0; | ||
| 442 | } | ||
| 443 | e->name = name; | ||
| 444 | return 1; | ||
| 445 | } | ||
| 446 | |||
| 447 | int ENGINE_set_RSA(ENGINE *e, RSA_METHOD *rsa_meth) | ||
| 448 | { | ||
| 449 | if((e == NULL) || (rsa_meth == NULL)) | ||
| 450 | { | ||
| 451 | ENGINEerr(ENGINE_F_ENGINE_SET_RSA, | ||
| 452 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 453 | return 0; | ||
| 454 | } | ||
| 455 | e->rsa_meth = rsa_meth; | ||
| 456 | return 1; | ||
| 457 | } | ||
| 458 | |||
| 459 | int ENGINE_set_DSA(ENGINE *e, DSA_METHOD *dsa_meth) | ||
| 460 | { | ||
| 461 | if((e == NULL) || (dsa_meth == NULL)) | ||
| 462 | { | ||
| 463 | ENGINEerr(ENGINE_F_ENGINE_SET_DSA, | ||
| 464 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 465 | return 0; | ||
| 466 | } | ||
| 467 | e->dsa_meth = dsa_meth; | ||
| 468 | return 1; | ||
| 469 | } | ||
| 470 | |||
| 471 | int ENGINE_set_DH(ENGINE *e, DH_METHOD *dh_meth) | ||
| 472 | { | ||
| 473 | if((e == NULL) || (dh_meth == NULL)) | ||
| 474 | { | ||
| 475 | ENGINEerr(ENGINE_F_ENGINE_SET_DH, | ||
| 476 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 477 | return 0; | ||
| 478 | } | ||
| 479 | e->dh_meth = dh_meth; | ||
| 480 | return 1; | ||
| 481 | } | ||
| 482 | |||
| 483 | int ENGINE_set_RAND(ENGINE *e, RAND_METHOD *rand_meth) | ||
| 484 | { | ||
| 485 | if((e == NULL) || (rand_meth == NULL)) | ||
| 486 | { | ||
| 487 | ENGINEerr(ENGINE_F_ENGINE_SET_RAND, | ||
| 488 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 489 | return 0; | ||
| 490 | } | ||
| 491 | e->rand_meth = rand_meth; | ||
| 492 | return 1; | ||
| 493 | } | ||
| 494 | |||
| 495 | int ENGINE_set_BN_mod_exp(ENGINE *e, BN_MOD_EXP bn_mod_exp) | ||
| 496 | { | ||
| 497 | if((e == NULL) || (bn_mod_exp == NULL)) | ||
| 498 | { | ||
| 499 | ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP, | ||
| 500 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 501 | return 0; | ||
| 502 | } | ||
| 503 | e->bn_mod_exp = bn_mod_exp; | ||
| 504 | return 1; | ||
| 505 | } | ||
| 506 | |||
| 507 | int ENGINE_set_BN_mod_exp_crt(ENGINE *e, BN_MOD_EXP_CRT bn_mod_exp_crt) | ||
| 508 | { | ||
| 509 | if((e == NULL) || (bn_mod_exp_crt == NULL)) | ||
| 510 | { | ||
| 511 | ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT, | ||
| 512 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 513 | return 0; | ||
| 514 | } | ||
| 515 | e->bn_mod_exp_crt = bn_mod_exp_crt; | ||
| 516 | return 1; | ||
| 517 | } | ||
| 518 | |||
| 519 | int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f) | ||
| 520 | { | ||
| 521 | if((e == NULL) || (init_f == NULL)) | ||
| 522 | { | ||
| 523 | ENGINEerr(ENGINE_F_ENGINE_SET_INIT_FUNCTION, | ||
| 524 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 525 | return 0; | ||
| 526 | } | ||
| 527 | e->init = init_f; | ||
| 528 | return 1; | ||
| 529 | } | ||
| 530 | |||
| 531 | int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f) | ||
| 532 | { | ||
| 533 | if((e == NULL) || (finish_f == NULL)) | ||
| 534 | { | ||
| 535 | ENGINEerr(ENGINE_F_ENGINE_SET_FINISH_FUNCTION, | ||
| 536 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 537 | return 0; | ||
| 538 | } | ||
| 539 | e->finish = finish_f; | ||
| 540 | return 1; | ||
| 541 | } | ||
| 542 | |||
| 543 | int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f) | ||
| 544 | { | ||
| 545 | if((e == NULL) || (ctrl_f == NULL)) | ||
| 546 | { | ||
| 547 | ENGINEerr(ENGINE_F_ENGINE_SET_CTRL_FUNCTION, | ||
| 548 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 549 | return 0; | ||
| 550 | } | ||
| 551 | e->ctrl = ctrl_f; | ||
| 552 | return 1; | ||
| 553 | } | ||
| 554 | |||
| 555 | const char *ENGINE_get_id(ENGINE *e) | ||
| 556 | { | ||
| 557 | if(e == NULL) | ||
| 558 | { | ||
| 559 | ENGINEerr(ENGINE_F_ENGINE_GET_ID, | ||
| 560 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 561 | return 0; | ||
| 562 | } | ||
| 563 | return e->id; | ||
| 564 | } | ||
| 565 | |||
| 566 | const char *ENGINE_get_name(ENGINE *e) | ||
| 567 | { | ||
| 568 | if(e == NULL) | ||
| 569 | { | ||
| 570 | ENGINEerr(ENGINE_F_ENGINE_GET_NAME, | ||
| 571 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 572 | return 0; | ||
| 573 | } | ||
| 574 | return e->name; | ||
| 575 | } | ||
| 576 | |||
| 577 | RSA_METHOD *ENGINE_get_RSA(ENGINE *e) | ||
| 578 | { | ||
| 579 | if(e == NULL) | ||
| 580 | { | ||
| 581 | ENGINEerr(ENGINE_F_ENGINE_GET_RSA, | ||
| 582 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 583 | return NULL; | ||
| 584 | } | ||
| 585 | return e->rsa_meth; | ||
| 586 | } | ||
| 587 | |||
| 588 | DSA_METHOD *ENGINE_get_DSA(ENGINE *e) | ||
| 589 | { | ||
| 590 | if(e == NULL) | ||
| 591 | { | ||
| 592 | ENGINEerr(ENGINE_F_ENGINE_GET_DSA, | ||
| 593 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 594 | return NULL; | ||
| 595 | } | ||
| 596 | return e->dsa_meth; | ||
| 597 | } | ||
| 598 | |||
| 599 | DH_METHOD *ENGINE_get_DH(ENGINE *e) | ||
| 600 | { | ||
| 601 | if(e == NULL) | ||
| 602 | { | ||
| 603 | ENGINEerr(ENGINE_F_ENGINE_GET_DH, | ||
| 604 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 605 | return NULL; | ||
| 606 | } | ||
| 607 | return e->dh_meth; | ||
| 608 | } | ||
| 609 | |||
| 610 | RAND_METHOD *ENGINE_get_RAND(ENGINE *e) | ||
| 611 | { | ||
| 612 | if(e == NULL) | ||
| 613 | { | ||
| 614 | ENGINEerr(ENGINE_F_ENGINE_GET_RAND, | ||
| 615 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 616 | return NULL; | ||
| 617 | } | ||
| 618 | return e->rand_meth; | ||
| 619 | } | ||
| 620 | |||
| 621 | BN_MOD_EXP ENGINE_get_BN_mod_exp(ENGINE *e) | ||
| 622 | { | ||
| 623 | if(e == NULL) | ||
| 624 | { | ||
| 625 | ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP, | ||
| 626 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 627 | return NULL; | ||
| 628 | } | ||
| 629 | return e->bn_mod_exp; | ||
| 630 | } | ||
| 631 | |||
| 632 | BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(ENGINE *e) | ||
| 633 | { | ||
| 634 | if(e == NULL) | ||
| 635 | { | ||
| 636 | ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT, | ||
| 637 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 638 | return NULL; | ||
| 639 | } | ||
| 640 | return e->bn_mod_exp_crt; | ||
| 641 | } | ||
| 642 | |||
| 643 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(ENGINE *e) | ||
| 644 | { | ||
| 645 | if(e == NULL) | ||
| 646 | { | ||
| 647 | ENGINEerr(ENGINE_F_ENGINE_GET_INIT_FUNCTION, | ||
| 648 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 649 | return NULL; | ||
| 650 | } | ||
| 651 | return e->init; | ||
| 652 | } | ||
| 653 | |||
| 654 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(ENGINE *e) | ||
| 655 | { | ||
| 656 | if(e == NULL) | ||
| 657 | { | ||
| 658 | ENGINEerr(ENGINE_F_ENGINE_GET_FINISH_FUNCTION, | ||
| 659 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 660 | return NULL; | ||
| 661 | } | ||
| 662 | return e->finish; | ||
| 663 | } | ||
| 664 | |||
| 665 | ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(ENGINE *e) | ||
| 666 | { | ||
| 667 | if(e == NULL) | ||
| 668 | { | ||
| 669 | ENGINEerr(ENGINE_F_ENGINE_GET_CTRL_FUNCTION, | ||
| 670 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 671 | return NULL; | ||
| 672 | } | ||
| 673 | return e->ctrl; | ||
| 674 | } | ||
| 675 | |||
diff --git a/src/lib/libcrypto/engine/engine_openssl.c b/src/lib/libcrypto/engine/engine_openssl.c deleted file mode 100644 index 9636f51168..0000000000 --- a/src/lib/libcrypto/engine/engine_openssl.c +++ /dev/null | |||
| @@ -1,174 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_openssl.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | |||
| 60 | #include <stdio.h> | ||
| 61 | #include <openssl/crypto.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "engine_int.h" | ||
| 64 | #include <openssl/engine.h> | ||
| 65 | #include <openssl/dso.h> | ||
| 66 | #include <openssl/rsa.h> | ||
| 67 | #include <openssl/dsa.h> | ||
| 68 | #include <openssl/dh.h> | ||
| 69 | #include <openssl/rand.h> | ||
| 70 | #include <openssl/bn.h> | ||
| 71 | |||
| 72 | /* This is the only function we need to implement as OpenSSL | ||
| 73 | * doesn't have a native CRT mod_exp. Perhaps this should be | ||
| 74 | * BN_mod_exp_crt and moved into crypto/bn/ ?? ... dunno. */ | ||
| 75 | static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 76 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 77 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 78 | |||
| 79 | /* The ENGINE structure that can be pointed to. */ | ||
| 80 | static ENGINE engine_openssl = | ||
| 81 | { | ||
| 82 | "openssl", | ||
| 83 | "Software default engine support", | ||
| 84 | NULL, | ||
| 85 | NULL, | ||
| 86 | NULL, /* these methods are "stolen" in ENGINE_openssl() */ | ||
| 87 | NULL, | ||
| 88 | NULL, | ||
| 89 | openssl_mod_exp_crt, | ||
| 90 | NULL, /* no init() */ | ||
| 91 | NULL, /* no finish() */ | ||
| 92 | NULL, /* no ctrl() */ | ||
| 93 | NULL, /* no load_privkey() */ | ||
| 94 | NULL, /* no load_pubkey() */ | ||
| 95 | 0, /* no flags */ | ||
| 96 | 0, 0, /* no references. */ | ||
| 97 | NULL, NULL /* unlinked */ | ||
| 98 | }; | ||
| 99 | |||
| 100 | /* As this is only ever called once, there's no need for locking | ||
| 101 | * (indeed - the lock will already be held by our caller!!!) */ | ||
| 102 | ENGINE *ENGINE_openssl() | ||
| 103 | { | ||
| 104 | /* We need to populate our structure with the software pointers | ||
| 105 | * that we want to steal. */ | ||
| 106 | engine_openssl.rsa_meth = RSA_get_default_openssl_method(); | ||
| 107 | engine_openssl.dsa_meth = DSA_get_default_openssl_method(); | ||
| 108 | engine_openssl.dh_meth = DH_get_default_openssl_method(); | ||
| 109 | engine_openssl.rand_meth = RAND_SSLeay(); | ||
| 110 | engine_openssl.bn_mod_exp = BN_mod_exp; | ||
| 111 | return &engine_openssl; | ||
| 112 | } | ||
| 113 | |||
| 114 | /* Chinese Remainder Theorem, taken and adapted from rsa_eay.c */ | ||
| 115 | static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 116 | const BIGNUM *q, const BIGNUM *dmp1, | ||
| 117 | const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx) | ||
| 118 | { | ||
| 119 | BIGNUM r1,m1; | ||
| 120 | int ret=0; | ||
| 121 | BN_CTX *bn_ctx; | ||
| 122 | BIGNUM *temp_bn = NULL; | ||
| 123 | |||
| 124 | if (ctx) | ||
| 125 | bn_ctx = ctx; | ||
| 126 | else | ||
| 127 | if ((bn_ctx=BN_CTX_new()) == NULL) goto err; | ||
| 128 | BN_init(&m1); | ||
| 129 | BN_init(&r1); | ||
| 130 | /* BN_mul() cannot accept const BIGNUMs so I use the BN_CTX | ||
| 131 | * to duplicate what I need. <sigh> */ | ||
| 132 | if ((temp_bn = BN_CTX_get(bn_ctx)) == NULL) goto err; | ||
| 133 | if (!BN_copy(temp_bn, iqmp)) goto err; | ||
| 134 | |||
| 135 | if (!BN_mod(&r1, a, q, bn_ctx)) goto err; | ||
| 136 | if (!engine_openssl.bn_mod_exp(&m1, &r1, dmq1, q, bn_ctx)) | ||
| 137 | goto err; | ||
| 138 | |||
| 139 | if (!BN_mod(&r1, a, p, bn_ctx)) goto err; | ||
| 140 | if (!engine_openssl.bn_mod_exp(r, &r1, dmp1, p, bn_ctx)) | ||
| 141 | goto err; | ||
| 142 | |||
| 143 | if (!BN_sub(r, r, &m1)) goto err; | ||
| 144 | /* This will help stop the size of r0 increasing, which does | ||
| 145 | * affect the multiply if it optimised for a power of 2 size */ | ||
| 146 | if (r->neg) | ||
| 147 | if (!BN_add(r, r, p)) goto err; | ||
| 148 | |||
| 149 | if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err; | ||
| 150 | if (!BN_mod(r, &r1, p, bn_ctx)) goto err; | ||
| 151 | /* If p < q it is occasionally possible for the correction of | ||
| 152 | * adding 'p' if r is negative above to leave the result still | ||
| 153 | * negative. This can break the private key operations: the following | ||
| 154 | * second correction should *always* correct this rare occurrence. | ||
| 155 | * This will *never* happen with OpenSSL generated keys because | ||
| 156 | * they ensure p > q [steve] | ||
| 157 | */ | ||
| 158 | if (r->neg) | ||
| 159 | if (!BN_add(r, r, p)) goto err; | ||
| 160 | /* Again, BN_mul() will need non-const values. */ | ||
| 161 | if (!BN_copy(temp_bn, q)) goto err; | ||
| 162 | if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err; | ||
| 163 | if (!BN_add(r, &r1, &m1)) goto err; | ||
| 164 | |||
| 165 | ret=1; | ||
| 166 | err: | ||
| 167 | BN_clear_free(&m1); | ||
| 168 | BN_clear_free(&r1); | ||
| 169 | if (temp_bn) | ||
| 170 | bn_ctx->tos--; | ||
| 171 | if (!ctx) | ||
| 172 | BN_CTX_free(bn_ctx); | ||
| 173 | return(ret); | ||
| 174 | } | ||
diff --git a/src/lib/libcrypto/objects/obj_dat.h.src b/src/lib/libcrypto/objects/obj_dat.h.src deleted file mode 100644 index f0d824141c..0000000000 --- a/src/lib/libcrypto/objects/obj_dat.h.src +++ /dev/null | |||
| @@ -1,2208 +0,0 @@ | |||
| 1 | /* lib/obj/obj_dat.h */ | ||
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* THIS FILE IS GENERATED FROM Objects.h by obj_dat.pl via the | ||
| 60 | * following command: | ||
| 61 | * perl obj_dat.pl objects.h obj_dat.h | ||
| 62 | */ | ||
| 63 | |||
| 64 | #define NUM_NID 393 | ||
| 65 | #define NUM_SN 392 | ||
| 66 | #define NUM_LN 392 | ||
| 67 | #define NUM_OBJ 366 | ||
| 68 | |||
| 69 | static unsigned char lvalues[2896]={ | ||
| 70 | 0x00, /* [ 0] OBJ_undef */ | ||
| 71 | 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ | ||
| 72 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ | ||
| 73 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 14] OBJ_md2 */ | ||
| 74 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05, /* [ 22] OBJ_md5 */ | ||
| 75 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04, /* [ 30] OBJ_rc4 */ | ||
| 76 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 38] OBJ_rsaEncryption */ | ||
| 77 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 47] OBJ_md2WithRSAEncryption */ | ||
| 78 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,/* [ 56] OBJ_md5WithRSAEncryption */ | ||
| 79 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x01,/* [ 65] OBJ_pbeWithMD2AndDES_CBC */ | ||
| 80 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x03,/* [ 74] OBJ_pbeWithMD5AndDES_CBC */ | ||
| 81 | 0x55, /* [ 83] OBJ_X500 */ | ||
| 82 | 0x55,0x04, /* [ 84] OBJ_X509 */ | ||
| 83 | 0x55,0x04,0x03, /* [ 86] OBJ_commonName */ | ||
| 84 | 0x55,0x04,0x06, /* [ 89] OBJ_countryName */ | ||
| 85 | 0x55,0x04,0x07, /* [ 92] OBJ_localityName */ | ||
| 86 | 0x55,0x04,0x08, /* [ 95] OBJ_stateOrProvinceName */ | ||
| 87 | 0x55,0x04,0x0A, /* [ 98] OBJ_organizationName */ | ||
| 88 | 0x55,0x04,0x0B, /* [101] OBJ_organizationalUnitName */ | ||
| 89 | 0x55,0x08,0x01,0x01, /* [104] OBJ_rsa */ | ||
| 90 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07, /* [108] OBJ_pkcs7 */ | ||
| 91 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x01,/* [116] OBJ_pkcs7_data */ | ||
| 92 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02,/* [125] OBJ_pkcs7_signed */ | ||
| 93 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x03,/* [134] OBJ_pkcs7_enveloped */ | ||
| 94 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x04,/* [143] OBJ_pkcs7_signedAndEnveloped */ | ||
| 95 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x05,/* [152] OBJ_pkcs7_digest */ | ||
| 96 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x06,/* [161] OBJ_pkcs7_encrypted */ | ||
| 97 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03, /* [170] OBJ_pkcs3 */ | ||
| 98 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03,0x01,/* [178] OBJ_dhKeyAgreement */ | ||
| 99 | 0x2B,0x0E,0x03,0x02,0x06, /* [187] OBJ_des_ecb */ | ||
| 100 | 0x2B,0x0E,0x03,0x02,0x09, /* [192] OBJ_des_cfb64 */ | ||
| 101 | 0x2B,0x0E,0x03,0x02,0x07, /* [197] OBJ_des_cbc */ | ||
| 102 | 0x2B,0x0E,0x03,0x02,0x11, /* [202] OBJ_des_ede */ | ||
| 103 | 0x2B,0x06,0x01,0x04,0x01,0x81,0x3C,0x07,0x01,0x01,0x02,/* [207] OBJ_idea_cbc */ | ||
| 104 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x02, /* [218] OBJ_rc2_cbc */ | ||
| 105 | 0x2B,0x0E,0x03,0x02,0x12, /* [226] OBJ_sha */ | ||
| 106 | 0x2B,0x0E,0x03,0x02,0x0F, /* [231] OBJ_shaWithRSAEncryption */ | ||
| 107 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x07, /* [236] OBJ_des_ede3_cbc */ | ||
| 108 | 0x2B,0x0E,0x03,0x02,0x08, /* [244] OBJ_des_ofb64 */ | ||
| 109 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09, /* [249] OBJ_pkcs9 */ | ||
| 110 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x01,/* [257] OBJ_pkcs9_emailAddress */ | ||
| 111 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x02,/* [266] OBJ_pkcs9_unstructuredName */ | ||
| 112 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x03,/* [275] OBJ_pkcs9_contentType */ | ||
| 113 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x04,/* [284] OBJ_pkcs9_messageDigest */ | ||
| 114 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x05,/* [293] OBJ_pkcs9_signingTime */ | ||
| 115 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x06,/* [302] OBJ_pkcs9_countersignature */ | ||
| 116 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x07,/* [311] OBJ_pkcs9_challengePassword */ | ||
| 117 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x08,/* [320] OBJ_pkcs9_unstructuredAddress */ | ||
| 118 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x09,/* [329] OBJ_pkcs9_extCertAttributes */ | ||
| 119 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42, /* [338] OBJ_netscape */ | ||
| 120 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01, /* [345] OBJ_netscape_cert_extension */ | ||
| 121 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02, /* [353] OBJ_netscape_data_type */ | ||
| 122 | 0x2B,0x0E,0x03,0x02,0x1A, /* [361] OBJ_sha1 */ | ||
| 123 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,/* [366] OBJ_sha1WithRSAEncryption */ | ||
| 124 | 0x2B,0x0E,0x03,0x02,0x0D, /* [375] OBJ_dsaWithSHA */ | ||
| 125 | 0x2B,0x0E,0x03,0x02,0x0C, /* [380] OBJ_dsa_2 */ | ||
| 126 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0B,/* [385] OBJ_pbeWithSHA1AndRC2_CBC */ | ||
| 127 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0C,/* [394] OBJ_id_pbkdf2 */ | ||
| 128 | 0x2B,0x0E,0x03,0x02,0x1B, /* [403] OBJ_dsaWithSHA1_2 */ | ||
| 129 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x01,/* [408] OBJ_netscape_cert_type */ | ||
| 130 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x02,/* [417] OBJ_netscape_base_url */ | ||
| 131 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x03,/* [426] OBJ_netscape_revocation_url */ | ||
| 132 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x04,/* [435] OBJ_netscape_ca_revocation_url */ | ||
| 133 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x07,/* [444] OBJ_netscape_renewal_url */ | ||
| 134 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x08,/* [453] OBJ_netscape_ca_policy_url */ | ||
| 135 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0C,/* [462] OBJ_netscape_ssl_server_name */ | ||
| 136 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0D,/* [471] OBJ_netscape_comment */ | ||
| 137 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02,0x05,/* [480] OBJ_netscape_cert_sequence */ | ||
| 138 | 0x55,0x1D, /* [489] OBJ_id_ce */ | ||
| 139 | 0x55,0x1D,0x0E, /* [491] OBJ_subject_key_identifier */ | ||
| 140 | 0x55,0x1D,0x0F, /* [494] OBJ_key_usage */ | ||
| 141 | 0x55,0x1D,0x10, /* [497] OBJ_private_key_usage_period */ | ||
| 142 | 0x55,0x1D,0x11, /* [500] OBJ_subject_alt_name */ | ||
| 143 | 0x55,0x1D,0x12, /* [503] OBJ_issuer_alt_name */ | ||
| 144 | 0x55,0x1D,0x13, /* [506] OBJ_basic_constraints */ | ||
| 145 | 0x55,0x1D,0x14, /* [509] OBJ_crl_number */ | ||
| 146 | 0x55,0x1D,0x20, /* [512] OBJ_certificate_policies */ | ||
| 147 | 0x55,0x1D,0x23, /* [515] OBJ_authority_key_identifier */ | ||
| 148 | 0x2B,0x06,0x01,0x04,0x01,0x97,0x55,0x01,0x02,/* [518] OBJ_bf_cbc */ | ||
| 149 | 0x55,0x08,0x03,0x65, /* [527] OBJ_mdc2 */ | ||
| 150 | 0x55,0x08,0x03,0x64, /* [531] OBJ_mdc2WithRSA */ | ||
| 151 | 0x55,0x04,0x2A, /* [535] OBJ_givenName */ | ||
| 152 | 0x55,0x04,0x04, /* [538] OBJ_surname */ | ||
| 153 | 0x55,0x04,0x2B, /* [541] OBJ_initials */ | ||
| 154 | 0x55,0x04,0x2D, /* [544] OBJ_uniqueIdentifier */ | ||
| 155 | 0x55,0x1D,0x1F, /* [547] OBJ_crl_distribution_points */ | ||
| 156 | 0x2B,0x0E,0x03,0x02,0x03, /* [550] OBJ_md5WithRSA */ | ||
| 157 | 0x55,0x04,0x05, /* [555] OBJ_serialNumber */ | ||
| 158 | 0x55,0x04,0x0C, /* [558] OBJ_title */ | ||
| 159 | 0x55,0x04,0x0D, /* [561] OBJ_description */ | ||
| 160 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0A,/* [564] OBJ_cast5_cbc */ | ||
| 161 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0C,/* [573] OBJ_pbeWithMD5AndCast5_CBC */ | ||
| 162 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x03, /* [582] OBJ_dsaWithSHA1 */ | ||
| 163 | 0x2B,0x0E,0x03,0x02,0x1D, /* [589] OBJ_sha1WithRSA */ | ||
| 164 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x01, /* [594] OBJ_dsa */ | ||
| 165 | 0x2B,0x24,0x03,0x02,0x01, /* [601] OBJ_ripemd160 */ | ||
| 166 | 0x2B,0x24,0x03,0x03,0x01,0x02, /* [606] OBJ_ripemd160WithRSA */ | ||
| 167 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x08, /* [612] OBJ_rc5_cbc */ | ||
| 168 | 0x29,0x01,0x01,0x85,0x1A,0x01, /* [620] OBJ_rle_compression */ | ||
| 169 | 0x29,0x01,0x01,0x85,0x1A,0x02, /* [626] OBJ_zlib_compression */ | ||
| 170 | 0x55,0x1D,0x25, /* [632] OBJ_ext_key_usage */ | ||
| 171 | 0x2B,0x06,0x01,0x05,0x05,0x07, /* [635] OBJ_id_pkix */ | ||
| 172 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03, /* [641] OBJ_id_kp */ | ||
| 173 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x01, /* [648] OBJ_server_auth */ | ||
| 174 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x02, /* [656] OBJ_client_auth */ | ||
| 175 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x03, /* [664] OBJ_code_sign */ | ||
| 176 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x04, /* [672] OBJ_email_protect */ | ||
| 177 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x08, /* [680] OBJ_time_stamp */ | ||
| 178 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x15,/* [688] OBJ_ms_code_ind */ | ||
| 179 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x16,/* [698] OBJ_ms_code_com */ | ||
| 180 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x01,/* [708] OBJ_ms_ctl_sign */ | ||
| 181 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x03,/* [718] OBJ_ms_sgc */ | ||
| 182 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x04,/* [728] OBJ_ms_efs */ | ||
| 183 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x04,0x01,/* [738] OBJ_ns_sgc */ | ||
| 184 | 0x55,0x1D,0x1B, /* [747] OBJ_delta_crl */ | ||
| 185 | 0x55,0x1D,0x15, /* [750] OBJ_crl_reason */ | ||
| 186 | 0x55,0x1D,0x18, /* [753] OBJ_invalidity_date */ | ||
| 187 | 0x2B,0x65,0x01,0x04,0x01, /* [756] OBJ_sxnet */ | ||
| 188 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x01,/* [761] OBJ_pbe_WithSHA1And128BitRC4 */ | ||
| 189 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x02,/* [771] OBJ_pbe_WithSHA1And40BitRC4 */ | ||
| 190 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x03,/* [781] OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC */ | ||
| 191 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x04,/* [791] OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC */ | ||
| 192 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x05,/* [801] OBJ_pbe_WithSHA1And128BitRC2_CBC */ | ||
| 193 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x06,/* [811] OBJ_pbe_WithSHA1And40BitRC2_CBC */ | ||
| 194 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x01,/* [821] OBJ_keyBag */ | ||
| 195 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x02,/* [832] OBJ_pkcs8ShroudedKeyBag */ | ||
| 196 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x03,/* [843] OBJ_certBag */ | ||
| 197 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x04,/* [854] OBJ_crlBag */ | ||
| 198 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x05,/* [865] OBJ_secretBag */ | ||
| 199 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x06,/* [876] OBJ_safeContentsBag */ | ||
| 200 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x14,/* [887] OBJ_friendlyName */ | ||
| 201 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x15,/* [896] OBJ_localKeyID */ | ||
| 202 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x01,/* [905] OBJ_x509Certificate */ | ||
| 203 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x02,/* [915] OBJ_sdsiCertificate */ | ||
| 204 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x17,0x01,/* [925] OBJ_x509Crl */ | ||
| 205 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0D,/* [935] OBJ_pbes2 */ | ||
| 206 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0E,/* [944] OBJ_pbmac1 */ | ||
| 207 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x07, /* [953] OBJ_hmacWithSHA1 */ | ||
| 208 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01, /* [961] OBJ_id_qt_cps */ | ||
| 209 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x02, /* [969] OBJ_id_qt_unotice */ | ||
| 210 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0F,/* [977] OBJ_SMIMECapabilities */ | ||
| 211 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x04,/* [986] OBJ_pbeWithMD2AndRC2_CBC */ | ||
| 212 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x06,/* [995] OBJ_pbeWithMD5AndRC2_CBC */ | ||
| 213 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0A,/* [1004] OBJ_pbeWithSHA1AndDES_CBC */ | ||
| 214 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x0E,/* [1013] OBJ_ms_ext_req */ | ||
| 215 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0E,/* [1023] OBJ_ext_req */ | ||
| 216 | 0x55,0x04,0x29, /* [1032] OBJ_name */ | ||
| 217 | 0x55,0x04,0x2E, /* [1035] OBJ_dnQualifier */ | ||
| 218 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01, /* [1038] OBJ_id_pe */ | ||
| 219 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30, /* [1045] OBJ_id_ad */ | ||
| 220 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01, /* [1052] OBJ_info_access */ | ||
| 221 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01, /* [1060] OBJ_ad_OCSP */ | ||
| 222 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x02, /* [1068] OBJ_ad_ca_issuers */ | ||
| 223 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x09, /* [1076] OBJ_OCSP_sign */ | ||
| 224 | 0x28, /* [1084] OBJ_iso */ | ||
| 225 | 0x2A, /* [1085] OBJ_member_body */ | ||
| 226 | 0x2A,0x86,0x48, /* [1086] OBJ_ISO_US */ | ||
| 227 | 0x2A,0x86,0x48,0xCE,0x38, /* [1089] OBJ_X9_57 */ | ||
| 228 | 0x2A,0x86,0x48,0xCE,0x38,0x04, /* [1094] OBJ_X9cm */ | ||
| 229 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01, /* [1100] OBJ_pkcs1 */ | ||
| 230 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05, /* [1108] OBJ_pkcs5 */ | ||
| 231 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,/* [1116] OBJ_SMIME */ | ||
| 232 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,/* [1125] OBJ_id_smime_mod */ | ||
| 233 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,/* [1135] OBJ_id_smime_ct */ | ||
| 234 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,/* [1145] OBJ_id_smime_aa */ | ||
| 235 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,/* [1155] OBJ_id_smime_alg */ | ||
| 236 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,/* [1165] OBJ_id_smime_cd */ | ||
| 237 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,/* [1175] OBJ_id_smime_spq */ | ||
| 238 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,/* [1185] OBJ_id_smime_cti */ | ||
| 239 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x01,/* [1195] OBJ_id_smime_mod_cms */ | ||
| 240 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x02,/* [1206] OBJ_id_smime_mod_ess */ | ||
| 241 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x03,/* [1217] OBJ_id_smime_mod_oid */ | ||
| 242 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x04,/* [1228] OBJ_id_smime_mod_msg_v3 */ | ||
| 243 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x05,/* [1239] OBJ_id_smime_mod_ets_eSignature_88 */ | ||
| 244 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x06,/* [1250] OBJ_id_smime_mod_ets_eSignature_97 */ | ||
| 245 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x07,/* [1261] OBJ_id_smime_mod_ets_eSigPolicy_88 */ | ||
| 246 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x08,/* [1272] OBJ_id_smime_mod_ets_eSigPolicy_97 */ | ||
| 247 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x01,/* [1283] OBJ_id_smime_ct_receipt */ | ||
| 248 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x02,/* [1294] OBJ_id_smime_ct_authData */ | ||
| 249 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x03,/* [1305] OBJ_id_smime_ct_publishCert */ | ||
| 250 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x04,/* [1316] OBJ_id_smime_ct_TSTInfo */ | ||
| 251 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x05,/* [1327] OBJ_id_smime_ct_TDTInfo */ | ||
| 252 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x06,/* [1338] OBJ_id_smime_ct_contentInfo */ | ||
| 253 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x07,/* [1349] OBJ_id_smime_ct_DVCSRequestData */ | ||
| 254 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x08,/* [1360] OBJ_id_smime_ct_DVCSResponseData */ | ||
| 255 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x01,/* [1371] OBJ_id_smime_aa_receiptRequest */ | ||
| 256 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x02,/* [1382] OBJ_id_smime_aa_securityLabel */ | ||
| 257 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x03,/* [1393] OBJ_id_smime_aa_mlExpandHistory */ | ||
| 258 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x04,/* [1404] OBJ_id_smime_aa_contentHint */ | ||
| 259 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x05,/* [1415] OBJ_id_smime_aa_msgSigDigest */ | ||
| 260 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x06,/* [1426] OBJ_id_smime_aa_encapContentType */ | ||
| 261 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x07,/* [1437] OBJ_id_smime_aa_contentIdentifier */ | ||
| 262 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x08,/* [1448] OBJ_id_smime_aa_macValue */ | ||
| 263 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x09,/* [1459] OBJ_id_smime_aa_equivalentLabels */ | ||
| 264 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0A,/* [1470] OBJ_id_smime_aa_contentReference */ | ||
| 265 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0B,/* [1481] OBJ_id_smime_aa_encrypKeyPref */ | ||
| 266 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0C,/* [1492] OBJ_id_smime_aa_signingCertificate */ | ||
| 267 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0D,/* [1503] OBJ_id_smime_aa_smimeEncryptCerts */ | ||
| 268 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0E,/* [1514] OBJ_id_smime_aa_timeStampToken */ | ||
| 269 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0F,/* [1525] OBJ_id_smime_aa_ets_sigPolicyId */ | ||
| 270 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x10,/* [1536] OBJ_id_smime_aa_ets_commitmentType */ | ||
| 271 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x11,/* [1547] OBJ_id_smime_aa_ets_signerLocation */ | ||
| 272 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x12,/* [1558] OBJ_id_smime_aa_ets_signerAttr */ | ||
| 273 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x13,/* [1569] OBJ_id_smime_aa_ets_otherSigCert */ | ||
| 274 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x14,/* [1580] OBJ_id_smime_aa_ets_contentTimestamp */ | ||
| 275 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x15,/* [1591] OBJ_id_smime_aa_ets_CertificateRefs */ | ||
| 276 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x16,/* [1602] OBJ_id_smime_aa_ets_RevocationRefs */ | ||
| 277 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x17,/* [1613] OBJ_id_smime_aa_ets_certValues */ | ||
| 278 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x18,/* [1624] OBJ_id_smime_aa_ets_revocationValues */ | ||
| 279 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x19,/* [1635] OBJ_id_smime_aa_ets_escTimeStamp */ | ||
| 280 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1A,/* [1646] OBJ_id_smime_aa_ets_certCRLTimestamp */ | ||
| 281 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1B,/* [1657] OBJ_id_smime_aa_ets_archiveTimeStamp */ | ||
| 282 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1C,/* [1668] OBJ_id_smime_aa_signatureType */ | ||
| 283 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1D,/* [1679] OBJ_id_smime_aa_dvcs_dvc */ | ||
| 284 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x01,/* [1690] OBJ_id_smime_alg_ESDHwith3DES */ | ||
| 285 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x02,/* [1701] OBJ_id_smime_alg_ESDHwithRC2 */ | ||
| 286 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x03,/* [1712] OBJ_id_smime_alg_3DESwrap */ | ||
| 287 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x04,/* [1723] OBJ_id_smime_alg_RC2wrap */ | ||
| 288 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x05,/* [1734] OBJ_id_smime_alg_ESDH */ | ||
| 289 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x06,/* [1745] OBJ_id_smime_alg_CMS3DESwrap */ | ||
| 290 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x07,/* [1756] OBJ_id_smime_alg_CMSRC2wrap */ | ||
| 291 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,0x01,/* [1767] OBJ_id_smime_cd_ldap */ | ||
| 292 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x01,/* [1778] OBJ_id_smime_spq_ets_sqt_uri */ | ||
| 293 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x02,/* [1789] OBJ_id_smime_spq_ets_sqt_unotice */ | ||
| 294 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x01,/* [1800] OBJ_id_smime_cti_ets_proofOfOrigin */ | ||
| 295 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x02,/* [1811] OBJ_id_smime_cti_ets_proofOfReceipt */ | ||
| 296 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x03,/* [1822] OBJ_id_smime_cti_ets_proofOfDelivery */ | ||
| 297 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x04,/* [1833] OBJ_id_smime_cti_ets_proofOfSender */ | ||
| 298 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x05,/* [1844] OBJ_id_smime_cti_ets_proofOfApproval */ | ||
| 299 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x06,/* [1855] OBJ_id_smime_cti_ets_proofOfCreation */ | ||
| 300 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x04, /* [1866] OBJ_md4 */ | ||
| 301 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00, /* [1874] OBJ_id_pkix_mod */ | ||
| 302 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02, /* [1881] OBJ_id_qt */ | ||
| 303 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04, /* [1888] OBJ_id_it */ | ||
| 304 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05, /* [1895] OBJ_id_pkip */ | ||
| 305 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06, /* [1902] OBJ_id_alg */ | ||
| 306 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07, /* [1909] OBJ_id_cmc */ | ||
| 307 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08, /* [1916] OBJ_id_on */ | ||
| 308 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09, /* [1923] OBJ_id_pda */ | ||
| 309 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A, /* [1930] OBJ_id_aca */ | ||
| 310 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B, /* [1937] OBJ_id_qcs */ | ||
| 311 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C, /* [1944] OBJ_id_cct */ | ||
| 312 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x01, /* [1951] OBJ_id_pkix1_explicit_88 */ | ||
| 313 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x02, /* [1959] OBJ_id_pkix1_implicit_88 */ | ||
| 314 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x03, /* [1967] OBJ_id_pkix1_explicit_93 */ | ||
| 315 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x04, /* [1975] OBJ_id_pkix1_implicit_93 */ | ||
| 316 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x05, /* [1983] OBJ_id_mod_crmf */ | ||
| 317 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x06, /* [1991] OBJ_id_mod_cmc */ | ||
| 318 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x07, /* [1999] OBJ_id_mod_kea_profile_88 */ | ||
| 319 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x08, /* [2007] OBJ_id_mod_kea_profile_93 */ | ||
| 320 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x09, /* [2015] OBJ_id_mod_cmp */ | ||
| 321 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0A, /* [2023] OBJ_id_mod_qualified_cert_88 */ | ||
| 322 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0B, /* [2031] OBJ_id_mod_qualified_cert_93 */ | ||
| 323 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0C, /* [2039] OBJ_id_mod_attribute_cert */ | ||
| 324 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0D, /* [2047] OBJ_id_mod_timestamp_protocol */ | ||
| 325 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0E, /* [2055] OBJ_id_mod_ocsp */ | ||
| 326 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0F, /* [2063] OBJ_id_mod_dvcs */ | ||
| 327 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x10, /* [2071] OBJ_id_mod_cmp2000 */ | ||
| 328 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x02, /* [2079] OBJ_biometricInfo */ | ||
| 329 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x03, /* [2087] OBJ_qcStatements */ | ||
| 330 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x04, /* [2095] OBJ_ac_auditEntity */ | ||
| 331 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x05, /* [2103] OBJ_ac_targeting */ | ||
| 332 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x06, /* [2111] OBJ_aaControls */ | ||
| 333 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x07, /* [2119] OBJ_sbqp_ipAddrBlock */ | ||
| 334 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x08, /* [2127] OBJ_sbqp_autonomousSysNum */ | ||
| 335 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x09, /* [2135] OBJ_sbqp_routerIdentifier */ | ||
| 336 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x03, /* [2143] OBJ_textNotice */ | ||
| 337 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x05, /* [2151] OBJ_ipsecEndSystem */ | ||
| 338 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x06, /* [2159] OBJ_ipsecTunnel */ | ||
| 339 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x07, /* [2167] OBJ_ipsecUser */ | ||
| 340 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x0A, /* [2175] OBJ_dvcs */ | ||
| 341 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x01, /* [2183] OBJ_id_it_caProtEncCert */ | ||
| 342 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x02, /* [2191] OBJ_id_it_signKeyPairTypes */ | ||
| 343 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x03, /* [2199] OBJ_id_it_encKeyPairTypes */ | ||
| 344 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x04, /* [2207] OBJ_id_it_preferredSymmAlg */ | ||
| 345 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x05, /* [2215] OBJ_id_it_caKeyUpdateInfo */ | ||
| 346 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x06, /* [2223] OBJ_id_it_currentCRL */ | ||
| 347 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x07, /* [2231] OBJ_id_it_unsupportedOIDs */ | ||
| 348 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x08, /* [2239] OBJ_id_it_subscriptionRequest */ | ||
| 349 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x09, /* [2247] OBJ_id_it_subscriptionResponse */ | ||
| 350 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0A, /* [2255] OBJ_id_it_keyPairParamReq */ | ||
| 351 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0B, /* [2263] OBJ_id_it_keyPairParamRep */ | ||
| 352 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0C, /* [2271] OBJ_id_it_revPassphrase */ | ||
| 353 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0D, /* [2279] OBJ_id_it_implicitConfirm */ | ||
| 354 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0E, /* [2287] OBJ_id_it_confirmWaitTime */ | ||
| 355 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0F, /* [2295] OBJ_id_it_origPKIMessage */ | ||
| 356 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01, /* [2303] OBJ_id_regCtrl */ | ||
| 357 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02, /* [2311] OBJ_id_regInfo */ | ||
| 358 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x01,/* [2319] OBJ_id_regCtrl_regToken */ | ||
| 359 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x02,/* [2328] OBJ_id_regCtrl_authenticator */ | ||
| 360 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x03,/* [2337] OBJ_id_regCtrl_pkiPublicationInfo */ | ||
| 361 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x04,/* [2346] OBJ_id_regCtrl_pkiArchiveOptions */ | ||
| 362 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x05,/* [2355] OBJ_id_regCtrl_oldCertID */ | ||
| 363 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x06,/* [2364] OBJ_id_regCtrl_protocolEncrKey */ | ||
| 364 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x01,/* [2373] OBJ_id_regInfo_utf8Pairs */ | ||
| 365 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x02,/* [2382] OBJ_id_regInfo_certReq */ | ||
| 366 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x01, /* [2391] OBJ_id_alg_des40 */ | ||
| 367 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x02, /* [2399] OBJ_id_alg_noSignature */ | ||
| 368 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x03, /* [2407] OBJ_id_alg_dh_sig_hmac_sha1 */ | ||
| 369 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x04, /* [2415] OBJ_id_alg_dh_pop */ | ||
| 370 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x01, /* [2423] OBJ_id_cmc_statusInfo */ | ||
| 371 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x02, /* [2431] OBJ_id_cmc_identification */ | ||
| 372 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x03, /* [2439] OBJ_id_cmc_identityProof */ | ||
| 373 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x04, /* [2447] OBJ_id_cmc_dataReturn */ | ||
| 374 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x05, /* [2455] OBJ_id_cmc_transactionId */ | ||
| 375 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x06, /* [2463] OBJ_id_cmc_senderNonce */ | ||
| 376 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x07, /* [2471] OBJ_id_cmc_recipientNonce */ | ||
| 377 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x08, /* [2479] OBJ_id_cmc_addExtensions */ | ||
| 378 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x09, /* [2487] OBJ_id_cmc_encryptedPOP */ | ||
| 379 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0A, /* [2495] OBJ_id_cmc_decryptedPOP */ | ||
| 380 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0B, /* [2503] OBJ_id_cmc_lraPOPWitness */ | ||
| 381 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0F, /* [2511] OBJ_id_cmc_getCert */ | ||
| 382 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x10, /* [2519] OBJ_id_cmc_getCRL */ | ||
| 383 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x11, /* [2527] OBJ_id_cmc_revokeRequest */ | ||
| 384 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x12, /* [2535] OBJ_id_cmc_regInfo */ | ||
| 385 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x13, /* [2543] OBJ_id_cmc_responseInfo */ | ||
| 386 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x15, /* [2551] OBJ_id_cmc_queryPending */ | ||
| 387 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x16, /* [2559] OBJ_id_cmc_popLinkRandom */ | ||
| 388 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x17, /* [2567] OBJ_id_cmc_popLinkWitness */ | ||
| 389 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x18, /* [2575] OBJ_id_cmc_confirmCertAcceptance */ | ||
| 390 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08,0x01, /* [2583] OBJ_id_on_personalData */ | ||
| 391 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x01, /* [2591] OBJ_id_pda_dateOfBirth */ | ||
| 392 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x02, /* [2599] OBJ_id_pda_placeOfBirth */ | ||
| 393 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x03, /* [2607] OBJ_id_pda_pseudonym */ | ||
| 394 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x04, /* [2615] OBJ_id_pda_gender */ | ||
| 395 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x05, /* [2623] OBJ_id_pda_countryOfCitizenship */ | ||
| 396 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x06, /* [2631] OBJ_id_pda_countryOfResidence */ | ||
| 397 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x01, /* [2639] OBJ_id_aca_authenticationInfo */ | ||
| 398 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x02, /* [2647] OBJ_id_aca_accessIdentity */ | ||
| 399 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x03, /* [2655] OBJ_id_aca_chargingIdentity */ | ||
| 400 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x04, /* [2663] OBJ_id_aca_group */ | ||
| 401 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x05, /* [2671] OBJ_id_aca_role */ | ||
| 402 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B,0x01, /* [2679] OBJ_id_qcs_pkixQCSyntax_v1 */ | ||
| 403 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x01, /* [2687] OBJ_id_cct_crs */ | ||
| 404 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x02, /* [2695] OBJ_id_cct_PKIData */ | ||
| 405 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x03, /* [2703] OBJ_id_cct_PKIResponse */ | ||
| 406 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x03, /* [2711] OBJ_ad_timeStamping */ | ||
| 407 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x04, /* [2719] OBJ_ad_dvcs */ | ||
| 408 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x01,/* [2727] OBJ_id_pkix_OCSP_basic */ | ||
| 409 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x02,/* [2736] OBJ_id_pkix_OCSP_Nonce */ | ||
| 410 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x03,/* [2745] OBJ_id_pkix_OCSP_CrlID */ | ||
| 411 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x04,/* [2754] OBJ_id_pkix_OCSP_acceptableResponses */ | ||
| 412 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x05,/* [2763] OBJ_id_pkix_OCSP_noCheck */ | ||
| 413 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x06,/* [2772] OBJ_id_pkix_OCSP_archiveCutoff */ | ||
| 414 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x07,/* [2781] OBJ_id_pkix_OCSP_serviceLocator */ | ||
| 415 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x08,/* [2790] OBJ_id_pkix_OCSP_extendedStatus */ | ||
| 416 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x09,/* [2799] OBJ_id_pkix_OCSP_valid */ | ||
| 417 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0A,/* [2808] OBJ_id_pkix_OCSP_path */ | ||
| 418 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0B,/* [2817] OBJ_id_pkix_OCSP_trustRoot */ | ||
| 419 | 0x2B,0x0E,0x03,0x02, /* [2826] OBJ_algorithm */ | ||
| 420 | 0x2B,0x0E,0x03,0x02,0x0B, /* [2830] OBJ_rsaSignature */ | ||
| 421 | 0x55,0x08, /* [2835] OBJ_X500algorithms */ | ||
| 422 | 0x2B, /* [2837] OBJ_org */ | ||
| 423 | 0x2B,0x06, /* [2838] OBJ_dod */ | ||
| 424 | 0x2B,0x06,0x01, /* [2840] OBJ_iana */ | ||
| 425 | 0x2B,0x06,0x01,0x01, /* [2843] OBJ_Directory */ | ||
| 426 | 0x2B,0x06,0x01,0x02, /* [2847] OBJ_Management */ | ||
| 427 | 0x2B,0x06,0x01,0x03, /* [2851] OBJ_Experimental */ | ||
| 428 | 0x2B,0x06,0x01,0x04, /* [2855] OBJ_Private */ | ||
| 429 | 0x2B,0x06,0x01,0x05, /* [2859] OBJ_Security */ | ||
| 430 | 0x2B,0x06,0x01,0x06, /* [2863] OBJ_SNMPv2 */ | ||
| 431 | 0x2B,0x06,0x01,0x07, /* [2867] OBJ_Mail */ | ||
| 432 | 0x01, /* [2871] OBJ_Enterprises */ | ||
| 433 | 0xBA,0x82,0x58, /* [2872] OBJ_dcObject */ | ||
| 434 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,/* [2875] OBJ_domainComponent */ | ||
| 435 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0D,/* [2885] OBJ_Domain */ | ||
| 436 | }; | ||
| 437 | |||
| 438 | static ASN1_OBJECT nid_objs[NUM_NID]={ | ||
| 439 | {"UNDEF","undefined",NID_undef,1,&(lvalues[0]),0}, | ||
| 440 | {"rsadsi","RSA Data Security, Inc.",NID_rsadsi,6,&(lvalues[1]),0}, | ||
| 441 | {"pkcs","RSA Data Security, Inc. PKCS",NID_pkcs,7,&(lvalues[7]),0}, | ||
| 442 | {"MD2","md2",NID_md2,8,&(lvalues[14]),0}, | ||
| 443 | {"MD5","md5",NID_md5,8,&(lvalues[22]),0}, | ||
| 444 | {"RC4","rc4",NID_rc4,8,&(lvalues[30]),0}, | ||
| 445 | {"rsaEncryption","rsaEncryption",NID_rsaEncryption,9,&(lvalues[38]),0}, | ||
| 446 | {"RSA-MD2","md2WithRSAEncryption",NID_md2WithRSAEncryption,9, | ||
| 447 | &(lvalues[47]),0}, | ||
| 448 | {"RSA-MD5","md5WithRSAEncryption",NID_md5WithRSAEncryption,9, | ||
| 449 | &(lvalues[56]),0}, | ||
| 450 | {"PBE-MD2-DES","pbeWithMD2AndDES-CBC",NID_pbeWithMD2AndDES_CBC,9, | ||
| 451 | &(lvalues[65]),0}, | ||
| 452 | {"PBE-MD5-DES","pbeWithMD5AndDES-CBC",NID_pbeWithMD5AndDES_CBC,9, | ||
| 453 | &(lvalues[74]),0}, | ||
| 454 | {"X500","directory services (X.500)",NID_X500,1,&(lvalues[83]),0}, | ||
| 455 | {"X509","X509",NID_X509,2,&(lvalues[84]),0}, | ||
| 456 | {"CN","commonName",NID_commonName,3,&(lvalues[86]),0}, | ||
| 457 | {"C","countryName",NID_countryName,3,&(lvalues[89]),0}, | ||
| 458 | {"L","localityName",NID_localityName,3,&(lvalues[92]),0}, | ||
| 459 | {"ST","stateOrProvinceName",NID_stateOrProvinceName,3,&(lvalues[95]),0}, | ||
| 460 | {"O","organizationName",NID_organizationName,3,&(lvalues[98]),0}, | ||
| 461 | {"OU","organizationalUnitName",NID_organizationalUnitName,3, | ||
| 462 | &(lvalues[101]),0}, | ||
| 463 | {"RSA","rsa",NID_rsa,4,&(lvalues[104]),0}, | ||
| 464 | {"pkcs7","pkcs7",NID_pkcs7,8,&(lvalues[108]),0}, | ||
| 465 | {"pkcs7-data","pkcs7-data",NID_pkcs7_data,9,&(lvalues[116]),0}, | ||
| 466 | {"pkcs7-signedData","pkcs7-signedData",NID_pkcs7_signed,9, | ||
| 467 | &(lvalues[125]),0}, | ||
| 468 | {"pkcs7-envelopedData","pkcs7-envelopedData",NID_pkcs7_enveloped,9, | ||
| 469 | &(lvalues[134]),0}, | ||
| 470 | {"pkcs7-signedAndEnvelopedData","pkcs7-signedAndEnvelopedData", | ||
| 471 | NID_pkcs7_signedAndEnveloped,9,&(lvalues[143]),0}, | ||
| 472 | {"pkcs7-digestData","pkcs7-digestData",NID_pkcs7_digest,9, | ||
| 473 | &(lvalues[152]),0}, | ||
| 474 | {"pkcs7-encryptedData","pkcs7-encryptedData",NID_pkcs7_encrypted,9, | ||
| 475 | &(lvalues[161]),0}, | ||
| 476 | {"pkcs3","pkcs3",NID_pkcs3,8,&(lvalues[170]),0}, | ||
| 477 | {"dhKeyAgreement","dhKeyAgreement",NID_dhKeyAgreement,9, | ||
| 478 | &(lvalues[178]),0}, | ||
| 479 | {"DES-ECB","des-ecb",NID_des_ecb,5,&(lvalues[187]),0}, | ||
| 480 | {"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[192]),0}, | ||
| 481 | {"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[197]),0}, | ||
| 482 | {"DES-EDE","des-ede",NID_des_ede,5,&(lvalues[202]),0}, | ||
| 483 | {"DES-EDE3","des-ede3",NID_des_ede3,0,NULL}, | ||
| 484 | {"IDEA-CBC","idea-cbc",NID_idea_cbc,11,&(lvalues[207]),0}, | ||
| 485 | {"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL}, | ||
| 486 | {"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL}, | ||
| 487 | {"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[218]),0}, | ||
| 488 | {"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL}, | ||
| 489 | {"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL}, | ||
| 490 | {"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL}, | ||
| 491 | {"SHA","sha",NID_sha,5,&(lvalues[226]),0}, | ||
| 492 | {"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5, | ||
| 493 | &(lvalues[231]),0}, | ||
| 494 | {"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL}, | ||
| 495 | {"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[236]),0}, | ||
| 496 | {"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[244]),0}, | ||
| 497 | {"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL}, | ||
| 498 | {"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[249]),0}, | ||
| 499 | {"Email","emailAddress",NID_pkcs9_emailAddress,9,&(lvalues[257]),0}, | ||
| 500 | {"unstructuredName","unstructuredName",NID_pkcs9_unstructuredName,9, | ||
| 501 | &(lvalues[266]),0}, | ||
| 502 | {"contentType","contentType",NID_pkcs9_contentType,9,&(lvalues[275]),0}, | ||
| 503 | {"messageDigest","messageDigest",NID_pkcs9_messageDigest,9, | ||
| 504 | &(lvalues[284]),0}, | ||
| 505 | {"signingTime","signingTime",NID_pkcs9_signingTime,9,&(lvalues[293]),0}, | ||
| 506 | {"countersignature","countersignature",NID_pkcs9_countersignature,9, | ||
| 507 | &(lvalues[302]),0}, | ||
| 508 | {"challengePassword","challengePassword",NID_pkcs9_challengePassword, | ||
| 509 | 9,&(lvalues[311]),0}, | ||
| 510 | {"unstructuredAddress","unstructuredAddress", | ||
| 511 | NID_pkcs9_unstructuredAddress,9,&(lvalues[320]),0}, | ||
| 512 | {"extendedCertificateAttributes","extendedCertificateAttributes", | ||
| 513 | NID_pkcs9_extCertAttributes,9,&(lvalues[329]),0}, | ||
| 514 | {"Netscape","Netscape Communications Corp.",NID_netscape,7, | ||
| 515 | &(lvalues[338]),0}, | ||
| 516 | {"nsCertExt","Netscape Certificate Extension", | ||
| 517 | NID_netscape_cert_extension,8,&(lvalues[345]),0}, | ||
| 518 | {"nsDataType","Netscape Data Type",NID_netscape_data_type,8, | ||
| 519 | &(lvalues[353]),0}, | ||
| 520 | {"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL}, | ||
| 521 | {"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL}, | ||
| 522 | {"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL}, | ||
| 523 | {"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL}, | ||
| 524 | {"SHA1","sha1",NID_sha1,5,&(lvalues[361]),0}, | ||
| 525 | {"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9, | ||
| 526 | &(lvalues[366]),0}, | ||
| 527 | {"DSA-SHA","dsaWithSHA",NID_dsaWithSHA,5,&(lvalues[375]),0}, | ||
| 528 | {"DSA-old","dsaEncryption-old",NID_dsa_2,5,&(lvalues[380]),0}, | ||
| 529 | {"PBE-SHA1-RC2-64","pbeWithSHA1AndRC2-CBC",NID_pbeWithSHA1AndRC2_CBC, | ||
| 530 | 9,&(lvalues[385]),0}, | ||
| 531 | {"PBKDF2","PBKDF2",NID_id_pbkdf2,9,&(lvalues[394]),0}, | ||
| 532 | {"DSA-SHA1-old","dsaWithSHA1-old",NID_dsaWithSHA1_2,5,&(lvalues[403]),0}, | ||
| 533 | {"nsCertType","Netscape Cert Type",NID_netscape_cert_type,9, | ||
| 534 | &(lvalues[408]),0}, | ||
| 535 | {"nsBaseUrl","Netscape Base Url",NID_netscape_base_url,9, | ||
| 536 | &(lvalues[417]),0}, | ||
| 537 | {"nsRevocationUrl","Netscape Revocation Url", | ||
| 538 | NID_netscape_revocation_url,9,&(lvalues[426]),0}, | ||
| 539 | {"nsCaRevocationUrl","Netscape CA Revocation Url", | ||
| 540 | NID_netscape_ca_revocation_url,9,&(lvalues[435]),0}, | ||
| 541 | {"nsRenewalUrl","Netscape Renewal Url",NID_netscape_renewal_url,9, | ||
| 542 | &(lvalues[444]),0}, | ||
| 543 | {"nsCaPolicyUrl","Netscape CA Policy Url",NID_netscape_ca_policy_url, | ||
| 544 | 9,&(lvalues[453]),0}, | ||
| 545 | {"nsSslServerName","Netscape SSL Server Name", | ||
| 546 | NID_netscape_ssl_server_name,9,&(lvalues[462]),0}, | ||
| 547 | {"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[471]),0}, | ||
| 548 | {"nsCertSequence","Netscape Certificate Sequence", | ||
| 549 | NID_netscape_cert_sequence,9,&(lvalues[480]),0}, | ||
| 550 | {"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL}, | ||
| 551 | {"id-ce","id-ce",NID_id_ce,2,&(lvalues[489]),0}, | ||
| 552 | {"subjectKeyIdentifier","X509v3 Subject Key Identifier", | ||
| 553 | NID_subject_key_identifier,3,&(lvalues[491]),0}, | ||
| 554 | {"keyUsage","X509v3 Key Usage",NID_key_usage,3,&(lvalues[494]),0}, | ||
| 555 | {"privateKeyUsagePeriod","X509v3 Private Key Usage Period", | ||
| 556 | NID_private_key_usage_period,3,&(lvalues[497]),0}, | ||
| 557 | {"subjectAltName","X509v3 Subject Alternative Name", | ||
| 558 | NID_subject_alt_name,3,&(lvalues[500]),0}, | ||
| 559 | {"issuerAltName","X509v3 Issuer Alternative Name",NID_issuer_alt_name, | ||
| 560 | 3,&(lvalues[503]),0}, | ||
| 561 | {"basicConstraints","X509v3 Basic Constraints",NID_basic_constraints, | ||
| 562 | 3,&(lvalues[506]),0}, | ||
| 563 | {"crlNumber","X509v3 CRL Number",NID_crl_number,3,&(lvalues[509]),0}, | ||
| 564 | {"certificatePolicies","X509v3 Certificate Policies", | ||
| 565 | NID_certificate_policies,3,&(lvalues[512]),0}, | ||
| 566 | {"authorityKeyIdentifier","X509v3 Authority Key Identifier", | ||
| 567 | NID_authority_key_identifier,3,&(lvalues[515]),0}, | ||
| 568 | {"BF-CBC","bf-cbc",NID_bf_cbc,9,&(lvalues[518]),0}, | ||
| 569 | {"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL}, | ||
| 570 | {"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL}, | ||
| 571 | {"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL}, | ||
| 572 | {"MDC2","mdc2",NID_mdc2,4,&(lvalues[527]),0}, | ||
| 573 | {"RSA-MDC2","mdc2WithRSA",NID_mdc2WithRSA,4,&(lvalues[531]),0}, | ||
| 574 | {"RC4-40","rc4-40",NID_rc4_40,0,NULL}, | ||
| 575 | {"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL}, | ||
| 576 | {"G","givenName",NID_givenName,3,&(lvalues[535]),0}, | ||
| 577 | {"S","surname",NID_surname,3,&(lvalues[538]),0}, | ||
| 578 | {"I","initials",NID_initials,3,&(lvalues[541]),0}, | ||
| 579 | {"UID","uniqueIdentifier",NID_uniqueIdentifier,3,&(lvalues[544]),0}, | ||
| 580 | {"crlDistributionPoints","X509v3 CRL Distribution Points", | ||
| 581 | NID_crl_distribution_points,3,&(lvalues[547]),0}, | ||
| 582 | {"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[550]),0}, | ||
| 583 | {"SN","serialNumber",NID_serialNumber,3,&(lvalues[555]),0}, | ||
| 584 | {"T","title",NID_title,3,&(lvalues[558]),0}, | ||
| 585 | {"D","description",NID_description,3,&(lvalues[561]),0}, | ||
| 586 | {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[564]),0}, | ||
| 587 | {"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL}, | ||
| 588 | {"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL}, | ||
| 589 | {"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL}, | ||
| 590 | {"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC", | ||
| 591 | NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[573]),0}, | ||
| 592 | {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[582]),0}, | ||
| 593 | {"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL}, | ||
| 594 | {"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[589]),0}, | ||
| 595 | {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[594]),0}, | ||
| 596 | {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[601]),0}, | ||
| 597 | {NULL,NULL,NID_undef,0,NULL}, | ||
| 598 | {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6, | ||
| 599 | &(lvalues[606]),0}, | ||
| 600 | {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[612]),0}, | ||
| 601 | {"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL}, | ||
| 602 | {"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL}, | ||
| 603 | {"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL}, | ||
| 604 | {"RLE","run length compression",NID_rle_compression,6,&(lvalues[620]),0}, | ||
| 605 | {"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[626]),0}, | ||
| 606 | {"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3, | ||
| 607 | &(lvalues[632]),0}, | ||
| 608 | {"PKIX","PKIX",NID_id_pkix,6,&(lvalues[635]),0}, | ||
| 609 | {"id-kp","id-kp",NID_id_kp,7,&(lvalues[641]),0}, | ||
| 610 | {"serverAuth","TLS Web Server Authentication",NID_server_auth,8, | ||
| 611 | &(lvalues[648]),0}, | ||
| 612 | {"clientAuth","TLS Web Client Authentication",NID_client_auth,8, | ||
| 613 | &(lvalues[656]),0}, | ||
| 614 | {"codeSigning","Code Signing",NID_code_sign,8,&(lvalues[664]),0}, | ||
| 615 | {"emailProtection","E-mail Protection",NID_email_protect,8, | ||
| 616 | &(lvalues[672]),0}, | ||
| 617 | {"timeStamping","Time Stamping",NID_time_stamp,8,&(lvalues[680]),0}, | ||
| 618 | {"msCodeInd","Microsoft Individual Code Signing",NID_ms_code_ind,10, | ||
| 619 | &(lvalues[688]),0}, | ||
| 620 | {"msCodeCom","Microsoft Commercial Code Signing",NID_ms_code_com,10, | ||
| 621 | &(lvalues[698]),0}, | ||
| 622 | {"msCTLSign","Microsoft Trust List Signing",NID_ms_ctl_sign,10, | ||
| 623 | &(lvalues[708]),0}, | ||
| 624 | {"msSGC","Microsoft Server Gated Crypto",NID_ms_sgc,10,&(lvalues[718]),0}, | ||
| 625 | {"msEFS","Microsoft Encrypted File System",NID_ms_efs,10, | ||
| 626 | &(lvalues[728]),0}, | ||
| 627 | {"nsSGC","Netscape Server Gated Crypto",NID_ns_sgc,9,&(lvalues[738]),0}, | ||
| 628 | {"deltaCRL","X509v3 Delta CRL Indicator",NID_delta_crl,3, | ||
| 629 | &(lvalues[747]),0}, | ||
| 630 | {"CRLReason","X509v3 CRL Reason Code",NID_crl_reason,3,&(lvalues[750]),0}, | ||
| 631 | {"invalidityDate","Invalidity Date",NID_invalidity_date,3, | ||
| 632 | &(lvalues[753]),0}, | ||
| 633 | {"SXNetID","Strong Extranet ID",NID_sxnet,5,&(lvalues[756]),0}, | ||
| 634 | {"PBE-SHA1-RC4-128","pbeWithSHA1And128BitRC4", | ||
| 635 | NID_pbe_WithSHA1And128BitRC4,10,&(lvalues[761]),0}, | ||
| 636 | {"PBE-SHA1-RC4-40","pbeWithSHA1And40BitRC4", | ||
| 637 | NID_pbe_WithSHA1And40BitRC4,10,&(lvalues[771]),0}, | ||
| 638 | {"PBE-SHA1-3DES","pbeWithSHA1And3-KeyTripleDES-CBC", | ||
| 639 | NID_pbe_WithSHA1And3_Key_TripleDES_CBC,10,&(lvalues[781]),0}, | ||
| 640 | {"PBE-SHA1-2DES","pbeWithSHA1And2-KeyTripleDES-CBC", | ||
| 641 | NID_pbe_WithSHA1And2_Key_TripleDES_CBC,10,&(lvalues[791]),0}, | ||
| 642 | {"PBE-SHA1-RC2-128","pbeWithSHA1And128BitRC2-CBC", | ||
| 643 | NID_pbe_WithSHA1And128BitRC2_CBC,10,&(lvalues[801]),0}, | ||
| 644 | {"PBE-SHA1-RC2-40","pbeWithSHA1And40BitRC2-CBC", | ||
| 645 | NID_pbe_WithSHA1And40BitRC2_CBC,10,&(lvalues[811]),0}, | ||
| 646 | {"keyBag","keyBag",NID_keyBag,11,&(lvalues[821]),0}, | ||
| 647 | {"pkcs8ShroudedKeyBag","pkcs8ShroudedKeyBag",NID_pkcs8ShroudedKeyBag, | ||
| 648 | 11,&(lvalues[832]),0}, | ||
| 649 | {"certBag","certBag",NID_certBag,11,&(lvalues[843]),0}, | ||
| 650 | {"crlBag","crlBag",NID_crlBag,11,&(lvalues[854]),0}, | ||
| 651 | {"secretBag","secretBag",NID_secretBag,11,&(lvalues[865]),0}, | ||
| 652 | {"safeContentsBag","safeContentsBag",NID_safeContentsBag,11, | ||
| 653 | &(lvalues[876]),0}, | ||
| 654 | {"friendlyName","friendlyName",NID_friendlyName,9,&(lvalues[887]),0}, | ||
| 655 | {"localKeyID","localKeyID",NID_localKeyID,9,&(lvalues[896]),0}, | ||
| 656 | {"x509Certificate","x509Certificate",NID_x509Certificate,10, | ||
| 657 | &(lvalues[905]),0}, | ||
| 658 | {"sdsiCertificate","sdsiCertificate",NID_sdsiCertificate,10, | ||
| 659 | &(lvalues[915]),0}, | ||
| 660 | {"x509Crl","x509Crl",NID_x509Crl,10,&(lvalues[925]),0}, | ||
| 661 | {"PBES2","PBES2",NID_pbes2,9,&(lvalues[935]),0}, | ||
| 662 | {"PBMAC1","PBMAC1",NID_pbmac1,9,&(lvalues[944]),0}, | ||
| 663 | {"hmacWithSHA1","hmacWithSHA1",NID_hmacWithSHA1,8,&(lvalues[953]),0}, | ||
| 664 | {"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[961]),0}, | ||
| 665 | {"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8, | ||
| 666 | &(lvalues[969]),0}, | ||
| 667 | {"RC2-64-CBC","rc2-64-cbc",NID_rc2_64_cbc,0,NULL}, | ||
| 668 | {"SMIME-CAPS","S/MIME Capabilities",NID_SMIMECapabilities,9, | ||
| 669 | &(lvalues[977]),0}, | ||
| 670 | {"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9, | ||
| 671 | &(lvalues[986]),0}, | ||
| 672 | {"PBE-MD5-RC2-64","pbeWithMD5AndRC2-CBC",NID_pbeWithMD5AndRC2_CBC,9, | ||
| 673 | &(lvalues[995]),0}, | ||
| 674 | {"PBE-SHA1-DES","pbeWithSHA1AndDES-CBC",NID_pbeWithSHA1AndDES_CBC,9, | ||
| 675 | &(lvalues[1004]),0}, | ||
| 676 | {"msExtReq","Microsoft Extension Request",NID_ms_ext_req,10, | ||
| 677 | &(lvalues[1013]),0}, | ||
| 678 | {"extReq","Extension Request",NID_ext_req,9,&(lvalues[1023]),0}, | ||
| 679 | {"name","name",NID_name,3,&(lvalues[1032]),0}, | ||
| 680 | {"dnQualifier","dnQualifier",NID_dnQualifier,3,&(lvalues[1035]),0}, | ||
| 681 | {"id-pe","id-pe",NID_id_pe,7,&(lvalues[1038]),0}, | ||
| 682 | {"id-ad","id-ad",NID_id_ad,7,&(lvalues[1045]),0}, | ||
| 683 | {"authorityInfoAccess","Authority Information Access",NID_info_access, | ||
| 684 | 8,&(lvalues[1052]),0}, | ||
| 685 | {"OCSP","OCSP",NID_ad_OCSP,8,&(lvalues[1060]),0}, | ||
| 686 | {"caIssuers","CA Issuers",NID_ad_ca_issuers,8,&(lvalues[1068]),0}, | ||
| 687 | {"OCSPSigning","OCSP Signing",NID_OCSP_sign,8,&(lvalues[1076]),0}, | ||
| 688 | {"ISO","iso",NID_iso,1,&(lvalues[1084]),0}, | ||
| 689 | {"member-body","ISO Member Body",NID_member_body,1,&(lvalues[1085]),0}, | ||
| 690 | {"ISO-US","ISO US Member Body",NID_ISO_US,3,&(lvalues[1086]),0}, | ||
| 691 | {"X9-57","X9.57",NID_X9_57,5,&(lvalues[1089]),0}, | ||
| 692 | {"X9cm","X9.57 CM ?",NID_X9cm,6,&(lvalues[1094]),0}, | ||
| 693 | {"pkcs1","pkcs1",NID_pkcs1,8,&(lvalues[1100]),0}, | ||
| 694 | {"pkcs5","pkcs5",NID_pkcs5,8,&(lvalues[1108]),0}, | ||
| 695 | {"SMIME","S/MIME",NID_SMIME,9,&(lvalues[1116]),0}, | ||
| 696 | {"id-smime-mod","id-smime-mod",NID_id_smime_mod,10,&(lvalues[1125]),0}, | ||
| 697 | {"id-smime-ct","id-smime-ct",NID_id_smime_ct,10,&(lvalues[1135]),0}, | ||
| 698 | {"id-smime-aa","id-smime-aa",NID_id_smime_aa,10,&(lvalues[1145]),0}, | ||
| 699 | {"id-smime-alg","id-smime-alg",NID_id_smime_alg,10,&(lvalues[1155]),0}, | ||
| 700 | {"id-smime-cd","id-smime-cd",NID_id_smime_cd,10,&(lvalues[1165]),0}, | ||
| 701 | {"id-smime-spq","id-smime-spq",NID_id_smime_spq,10,&(lvalues[1175]),0}, | ||
| 702 | {"id-smime-cti","id-smime-cti",NID_id_smime_cti,10,&(lvalues[1185]),0}, | ||
| 703 | {"id-smime-mod-cms","id-smime-mod-cms",NID_id_smime_mod_cms,11, | ||
| 704 | &(lvalues[1195]),0}, | ||
| 705 | {"id-smime-mod-ess","id-smime-mod-ess",NID_id_smime_mod_ess,11, | ||
| 706 | &(lvalues[1206]),0}, | ||
| 707 | {"id-smime-mod-oid","id-smime-mod-oid",NID_id_smime_mod_oid,11, | ||
| 708 | &(lvalues[1217]),0}, | ||
| 709 | {"id-smime-mod-msg-v3","id-smime-mod-msg-v3",NID_id_smime_mod_msg_v3, | ||
| 710 | 11,&(lvalues[1228]),0}, | ||
| 711 | {"id-smime-mod-ets-eSignature-88","id-smime-mod-ets-eSignature-88", | ||
| 712 | NID_id_smime_mod_ets_eSignature_88,11,&(lvalues[1239]),0}, | ||
| 713 | {"id-smime-mod-ets-eSignature-97","id-smime-mod-ets-eSignature-97", | ||
| 714 | NID_id_smime_mod_ets_eSignature_97,11,&(lvalues[1250]),0}, | ||
| 715 | {"id-smime-mod-ets-eSigPolicy-88","id-smime-mod-ets-eSigPolicy-88", | ||
| 716 | NID_id_smime_mod_ets_eSigPolicy_88,11,&(lvalues[1261]),0}, | ||
| 717 | {"id-smime-mod-ets-eSigPolicy-97","id-smime-mod-ets-eSigPolicy-97", | ||
| 718 | NID_id_smime_mod_ets_eSigPolicy_97,11,&(lvalues[1272]),0}, | ||
| 719 | {"id-smime-ct-receipt","id-smime-ct-receipt",NID_id_smime_ct_receipt, | ||
| 720 | 11,&(lvalues[1283]),0}, | ||
| 721 | {"id-smime-ct-authData","id-smime-ct-authData", | ||
| 722 | NID_id_smime_ct_authData,11,&(lvalues[1294]),0}, | ||
| 723 | {"id-smime-ct-publishCert","id-smime-ct-publishCert", | ||
| 724 | NID_id_smime_ct_publishCert,11,&(lvalues[1305]),0}, | ||
| 725 | {"id-smime-ct-TSTInfo","id-smime-ct-TSTInfo",NID_id_smime_ct_TSTInfo, | ||
| 726 | 11,&(lvalues[1316]),0}, | ||
| 727 | {"id-smime-ct-TDTInfo","id-smime-ct-TDTInfo",NID_id_smime_ct_TDTInfo, | ||
| 728 | 11,&(lvalues[1327]),0}, | ||
| 729 | {"id-smime-ct-contentInfo","id-smime-ct-contentInfo", | ||
| 730 | NID_id_smime_ct_contentInfo,11,&(lvalues[1338]),0}, | ||
| 731 | {"id-smime-ct-DVCSRequestData","id-smime-ct-DVCSRequestData", | ||
| 732 | NID_id_smime_ct_DVCSRequestData,11,&(lvalues[1349]),0}, | ||
| 733 | {"id-smime-ct-DVCSResponseData","id-smime-ct-DVCSResponseData", | ||
| 734 | NID_id_smime_ct_DVCSResponseData,11,&(lvalues[1360]),0}, | ||
| 735 | {"id-smime-aa-receiptRequest","id-smime-aa-receiptRequest", | ||
| 736 | NID_id_smime_aa_receiptRequest,11,&(lvalues[1371]),0}, | ||
| 737 | {"id-smime-aa-securityLabel","id-smime-aa-securityLabel", | ||
| 738 | NID_id_smime_aa_securityLabel,11,&(lvalues[1382]),0}, | ||
| 739 | {"id-smime-aa-mlExpandHistory","id-smime-aa-mlExpandHistory", | ||
| 740 | NID_id_smime_aa_mlExpandHistory,11,&(lvalues[1393]),0}, | ||
| 741 | {"id-smime-aa-contentHint","id-smime-aa-contentHint", | ||
| 742 | NID_id_smime_aa_contentHint,11,&(lvalues[1404]),0}, | ||
| 743 | {"id-smime-aa-msgSigDigest","id-smime-aa-msgSigDigest", | ||
| 744 | NID_id_smime_aa_msgSigDigest,11,&(lvalues[1415]),0}, | ||
| 745 | {"id-smime-aa-encapContentType","id-smime-aa-encapContentType", | ||
| 746 | NID_id_smime_aa_encapContentType,11,&(lvalues[1426]),0}, | ||
| 747 | {"id-smime-aa-contentIdentifier","id-smime-aa-contentIdentifier", | ||
| 748 | NID_id_smime_aa_contentIdentifier,11,&(lvalues[1437]),0}, | ||
| 749 | {"id-smime-aa-macValue","id-smime-aa-macValue", | ||
| 750 | NID_id_smime_aa_macValue,11,&(lvalues[1448]),0}, | ||
| 751 | {"id-smime-aa-equivalentLabels","id-smime-aa-equivalentLabels", | ||
| 752 | NID_id_smime_aa_equivalentLabels,11,&(lvalues[1459]),0}, | ||
| 753 | {"id-smime-aa-contentReference","id-smime-aa-contentReference", | ||
| 754 | NID_id_smime_aa_contentReference,11,&(lvalues[1470]),0}, | ||
| 755 | {"id-smime-aa-encrypKeyPref","id-smime-aa-encrypKeyPref", | ||
| 756 | NID_id_smime_aa_encrypKeyPref,11,&(lvalues[1481]),0}, | ||
| 757 | {"id-smime-aa-signingCertificate","id-smime-aa-signingCertificate", | ||
| 758 | NID_id_smime_aa_signingCertificate,11,&(lvalues[1492]),0}, | ||
| 759 | {"id-smime-aa-smimeEncryptCerts","id-smime-aa-smimeEncryptCerts", | ||
| 760 | NID_id_smime_aa_smimeEncryptCerts,11,&(lvalues[1503]),0}, | ||
| 761 | {"id-smime-aa-timeStampToken","id-smime-aa-timeStampToken", | ||
| 762 | NID_id_smime_aa_timeStampToken,11,&(lvalues[1514]),0}, | ||
| 763 | {"id-smime-aa-ets-sigPolicyId","id-smime-aa-ets-sigPolicyId", | ||
| 764 | NID_id_smime_aa_ets_sigPolicyId,11,&(lvalues[1525]),0}, | ||
| 765 | {"id-smime-aa-ets-commitmentType","id-smime-aa-ets-commitmentType", | ||
| 766 | NID_id_smime_aa_ets_commitmentType,11,&(lvalues[1536]),0}, | ||
| 767 | {"id-smime-aa-ets-signerLocation","id-smime-aa-ets-signerLocation", | ||
| 768 | NID_id_smime_aa_ets_signerLocation,11,&(lvalues[1547]),0}, | ||
| 769 | {"id-smime-aa-ets-signerAttr","id-smime-aa-ets-signerAttr", | ||
| 770 | NID_id_smime_aa_ets_signerAttr,11,&(lvalues[1558]),0}, | ||
| 771 | {"id-smime-aa-ets-otherSigCert","id-smime-aa-ets-otherSigCert", | ||
| 772 | NID_id_smime_aa_ets_otherSigCert,11,&(lvalues[1569]),0}, | ||
| 773 | {"id-smime-aa-ets-contentTimestamp", | ||
| 774 | "id-smime-aa-ets-contentTimestamp", | ||
| 775 | NID_id_smime_aa_ets_contentTimestamp,11,&(lvalues[1580]),0}, | ||
| 776 | {"id-smime-aa-ets-CertificateRefs","id-smime-aa-ets-CertificateRefs", | ||
| 777 | NID_id_smime_aa_ets_CertificateRefs,11,&(lvalues[1591]),0}, | ||
| 778 | {"id-smime-aa-ets-RevocationRefs","id-smime-aa-ets-RevocationRefs", | ||
| 779 | NID_id_smime_aa_ets_RevocationRefs,11,&(lvalues[1602]),0}, | ||
| 780 | {"id-smime-aa-ets-certValues","id-smime-aa-ets-certValues", | ||
| 781 | NID_id_smime_aa_ets_certValues,11,&(lvalues[1613]),0}, | ||
| 782 | {"id-smime-aa-ets-revocationValues", | ||
| 783 | "id-smime-aa-ets-revocationValues", | ||
| 784 | NID_id_smime_aa_ets_revocationValues,11,&(lvalues[1624]),0}, | ||
| 785 | {"id-smime-aa-ets-escTimeStamp","id-smime-aa-ets-escTimeStamp", | ||
| 786 | NID_id_smime_aa_ets_escTimeStamp,11,&(lvalues[1635]),0}, | ||
| 787 | {"id-smime-aa-ets-certCRLTimestamp", | ||
| 788 | "id-smime-aa-ets-certCRLTimestamp", | ||
| 789 | NID_id_smime_aa_ets_certCRLTimestamp,11,&(lvalues[1646]),0}, | ||
| 790 | {"id-smime-aa-ets-archiveTimeStamp", | ||
| 791 | "id-smime-aa-ets-archiveTimeStamp", | ||
| 792 | NID_id_smime_aa_ets_archiveTimeStamp,11,&(lvalues[1657]),0}, | ||
| 793 | {"id-smime-aa-signatureType","id-smime-aa-signatureType", | ||
| 794 | NID_id_smime_aa_signatureType,11,&(lvalues[1668]),0}, | ||
| 795 | {"id-smime-aa-dvcs-dvc","id-smime-aa-dvcs-dvc", | ||
| 796 | NID_id_smime_aa_dvcs_dvc,11,&(lvalues[1679]),0}, | ||
| 797 | {"id-smime-alg-ESDHwith3DES","id-smime-alg-ESDHwith3DES", | ||
| 798 | NID_id_smime_alg_ESDHwith3DES,11,&(lvalues[1690]),0}, | ||
| 799 | {"id-smime-alg-ESDHwithRC2","id-smime-alg-ESDHwithRC2", | ||
| 800 | NID_id_smime_alg_ESDHwithRC2,11,&(lvalues[1701]),0}, | ||
| 801 | {"id-smime-alg-3DESwrap","id-smime-alg-3DESwrap", | ||
| 802 | NID_id_smime_alg_3DESwrap,11,&(lvalues[1712]),0}, | ||
| 803 | {"id-smime-alg-RC2wrap","id-smime-alg-RC2wrap", | ||
| 804 | NID_id_smime_alg_RC2wrap,11,&(lvalues[1723]),0}, | ||
| 805 | {"id-smime-alg-ESDH","id-smime-alg-ESDH",NID_id_smime_alg_ESDH,11, | ||
| 806 | &(lvalues[1734]),0}, | ||
| 807 | {"id-smime-alg-CMS3DESwrap","id-smime-alg-CMS3DESwrap", | ||
| 808 | NID_id_smime_alg_CMS3DESwrap,11,&(lvalues[1745]),0}, | ||
| 809 | {"id-smime-alg-CMSRC2wrap","id-smime-alg-CMSRC2wrap", | ||
| 810 | NID_id_smime_alg_CMSRC2wrap,11,&(lvalues[1756]),0}, | ||
| 811 | {"id-smime-cd-ldap","id-smime-cd-ldap",NID_id_smime_cd_ldap,11, | ||
| 812 | &(lvalues[1767]),0}, | ||
| 813 | {"id-smime-spq-ets-sqt-uri","id-smime-spq-ets-sqt-uri", | ||
| 814 | NID_id_smime_spq_ets_sqt_uri,11,&(lvalues[1778]),0}, | ||
| 815 | {"id-smime-spq-ets-sqt-unotice","id-smime-spq-ets-sqt-unotice", | ||
| 816 | NID_id_smime_spq_ets_sqt_unotice,11,&(lvalues[1789]),0}, | ||
| 817 | {"id-smime-cti-ets-proofOfOrigin","id-smime-cti-ets-proofOfOrigin", | ||
| 818 | NID_id_smime_cti_ets_proofOfOrigin,11,&(lvalues[1800]),0}, | ||
| 819 | {"id-smime-cti-ets-proofOfReceipt","id-smime-cti-ets-proofOfReceipt", | ||
| 820 | NID_id_smime_cti_ets_proofOfReceipt,11,&(lvalues[1811]),0}, | ||
| 821 | {"id-smime-cti-ets-proofOfDelivery", | ||
| 822 | "id-smime-cti-ets-proofOfDelivery", | ||
| 823 | NID_id_smime_cti_ets_proofOfDelivery,11,&(lvalues[1822]),0}, | ||
| 824 | {"id-smime-cti-ets-proofOfSender","id-smime-cti-ets-proofOfSender", | ||
| 825 | NID_id_smime_cti_ets_proofOfSender,11,&(lvalues[1833]),0}, | ||
| 826 | {"id-smime-cti-ets-proofOfApproval", | ||
| 827 | "id-smime-cti-ets-proofOfApproval", | ||
| 828 | NID_id_smime_cti_ets_proofOfApproval,11,&(lvalues[1844]),0}, | ||
| 829 | {"id-smime-cti-ets-proofOfCreation", | ||
| 830 | "id-smime-cti-ets-proofOfCreation", | ||
| 831 | NID_id_smime_cti_ets_proofOfCreation,11,&(lvalues[1855]),0}, | ||
| 832 | {"MD4","md4",NID_md4,8,&(lvalues[1866]),0}, | ||
| 833 | {"id-pkix-mod","id-pkix-mod",NID_id_pkix_mod,7,&(lvalues[1874]),0}, | ||
| 834 | {"id-qt","id-qt",NID_id_qt,7,&(lvalues[1881]),0}, | ||
| 835 | {"id-it","id-it",NID_id_it,7,&(lvalues[1888]),0}, | ||
| 836 | {"id-pkip","id-pkip",NID_id_pkip,7,&(lvalues[1895]),0}, | ||
| 837 | {"id-alg","id-alg",NID_id_alg,7,&(lvalues[1902]),0}, | ||
| 838 | {"id-cmc","id-cmc",NID_id_cmc,7,&(lvalues[1909]),0}, | ||
| 839 | {"id-on","id-on",NID_id_on,7,&(lvalues[1916]),0}, | ||
| 840 | {"id-pda","id-pda",NID_id_pda,7,&(lvalues[1923]),0}, | ||
| 841 | {"id-aca","id-aca",NID_id_aca,7,&(lvalues[1930]),0}, | ||
| 842 | {"id-qcs","id-qcs",NID_id_qcs,7,&(lvalues[1937]),0}, | ||
| 843 | {"id-cct","id-cct",NID_id_cct,7,&(lvalues[1944]),0}, | ||
| 844 | {"id-pkix1-explicit-88","id-pkix1-explicit-88", | ||
| 845 | NID_id_pkix1_explicit_88,8,&(lvalues[1951]),0}, | ||
| 846 | {"id-pkix1-implicit-88","id-pkix1-implicit-88", | ||
| 847 | NID_id_pkix1_implicit_88,8,&(lvalues[1959]),0}, | ||
| 848 | {"id-pkix1-explicit-93","id-pkix1-explicit-93", | ||
| 849 | NID_id_pkix1_explicit_93,8,&(lvalues[1967]),0}, | ||
| 850 | {"id-pkix1-implicit-93","id-pkix1-implicit-93", | ||
| 851 | NID_id_pkix1_implicit_93,8,&(lvalues[1975]),0}, | ||
| 852 | {"id-mod-crmf","id-mod-crmf",NID_id_mod_crmf,8,&(lvalues[1983]),0}, | ||
| 853 | {"id-mod-cmc","id-mod-cmc",NID_id_mod_cmc,8,&(lvalues[1991]),0}, | ||
| 854 | {"id-mod-kea-profile-88","id-mod-kea-profile-88", | ||
| 855 | NID_id_mod_kea_profile_88,8,&(lvalues[1999]),0}, | ||
| 856 | {"id-mod-kea-profile-93","id-mod-kea-profile-93", | ||
| 857 | NID_id_mod_kea_profile_93,8,&(lvalues[2007]),0}, | ||
| 858 | {"id-mod-cmp","id-mod-cmp",NID_id_mod_cmp,8,&(lvalues[2015]),0}, | ||
| 859 | {"id-mod-qualified-cert-88","id-mod-qualified-cert-88", | ||
| 860 | NID_id_mod_qualified_cert_88,8,&(lvalues[2023]),0}, | ||
| 861 | {"id-mod-qualified-cert-93","id-mod-qualified-cert-93", | ||
| 862 | NID_id_mod_qualified_cert_93,8,&(lvalues[2031]),0}, | ||
| 863 | {"id-mod-attribute-cert","id-mod-attribute-cert", | ||
| 864 | NID_id_mod_attribute_cert,8,&(lvalues[2039]),0}, | ||
| 865 | {"id-mod-timestamp-protocol","id-mod-timestamp-protocol", | ||
| 866 | NID_id_mod_timestamp_protocol,8,&(lvalues[2047]),0}, | ||
| 867 | {"id-mod-ocsp","id-mod-ocsp",NID_id_mod_ocsp,8,&(lvalues[2055]),0}, | ||
| 868 | {"id-mod-dvcs","id-mod-dvcs",NID_id_mod_dvcs,8,&(lvalues[2063]),0}, | ||
| 869 | {"id-mod-cmp2000","id-mod-cmp2000",NID_id_mod_cmp2000,8, | ||
| 870 | &(lvalues[2071]),0}, | ||
| 871 | {"biometricInfo","Biometric Info",NID_biometricInfo,8,&(lvalues[2079]),0}, | ||
| 872 | {"qcStatements","qcStatements",NID_qcStatements,8,&(lvalues[2087]),0}, | ||
| 873 | {"ac-auditEntity","ac-auditEntity",NID_ac_auditEntity,8, | ||
| 874 | &(lvalues[2095]),0}, | ||
| 875 | {"ac-targeting","ac-targeting",NID_ac_targeting,8,&(lvalues[2103]),0}, | ||
| 876 | {"aaControls","aaControls",NID_aaControls,8,&(lvalues[2111]),0}, | ||
| 877 | {"sbqp-ipAddrBlock","sbqp-ipAddrBlock",NID_sbqp_ipAddrBlock,8, | ||
| 878 | &(lvalues[2119]),0}, | ||
| 879 | {"sbqp-autonomousSysNum","sbqp-autonomousSysNum", | ||
| 880 | NID_sbqp_autonomousSysNum,8,&(lvalues[2127]),0}, | ||
| 881 | {"sbqp-routerIdentifier","sbqp-routerIdentifier", | ||
| 882 | NID_sbqp_routerIdentifier,8,&(lvalues[2135]),0}, | ||
| 883 | {"textNotice","textNotice",NID_textNotice,8,&(lvalues[2143]),0}, | ||
| 884 | {"ipsecEndSystem","IPSec End System",NID_ipsecEndSystem,8, | ||
| 885 | &(lvalues[2151]),0}, | ||
| 886 | {"ipsecTunnel","IPSec Tunnel",NID_ipsecTunnel,8,&(lvalues[2159]),0}, | ||
| 887 | {"ipsecUser","IPSec User",NID_ipsecUser,8,&(lvalues[2167]),0}, | ||
| 888 | {"DVCS","dvcs",NID_dvcs,8,&(lvalues[2175]),0}, | ||
| 889 | {"id-it-caProtEncCert","id-it-caProtEncCert",NID_id_it_caProtEncCert, | ||
| 890 | 8,&(lvalues[2183]),0}, | ||
| 891 | {"id-it-signKeyPairTypes","id-it-signKeyPairTypes", | ||
| 892 | NID_id_it_signKeyPairTypes,8,&(lvalues[2191]),0}, | ||
| 893 | {"id-it-encKeyPairTypes","id-it-encKeyPairTypes", | ||
| 894 | NID_id_it_encKeyPairTypes,8,&(lvalues[2199]),0}, | ||
| 895 | {"id-it-preferredSymmAlg","id-it-preferredSymmAlg", | ||
| 896 | NID_id_it_preferredSymmAlg,8,&(lvalues[2207]),0}, | ||
| 897 | {"id-it-caKeyUpdateInfo","id-it-caKeyUpdateInfo", | ||
| 898 | NID_id_it_caKeyUpdateInfo,8,&(lvalues[2215]),0}, | ||
| 899 | {"id-it-currentCRL","id-it-currentCRL",NID_id_it_currentCRL,8, | ||
| 900 | &(lvalues[2223]),0}, | ||
| 901 | {"id-it-unsupportedOIDs","id-it-unsupportedOIDs", | ||
| 902 | NID_id_it_unsupportedOIDs,8,&(lvalues[2231]),0}, | ||
| 903 | {"id-it-subscriptionRequest","id-it-subscriptionRequest", | ||
| 904 | NID_id_it_subscriptionRequest,8,&(lvalues[2239]),0}, | ||
| 905 | {"id-it-subscriptionResponse","id-it-subscriptionResponse", | ||
| 906 | NID_id_it_subscriptionResponse,8,&(lvalues[2247]),0}, | ||
| 907 | {"id-it-keyPairParamReq","id-it-keyPairParamReq", | ||
| 908 | NID_id_it_keyPairParamReq,8,&(lvalues[2255]),0}, | ||
| 909 | {"id-it-keyPairParamRep","id-it-keyPairParamRep", | ||
| 910 | NID_id_it_keyPairParamRep,8,&(lvalues[2263]),0}, | ||
| 911 | {"id-it-revPassphrase","id-it-revPassphrase",NID_id_it_revPassphrase, | ||
| 912 | 8,&(lvalues[2271]),0}, | ||
| 913 | {"id-it-implicitConfirm","id-it-implicitConfirm", | ||
| 914 | NID_id_it_implicitConfirm,8,&(lvalues[2279]),0}, | ||
| 915 | {"id-it-confirmWaitTime","id-it-confirmWaitTime", | ||
| 916 | NID_id_it_confirmWaitTime,8,&(lvalues[2287]),0}, | ||
| 917 | {"id-it-origPKIMessage","id-it-origPKIMessage", | ||
| 918 | NID_id_it_origPKIMessage,8,&(lvalues[2295]),0}, | ||
| 919 | {"id-regCtrl","id-regCtrl",NID_id_regCtrl,8,&(lvalues[2303]),0}, | ||
| 920 | {"id-regInfo","id-regInfo",NID_id_regInfo,8,&(lvalues[2311]),0}, | ||
| 921 | {"id-regCtrl-regToken","id-regCtrl-regToken",NID_id_regCtrl_regToken, | ||
| 922 | 9,&(lvalues[2319]),0}, | ||
| 923 | {"id-regCtrl-authenticator","id-regCtrl-authenticator", | ||
| 924 | NID_id_regCtrl_authenticator,9,&(lvalues[2328]),0}, | ||
| 925 | {"id-regCtrl-pkiPublicationInfo","id-regCtrl-pkiPublicationInfo", | ||
| 926 | NID_id_regCtrl_pkiPublicationInfo,9,&(lvalues[2337]),0}, | ||
| 927 | {"id-regCtrl-pkiArchiveOptions","id-regCtrl-pkiArchiveOptions", | ||
| 928 | NID_id_regCtrl_pkiArchiveOptions,9,&(lvalues[2346]),0}, | ||
| 929 | {"id-regCtrl-oldCertID","id-regCtrl-oldCertID", | ||
| 930 | NID_id_regCtrl_oldCertID,9,&(lvalues[2355]),0}, | ||
| 931 | {"id-regCtrl-protocolEncrKey","id-regCtrl-protocolEncrKey", | ||
| 932 | NID_id_regCtrl_protocolEncrKey,9,&(lvalues[2364]),0}, | ||
| 933 | {"id-regInfo-utf8Pairs","id-regInfo-utf8Pairs", | ||
| 934 | NID_id_regInfo_utf8Pairs,9,&(lvalues[2373]),0}, | ||
| 935 | {"id-regInfo-certReq","id-regInfo-certReq",NID_id_regInfo_certReq,9, | ||
| 936 | &(lvalues[2382]),0}, | ||
| 937 | {"id-alg-des40","id-alg-des40",NID_id_alg_des40,8,&(lvalues[2391]),0}, | ||
| 938 | {"id-alg-noSignature","id-alg-noSignature",NID_id_alg_noSignature,8, | ||
| 939 | &(lvalues[2399]),0}, | ||
| 940 | {"id-alg-dh-sig-hmac-sha1","id-alg-dh-sig-hmac-sha1", | ||
| 941 | NID_id_alg_dh_sig_hmac_sha1,8,&(lvalues[2407]),0}, | ||
| 942 | {"id-alg-dh-pop","id-alg-dh-pop",NID_id_alg_dh_pop,8,&(lvalues[2415]),0}, | ||
| 943 | {"id-cmc-statusInfo","id-cmc-statusInfo",NID_id_cmc_statusInfo,8, | ||
| 944 | &(lvalues[2423]),0}, | ||
| 945 | {"id-cmc-identification","id-cmc-identification", | ||
| 946 | NID_id_cmc_identification,8,&(lvalues[2431]),0}, | ||
| 947 | {"id-cmc-identityProof","id-cmc-identityProof", | ||
| 948 | NID_id_cmc_identityProof,8,&(lvalues[2439]),0}, | ||
| 949 | {"id-cmc-dataReturn","id-cmc-dataReturn",NID_id_cmc_dataReturn,8, | ||
| 950 | &(lvalues[2447]),0}, | ||
| 951 | {"id-cmc-transactionId","id-cmc-transactionId", | ||
| 952 | NID_id_cmc_transactionId,8,&(lvalues[2455]),0}, | ||
| 953 | {"id-cmc-senderNonce","id-cmc-senderNonce",NID_id_cmc_senderNonce,8, | ||
| 954 | &(lvalues[2463]),0}, | ||
| 955 | {"id-cmc-recipientNonce","id-cmc-recipientNonce", | ||
| 956 | NID_id_cmc_recipientNonce,8,&(lvalues[2471]),0}, | ||
| 957 | {"id-cmc-addExtensions","id-cmc-addExtensions", | ||
| 958 | NID_id_cmc_addExtensions,8,&(lvalues[2479]),0}, | ||
| 959 | {"id-cmc-encryptedPOP","id-cmc-encryptedPOP",NID_id_cmc_encryptedPOP, | ||
| 960 | 8,&(lvalues[2487]),0}, | ||
| 961 | {"id-cmc-decryptedPOP","id-cmc-decryptedPOP",NID_id_cmc_decryptedPOP, | ||
| 962 | 8,&(lvalues[2495]),0}, | ||
| 963 | {"id-cmc-lraPOPWitness","id-cmc-lraPOPWitness", | ||
| 964 | NID_id_cmc_lraPOPWitness,8,&(lvalues[2503]),0}, | ||
| 965 | {"id-cmc-getCert","id-cmc-getCert",NID_id_cmc_getCert,8, | ||
| 966 | &(lvalues[2511]),0}, | ||
| 967 | {"id-cmc-getCRL","id-cmc-getCRL",NID_id_cmc_getCRL,8,&(lvalues[2519]),0}, | ||
| 968 | {"id-cmc-revokeRequest","id-cmc-revokeRequest", | ||
| 969 | NID_id_cmc_revokeRequest,8,&(lvalues[2527]),0}, | ||
| 970 | {"id-cmc-regInfo","id-cmc-regInfo",NID_id_cmc_regInfo,8, | ||
| 971 | &(lvalues[2535]),0}, | ||
| 972 | {"id-cmc-responseInfo","id-cmc-responseInfo",NID_id_cmc_responseInfo, | ||
| 973 | 8,&(lvalues[2543]),0}, | ||
| 974 | {"id-cmc-queryPending","id-cmc-queryPending",NID_id_cmc_queryPending, | ||
| 975 | 8,&(lvalues[2551]),0}, | ||
| 976 | {"id-cmc-popLinkRandom","id-cmc-popLinkRandom", | ||
| 977 | NID_id_cmc_popLinkRandom,8,&(lvalues[2559]),0}, | ||
| 978 | {"id-cmc-popLinkWitness","id-cmc-popLinkWitness", | ||
| 979 | NID_id_cmc_popLinkWitness,8,&(lvalues[2567]),0}, | ||
| 980 | {"id-cmc-confirmCertAcceptance","id-cmc-confirmCertAcceptance", | ||
| 981 | NID_id_cmc_confirmCertAcceptance,8,&(lvalues[2575]),0}, | ||
| 982 | {"id-on-personalData","id-on-personalData",NID_id_on_personalData,8, | ||
| 983 | &(lvalues[2583]),0}, | ||
| 984 | {"id-pda-dateOfBirth","id-pda-dateOfBirth",NID_id_pda_dateOfBirth,8, | ||
| 985 | &(lvalues[2591]),0}, | ||
| 986 | {"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth, | ||
| 987 | 8,&(lvalues[2599]),0}, | ||
| 988 | {"id-pda-pseudonym","id-pda-pseudonym",NID_id_pda_pseudonym,8, | ||
| 989 | &(lvalues[2607]),0}, | ||
| 990 | {"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2615]),0}, | ||
| 991 | {"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship", | ||
| 992 | NID_id_pda_countryOfCitizenship,8,&(lvalues[2623]),0}, | ||
| 993 | {"id-pda-countryOfResidence","id-pda-countryOfResidence", | ||
| 994 | NID_id_pda_countryOfResidence,8,&(lvalues[2631]),0}, | ||
| 995 | {"id-aca-authenticationInfo","id-aca-authenticationInfo", | ||
| 996 | NID_id_aca_authenticationInfo,8,&(lvalues[2639]),0}, | ||
| 997 | {"id-aca-accessIdentity","id-aca-accessIdentity", | ||
| 998 | NID_id_aca_accessIdentity,8,&(lvalues[2647]),0}, | ||
| 999 | {"id-aca-chargingIdentity","id-aca-chargingIdentity", | ||
| 1000 | NID_id_aca_chargingIdentity,8,&(lvalues[2655]),0}, | ||
| 1001 | {"id-aca-group","id-aca-group",NID_id_aca_group,8,&(lvalues[2663]),0}, | ||
| 1002 | {"id-aca-role","id-aca-role",NID_id_aca_role,8,&(lvalues[2671]),0}, | ||
| 1003 | {"id-qcs-pkixQCSyntax-v1","id-qcs-pkixQCSyntax-v1", | ||
| 1004 | NID_id_qcs_pkixQCSyntax_v1,8,&(lvalues[2679]),0}, | ||
| 1005 | {"id-cct-crs","id-cct-crs",NID_id_cct_crs,8,&(lvalues[2687]),0}, | ||
| 1006 | {"id-cct-PKIData","id-cct-PKIData",NID_id_cct_PKIData,8, | ||
| 1007 | &(lvalues[2695]),0}, | ||
| 1008 | {"id-cct-PKIResponse","id-cct-PKIResponse",NID_id_cct_PKIResponse,8, | ||
| 1009 | &(lvalues[2703]),0}, | ||
| 1010 | {"ad_timestamping","AD Time Stamping",NID_ad_timeStamping,8, | ||
| 1011 | &(lvalues[2711]),0}, | ||
| 1012 | {"AD_DVCS","ad dvcs",NID_ad_dvcs,8,&(lvalues[2719]),0}, | ||
| 1013 | {"basicOCSPResponse","Basic OCSP Response",NID_id_pkix_OCSP_basic,9, | ||
| 1014 | &(lvalues[2727]),0}, | ||
| 1015 | {"Nonce","OCSP Nonce",NID_id_pkix_OCSP_Nonce,9,&(lvalues[2736]),0}, | ||
| 1016 | {"CrlID","OCSP CRL ID",NID_id_pkix_OCSP_CrlID,9,&(lvalues[2745]),0}, | ||
| 1017 | {"acceptableResponses","Acceptable OCSP Responses", | ||
| 1018 | NID_id_pkix_OCSP_acceptableResponses,9,&(lvalues[2754]),0}, | ||
| 1019 | {"noCheck","noCheck",NID_id_pkix_OCSP_noCheck,9,&(lvalues[2763]),0}, | ||
| 1020 | {"archiveCutoff","OCSP Archive Cutoff",NID_id_pkix_OCSP_archiveCutoff, | ||
| 1021 | 9,&(lvalues[2772]),0}, | ||
| 1022 | {"serviceLocator","OCSP Service Locator", | ||
| 1023 | NID_id_pkix_OCSP_serviceLocator,9,&(lvalues[2781]),0}, | ||
| 1024 | {"extendedStatus","Extended OCSP Status", | ||
| 1025 | NID_id_pkix_OCSP_extendedStatus,9,&(lvalues[2790]),0}, | ||
| 1026 | {"valid","valid",NID_id_pkix_OCSP_valid,9,&(lvalues[2799]),0}, | ||
| 1027 | {"path","path",NID_id_pkix_OCSP_path,9,&(lvalues[2808]),0}, | ||
| 1028 | {"trustRoot","Trust Root",NID_id_pkix_OCSP_trustRoot,9, | ||
| 1029 | &(lvalues[2817]),0}, | ||
| 1030 | {"algorithm","algorithm",NID_algorithm,4,&(lvalues[2826]),0}, | ||
| 1031 | {"rsaSignature","rsaSignature",NID_rsaSignature,5,&(lvalues[2830]),0}, | ||
| 1032 | {"X500algorithms","directory services - algorithms", | ||
| 1033 | NID_X500algorithms,2,&(lvalues[2835]),0}, | ||
| 1034 | {"ORG","org",NID_org,1,&(lvalues[2837]),0}, | ||
| 1035 | {"DOD","dod",NID_dod,2,&(lvalues[2838]),0}, | ||
| 1036 | {"IANA","iana",NID_iana,3,&(lvalues[2840]),0}, | ||
| 1037 | {"directory","Directory",NID_Directory,4,&(lvalues[2843]),0}, | ||
| 1038 | {"mgmt","Management",NID_Management,4,&(lvalues[2847]),0}, | ||
| 1039 | {"experimental","Experimental",NID_Experimental,4,&(lvalues[2851]),0}, | ||
| 1040 | {"private","Private",NID_Private,4,&(lvalues[2855]),0}, | ||
| 1041 | {"security","Security",NID_Security,4,&(lvalues[2859]),0}, | ||
| 1042 | {"snmpv2","SNMPv2",NID_SNMPv2,4,&(lvalues[2863]),0}, | ||
| 1043 | {"mail","Mail",NID_Mail,4,&(lvalues[2867]),0}, | ||
| 1044 | {"enterprises","Enterprises",NID_Enterprises,1,&(lvalues[2871]),0}, | ||
| 1045 | {"dcobject","dcObject",NID_dcObject,3,&(lvalues[2872]),0}, | ||
| 1046 | {"DC","domainComponent",NID_domainComponent,10,&(lvalues[2875]),0}, | ||
| 1047 | {"domain","Domain",NID_Domain,10,&(lvalues[2885]),0}, | ||
| 1048 | }; | ||
| 1049 | |||
| 1050 | static ASN1_OBJECT *sn_objs[NUM_SN]={ | ||
| 1051 | &(nid_objs[364]),/* "AD_DVCS" */ | ||
| 1052 | &(nid_objs[91]),/* "BF-CBC" */ | ||
| 1053 | &(nid_objs[93]),/* "BF-CFB" */ | ||
| 1054 | &(nid_objs[92]),/* "BF-ECB" */ | ||
| 1055 | &(nid_objs[94]),/* "BF-OFB" */ | ||
| 1056 | &(nid_objs[14]),/* "C" */ | ||
| 1057 | &(nid_objs[108]),/* "CAST5-CBC" */ | ||
| 1058 | &(nid_objs[110]),/* "CAST5-CFB" */ | ||
| 1059 | &(nid_objs[109]),/* "CAST5-ECB" */ | ||
| 1060 | &(nid_objs[111]),/* "CAST5-OFB" */ | ||
| 1061 | &(nid_objs[13]),/* "CN" */ | ||
| 1062 | &(nid_objs[141]),/* "CRLReason" */ | ||
| 1063 | &(nid_objs[367]),/* "CrlID" */ | ||
| 1064 | &(nid_objs[107]),/* "D" */ | ||
| 1065 | &(nid_objs[391]),/* "DC" */ | ||
| 1066 | &(nid_objs[31]),/* "DES-CBC" */ | ||
| 1067 | &(nid_objs[30]),/* "DES-CFB" */ | ||
| 1068 | &(nid_objs[29]),/* "DES-ECB" */ | ||
| 1069 | &(nid_objs[32]),/* "DES-EDE" */ | ||
| 1070 | &(nid_objs[43]),/* "DES-EDE-CBC" */ | ||
| 1071 | &(nid_objs[60]),/* "DES-EDE-CFB" */ | ||
| 1072 | &(nid_objs[62]),/* "DES-EDE-OFB" */ | ||
| 1073 | &(nid_objs[33]),/* "DES-EDE3" */ | ||
| 1074 | &(nid_objs[44]),/* "DES-EDE3-CBC" */ | ||
| 1075 | &(nid_objs[61]),/* "DES-EDE3-CFB" */ | ||
| 1076 | &(nid_objs[63]),/* "DES-EDE3-OFB" */ | ||
| 1077 | &(nid_objs[45]),/* "DES-OFB" */ | ||
| 1078 | &(nid_objs[80]),/* "DESX-CBC" */ | ||
| 1079 | &(nid_objs[380]),/* "DOD" */ | ||
| 1080 | &(nid_objs[116]),/* "DSA" */ | ||
| 1081 | &(nid_objs[66]),/* "DSA-SHA" */ | ||
| 1082 | &(nid_objs[113]),/* "DSA-SHA1" */ | ||
| 1083 | &(nid_objs[70]),/* "DSA-SHA1-old" */ | ||
| 1084 | &(nid_objs[67]),/* "DSA-old" */ | ||
| 1085 | &(nid_objs[297]),/* "DVCS" */ | ||
| 1086 | &(nid_objs[48]),/* "Email" */ | ||
| 1087 | &(nid_objs[99]),/* "G" */ | ||
| 1088 | &(nid_objs[101]),/* "I" */ | ||
| 1089 | &(nid_objs[381]),/* "IANA" */ | ||
| 1090 | &(nid_objs[34]),/* "IDEA-CBC" */ | ||
| 1091 | &(nid_objs[35]),/* "IDEA-CFB" */ | ||
| 1092 | &(nid_objs[36]),/* "IDEA-ECB" */ | ||
| 1093 | &(nid_objs[46]),/* "IDEA-OFB" */ | ||
| 1094 | &(nid_objs[181]),/* "ISO" */ | ||
| 1095 | &(nid_objs[183]),/* "ISO-US" */ | ||
| 1096 | &(nid_objs[15]),/* "L" */ | ||
| 1097 | &(nid_objs[ 3]),/* "MD2" */ | ||
| 1098 | &(nid_objs[257]),/* "MD4" */ | ||
| 1099 | &(nid_objs[ 4]),/* "MD5" */ | ||
| 1100 | &(nid_objs[114]),/* "MD5-SHA1" */ | ||
| 1101 | &(nid_objs[95]),/* "MDC2" */ | ||
| 1102 | &(nid_objs[57]),/* "Netscape" */ | ||
| 1103 | &(nid_objs[366]),/* "Nonce" */ | ||
| 1104 | &(nid_objs[17]),/* "O" */ | ||
| 1105 | &(nid_objs[178]),/* "OCSP" */ | ||
| 1106 | &(nid_objs[180]),/* "OCSPSigning" */ | ||
| 1107 | &(nid_objs[379]),/* "ORG" */ | ||
| 1108 | &(nid_objs[18]),/* "OU" */ | ||
| 1109 | &(nid_objs[ 9]),/* "PBE-MD2-DES" */ | ||
| 1110 | &(nid_objs[168]),/* "PBE-MD2-RC2-64" */ | ||
| 1111 | &(nid_objs[10]),/* "PBE-MD5-DES" */ | ||
| 1112 | &(nid_objs[169]),/* "PBE-MD5-RC2-64" */ | ||
| 1113 | &(nid_objs[147]),/* "PBE-SHA1-2DES" */ | ||
| 1114 | &(nid_objs[146]),/* "PBE-SHA1-3DES" */ | ||
| 1115 | &(nid_objs[170]),/* "PBE-SHA1-DES" */ | ||
| 1116 | &(nid_objs[148]),/* "PBE-SHA1-RC2-128" */ | ||
| 1117 | &(nid_objs[149]),/* "PBE-SHA1-RC2-40" */ | ||
| 1118 | &(nid_objs[68]),/* "PBE-SHA1-RC2-64" */ | ||
| 1119 | &(nid_objs[144]),/* "PBE-SHA1-RC4-128" */ | ||
| 1120 | &(nid_objs[145]),/* "PBE-SHA1-RC4-40" */ | ||
| 1121 | &(nid_objs[161]),/* "PBES2" */ | ||
| 1122 | &(nid_objs[69]),/* "PBKDF2" */ | ||
| 1123 | &(nid_objs[162]),/* "PBMAC1" */ | ||
| 1124 | &(nid_objs[127]),/* "PKIX" */ | ||
| 1125 | &(nid_objs[98]),/* "RC2-40-CBC" */ | ||
| 1126 | &(nid_objs[166]),/* "RC2-64-CBC" */ | ||
| 1127 | &(nid_objs[37]),/* "RC2-CBC" */ | ||
| 1128 | &(nid_objs[39]),/* "RC2-CFB" */ | ||
| 1129 | &(nid_objs[38]),/* "RC2-ECB" */ | ||
| 1130 | &(nid_objs[40]),/* "RC2-OFB" */ | ||
| 1131 | &(nid_objs[ 5]),/* "RC4" */ | ||
| 1132 | &(nid_objs[97]),/* "RC4-40" */ | ||
| 1133 | &(nid_objs[120]),/* "RC5-CBC" */ | ||
| 1134 | &(nid_objs[122]),/* "RC5-CFB" */ | ||
| 1135 | &(nid_objs[121]),/* "RC5-ECB" */ | ||
| 1136 | &(nid_objs[123]),/* "RC5-OFB" */ | ||
| 1137 | &(nid_objs[117]),/* "RIPEMD160" */ | ||
| 1138 | &(nid_objs[124]),/* "RLE" */ | ||
| 1139 | &(nid_objs[19]),/* "RSA" */ | ||
| 1140 | &(nid_objs[ 7]),/* "RSA-MD2" */ | ||
| 1141 | &(nid_objs[ 8]),/* "RSA-MD5" */ | ||
| 1142 | &(nid_objs[96]),/* "RSA-MDC2" */ | ||
| 1143 | &(nid_objs[104]),/* "RSA-NP-MD5" */ | ||
| 1144 | &(nid_objs[119]),/* "RSA-RIPEMD160" */ | ||
| 1145 | &(nid_objs[42]),/* "RSA-SHA" */ | ||
| 1146 | &(nid_objs[65]),/* "RSA-SHA1" */ | ||
| 1147 | &(nid_objs[115]),/* "RSA-SHA1-2" */ | ||
| 1148 | &(nid_objs[100]),/* "S" */ | ||
| 1149 | &(nid_objs[41]),/* "SHA" */ | ||
| 1150 | &(nid_objs[64]),/* "SHA1" */ | ||
| 1151 | &(nid_objs[188]),/* "SMIME" */ | ||
| 1152 | &(nid_objs[167]),/* "SMIME-CAPS" */ | ||
| 1153 | &(nid_objs[105]),/* "SN" */ | ||
| 1154 | &(nid_objs[16]),/* "ST" */ | ||
| 1155 | &(nid_objs[143]),/* "SXNetID" */ | ||
| 1156 | &(nid_objs[106]),/* "T" */ | ||
| 1157 | &(nid_objs[102]),/* "UID" */ | ||
| 1158 | &(nid_objs[ 0]),/* "UNDEF" */ | ||
| 1159 | &(nid_objs[11]),/* "X500" */ | ||
| 1160 | &(nid_objs[378]),/* "X500algorithms" */ | ||
| 1161 | &(nid_objs[12]),/* "X509" */ | ||
| 1162 | &(nid_objs[184]),/* "X9-57" */ | ||
| 1163 | &(nid_objs[185]),/* "X9cm" */ | ||
| 1164 | &(nid_objs[125]),/* "ZLIB" */ | ||
| 1165 | &(nid_objs[289]),/* "aaControls" */ | ||
| 1166 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
| 1167 | &(nid_objs[288]),/* "ac-targeting" */ | ||
| 1168 | &(nid_objs[368]),/* "acceptableResponses" */ | ||
| 1169 | &(nid_objs[363]),/* "ad_timestamping" */ | ||
| 1170 | &(nid_objs[376]),/* "algorithm" */ | ||
| 1171 | &(nid_objs[370]),/* "archiveCutoff" */ | ||
| 1172 | &(nid_objs[177]),/* "authorityInfoAccess" */ | ||
| 1173 | &(nid_objs[90]),/* "authorityKeyIdentifier" */ | ||
| 1174 | &(nid_objs[87]),/* "basicConstraints" */ | ||
| 1175 | &(nid_objs[365]),/* "basicOCSPResponse" */ | ||
| 1176 | &(nid_objs[285]),/* "biometricInfo" */ | ||
| 1177 | &(nid_objs[179]),/* "caIssuers" */ | ||
| 1178 | &(nid_objs[152]),/* "certBag" */ | ||
| 1179 | &(nid_objs[89]),/* "certificatePolicies" */ | ||
| 1180 | &(nid_objs[54]),/* "challengePassword" */ | ||
| 1181 | &(nid_objs[130]),/* "clientAuth" */ | ||
| 1182 | &(nid_objs[131]),/* "codeSigning" */ | ||
| 1183 | &(nid_objs[50]),/* "contentType" */ | ||
| 1184 | &(nid_objs[53]),/* "countersignature" */ | ||
| 1185 | &(nid_objs[153]),/* "crlBag" */ | ||
| 1186 | &(nid_objs[103]),/* "crlDistributionPoints" */ | ||
| 1187 | &(nid_objs[88]),/* "crlNumber" */ | ||
| 1188 | &(nid_objs[390]),/* "dcobject" */ | ||
| 1189 | &(nid_objs[140]),/* "deltaCRL" */ | ||
| 1190 | &(nid_objs[28]),/* "dhKeyAgreement" */ | ||
| 1191 | &(nid_objs[382]),/* "directory" */ | ||
| 1192 | &(nid_objs[174]),/* "dnQualifier" */ | ||
| 1193 | &(nid_objs[392]),/* "domain" */ | ||
| 1194 | &(nid_objs[132]),/* "emailProtection" */ | ||
| 1195 | &(nid_objs[389]),/* "enterprises" */ | ||
| 1196 | &(nid_objs[384]),/* "experimental" */ | ||
| 1197 | &(nid_objs[172]),/* "extReq" */ | ||
| 1198 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | ||
| 1199 | &(nid_objs[126]),/* "extendedKeyUsage" */ | ||
| 1200 | &(nid_objs[372]),/* "extendedStatus" */ | ||
| 1201 | &(nid_objs[156]),/* "friendlyName" */ | ||
| 1202 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
| 1203 | &(nid_objs[266]),/* "id-aca" */ | ||
| 1204 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
| 1205 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
| 1206 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
| 1207 | &(nid_objs[357]),/* "id-aca-group" */ | ||
| 1208 | &(nid_objs[358]),/* "id-aca-role" */ | ||
| 1209 | &(nid_objs[176]),/* "id-ad" */ | ||
| 1210 | &(nid_objs[262]),/* "id-alg" */ | ||
| 1211 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
| 1212 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
| 1213 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
| 1214 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
| 1215 | &(nid_objs[268]),/* "id-cct" */ | ||
| 1216 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
| 1217 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
| 1218 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
| 1219 | &(nid_objs[81]),/* "id-ce" */ | ||
| 1220 | &(nid_objs[263]),/* "id-cmc" */ | ||
| 1221 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
| 1222 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
| 1223 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
| 1224 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
| 1225 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
| 1226 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
| 1227 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
| 1228 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
| 1229 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
| 1230 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
| 1231 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
| 1232 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
| 1233 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
| 1234 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
| 1235 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
| 1236 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
| 1237 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
| 1238 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
| 1239 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
| 1240 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
| 1241 | &(nid_objs[260]),/* "id-it" */ | ||
| 1242 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
| 1243 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
| 1244 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
| 1245 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
| 1246 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
| 1247 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
| 1248 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
| 1249 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
| 1250 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
| 1251 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
| 1252 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
| 1253 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
| 1254 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
| 1255 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
| 1256 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
| 1257 | &(nid_objs[128]),/* "id-kp" */ | ||
| 1258 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
| 1259 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
| 1260 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
| 1261 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
| 1262 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
| 1263 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
| 1264 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
| 1265 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
| 1266 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
| 1267 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
| 1268 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
| 1269 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
| 1270 | &(nid_objs[264]),/* "id-on" */ | ||
| 1271 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
| 1272 | &(nid_objs[265]),/* "id-pda" */ | ||
| 1273 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
| 1274 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
| 1275 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
| 1276 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
| 1277 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
| 1278 | &(nid_objs[350]),/* "id-pda-pseudonym" */ | ||
| 1279 | &(nid_objs[175]),/* "id-pe" */ | ||
| 1280 | &(nid_objs[261]),/* "id-pkip" */ | ||
| 1281 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
| 1282 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
| 1283 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
| 1284 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
| 1285 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
| 1286 | &(nid_objs[267]),/* "id-qcs" */ | ||
| 1287 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
| 1288 | &(nid_objs[259]),/* "id-qt" */ | ||
| 1289 | &(nid_objs[164]),/* "id-qt-cps" */ | ||
| 1290 | &(nid_objs[165]),/* "id-qt-unotice" */ | ||
| 1291 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
| 1292 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
| 1293 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
| 1294 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
| 1295 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
| 1296 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
| 1297 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
| 1298 | &(nid_objs[314]),/* "id-regInfo" */ | ||
| 1299 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
| 1300 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
| 1301 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
| 1302 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
| 1303 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
| 1304 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
| 1305 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
| 1306 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
| 1307 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
| 1308 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
| 1309 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
| 1310 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
| 1311 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
| 1312 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
| 1313 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
| 1314 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
| 1315 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
| 1316 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
| 1317 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
| 1318 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
| 1319 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
| 1320 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
| 1321 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
| 1322 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
| 1323 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
| 1324 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
| 1325 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
| 1326 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
| 1327 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
| 1328 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
| 1329 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
| 1330 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
| 1331 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
| 1332 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
| 1333 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
| 1334 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
| 1335 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
| 1336 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
| 1337 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
| 1338 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
| 1339 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
| 1340 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
| 1341 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
| 1342 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
| 1343 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
| 1344 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
| 1345 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
| 1346 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
| 1347 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
| 1348 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
| 1349 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
| 1350 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
| 1351 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
| 1352 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
| 1353 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
| 1354 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
| 1355 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
| 1356 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
| 1357 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
| 1358 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
| 1359 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
| 1360 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
| 1361 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
| 1362 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
| 1363 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
| 1364 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
| 1365 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
| 1366 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
| 1367 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
| 1368 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
| 1369 | &(nid_objs[142]),/* "invalidityDate" */ | ||
| 1370 | &(nid_objs[294]),/* "ipsecEndSystem" */ | ||
| 1371 | &(nid_objs[295]),/* "ipsecTunnel" */ | ||
| 1372 | &(nid_objs[296]),/* "ipsecUser" */ | ||
| 1373 | &(nid_objs[86]),/* "issuerAltName" */ | ||
| 1374 | &(nid_objs[150]),/* "keyBag" */ | ||
| 1375 | &(nid_objs[83]),/* "keyUsage" */ | ||
| 1376 | &(nid_objs[157]),/* "localKeyID" */ | ||
| 1377 | &(nid_objs[388]),/* "mail" */ | ||
| 1378 | &(nid_objs[182]),/* "member-body" */ | ||
| 1379 | &(nid_objs[51]),/* "messageDigest" */ | ||
| 1380 | &(nid_objs[383]),/* "mgmt" */ | ||
| 1381 | &(nid_objs[136]),/* "msCTLSign" */ | ||
| 1382 | &(nid_objs[135]),/* "msCodeCom" */ | ||
| 1383 | &(nid_objs[134]),/* "msCodeInd" */ | ||
| 1384 | &(nid_objs[138]),/* "msEFS" */ | ||
| 1385 | &(nid_objs[171]),/* "msExtReq" */ | ||
| 1386 | &(nid_objs[137]),/* "msSGC" */ | ||
| 1387 | &(nid_objs[173]),/* "name" */ | ||
| 1388 | &(nid_objs[369]),/* "noCheck" */ | ||
| 1389 | &(nid_objs[72]),/* "nsBaseUrl" */ | ||
| 1390 | &(nid_objs[76]),/* "nsCaPolicyUrl" */ | ||
| 1391 | &(nid_objs[74]),/* "nsCaRevocationUrl" */ | ||
| 1392 | &(nid_objs[58]),/* "nsCertExt" */ | ||
| 1393 | &(nid_objs[79]),/* "nsCertSequence" */ | ||
| 1394 | &(nid_objs[71]),/* "nsCertType" */ | ||
| 1395 | &(nid_objs[78]),/* "nsComment" */ | ||
| 1396 | &(nid_objs[59]),/* "nsDataType" */ | ||
| 1397 | &(nid_objs[75]),/* "nsRenewalUrl" */ | ||
| 1398 | &(nid_objs[73]),/* "nsRevocationUrl" */ | ||
| 1399 | &(nid_objs[139]),/* "nsSGC" */ | ||
| 1400 | &(nid_objs[77]),/* "nsSslServerName" */ | ||
| 1401 | &(nid_objs[374]),/* "path" */ | ||
| 1402 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | ||
| 1403 | &(nid_objs[ 2]),/* "pkcs" */ | ||
| 1404 | &(nid_objs[186]),/* "pkcs1" */ | ||
| 1405 | &(nid_objs[27]),/* "pkcs3" */ | ||
| 1406 | &(nid_objs[187]),/* "pkcs5" */ | ||
| 1407 | &(nid_objs[20]),/* "pkcs7" */ | ||
| 1408 | &(nid_objs[21]),/* "pkcs7-data" */ | ||
| 1409 | &(nid_objs[25]),/* "pkcs7-digestData" */ | ||
| 1410 | &(nid_objs[26]),/* "pkcs7-encryptedData" */ | ||
| 1411 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | ||
| 1412 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | ||
| 1413 | &(nid_objs[22]),/* "pkcs7-signedData" */ | ||
| 1414 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
| 1415 | &(nid_objs[47]),/* "pkcs9" */ | ||
| 1416 | &(nid_objs[385]),/* "private" */ | ||
| 1417 | &(nid_objs[84]),/* "privateKeyUsagePeriod" */ | ||
| 1418 | &(nid_objs[286]),/* "qcStatements" */ | ||
| 1419 | &(nid_objs[ 6]),/* "rsaEncryption" */ | ||
| 1420 | &(nid_objs[377]),/* "rsaSignature" */ | ||
| 1421 | &(nid_objs[ 1]),/* "rsadsi" */ | ||
| 1422 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
| 1423 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
| 1424 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
| 1425 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
| 1426 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
| 1427 | &(nid_objs[154]),/* "secretBag" */ | ||
| 1428 | &(nid_objs[386]),/* "security" */ | ||
| 1429 | &(nid_objs[129]),/* "serverAuth" */ | ||
| 1430 | &(nid_objs[371]),/* "serviceLocator" */ | ||
| 1431 | &(nid_objs[52]),/* "signingTime" */ | ||
| 1432 | &(nid_objs[387]),/* "snmpv2" */ | ||
| 1433 | &(nid_objs[85]),/* "subjectAltName" */ | ||
| 1434 | &(nid_objs[82]),/* "subjectKeyIdentifier" */ | ||
| 1435 | &(nid_objs[293]),/* "textNotice" */ | ||
| 1436 | &(nid_objs[133]),/* "timeStamping" */ | ||
| 1437 | &(nid_objs[375]),/* "trustRoot" */ | ||
| 1438 | &(nid_objs[55]),/* "unstructuredAddress" */ | ||
| 1439 | &(nid_objs[49]),/* "unstructuredName" */ | ||
| 1440 | &(nid_objs[373]),/* "valid" */ | ||
| 1441 | &(nid_objs[158]),/* "x509Certificate" */ | ||
| 1442 | &(nid_objs[160]),/* "x509Crl" */ | ||
| 1443 | }; | ||
| 1444 | |||
| 1445 | static ASN1_OBJECT *ln_objs[NUM_LN]={ | ||
| 1446 | &(nid_objs[363]),/* "AD Time Stamping" */ | ||
| 1447 | &(nid_objs[368]),/* "Acceptable OCSP Responses" */ | ||
| 1448 | &(nid_objs[177]),/* "Authority Information Access" */ | ||
| 1449 | &(nid_objs[365]),/* "Basic OCSP Response" */ | ||
| 1450 | &(nid_objs[285]),/* "Biometric Info" */ | ||
| 1451 | &(nid_objs[179]),/* "CA Issuers" */ | ||
| 1452 | &(nid_objs[131]),/* "Code Signing" */ | ||
| 1453 | &(nid_objs[382]),/* "Directory" */ | ||
| 1454 | &(nid_objs[392]),/* "Domain" */ | ||
| 1455 | &(nid_objs[132]),/* "E-mail Protection" */ | ||
| 1456 | &(nid_objs[389]),/* "Enterprises" */ | ||
| 1457 | &(nid_objs[384]),/* "Experimental" */ | ||
| 1458 | &(nid_objs[372]),/* "Extended OCSP Status" */ | ||
| 1459 | &(nid_objs[172]),/* "Extension Request" */ | ||
| 1460 | &(nid_objs[294]),/* "IPSec End System" */ | ||
| 1461 | &(nid_objs[295]),/* "IPSec Tunnel" */ | ||
| 1462 | &(nid_objs[296]),/* "IPSec User" */ | ||
| 1463 | &(nid_objs[182]),/* "ISO Member Body" */ | ||
| 1464 | &(nid_objs[183]),/* "ISO US Member Body" */ | ||
| 1465 | &(nid_objs[142]),/* "Invalidity Date" */ | ||
| 1466 | &(nid_objs[388]),/* "Mail" */ | ||
| 1467 | &(nid_objs[383]),/* "Management" */ | ||
| 1468 | &(nid_objs[135]),/* "Microsoft Commercial Code Signing" */ | ||
| 1469 | &(nid_objs[138]),/* "Microsoft Encrypted File System" */ | ||
| 1470 | &(nid_objs[171]),/* "Microsoft Extension Request" */ | ||
| 1471 | &(nid_objs[134]),/* "Microsoft Individual Code Signing" */ | ||
| 1472 | &(nid_objs[137]),/* "Microsoft Server Gated Crypto" */ | ||
| 1473 | &(nid_objs[136]),/* "Microsoft Trust List Signing" */ | ||
| 1474 | &(nid_objs[72]),/* "Netscape Base Url" */ | ||
| 1475 | &(nid_objs[76]),/* "Netscape CA Policy Url" */ | ||
| 1476 | &(nid_objs[74]),/* "Netscape CA Revocation Url" */ | ||
| 1477 | &(nid_objs[71]),/* "Netscape Cert Type" */ | ||
| 1478 | &(nid_objs[58]),/* "Netscape Certificate Extension" */ | ||
| 1479 | &(nid_objs[79]),/* "Netscape Certificate Sequence" */ | ||
| 1480 | &(nid_objs[78]),/* "Netscape Comment" */ | ||
| 1481 | &(nid_objs[57]),/* "Netscape Communications Corp." */ | ||
| 1482 | &(nid_objs[59]),/* "Netscape Data Type" */ | ||
| 1483 | &(nid_objs[75]),/* "Netscape Renewal Url" */ | ||
| 1484 | &(nid_objs[73]),/* "Netscape Revocation Url" */ | ||
| 1485 | &(nid_objs[77]),/* "Netscape SSL Server Name" */ | ||
| 1486 | &(nid_objs[139]),/* "Netscape Server Gated Crypto" */ | ||
| 1487 | &(nid_objs[178]),/* "OCSP" */ | ||
| 1488 | &(nid_objs[370]),/* "OCSP Archive Cutoff" */ | ||
| 1489 | &(nid_objs[367]),/* "OCSP CRL ID" */ | ||
| 1490 | &(nid_objs[366]),/* "OCSP Nonce" */ | ||
| 1491 | &(nid_objs[371]),/* "OCSP Service Locator" */ | ||
| 1492 | &(nid_objs[180]),/* "OCSP Signing" */ | ||
| 1493 | &(nid_objs[161]),/* "PBES2" */ | ||
| 1494 | &(nid_objs[69]),/* "PBKDF2" */ | ||
| 1495 | &(nid_objs[162]),/* "PBMAC1" */ | ||
| 1496 | &(nid_objs[127]),/* "PKIX" */ | ||
| 1497 | &(nid_objs[164]),/* "Policy Qualifier CPS" */ | ||
| 1498 | &(nid_objs[165]),/* "Policy Qualifier User Notice" */ | ||
| 1499 | &(nid_objs[385]),/* "Private" */ | ||
| 1500 | &(nid_objs[ 1]),/* "RSA Data Security, Inc." */ | ||
| 1501 | &(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */ | ||
| 1502 | &(nid_objs[188]),/* "S/MIME" */ | ||
| 1503 | &(nid_objs[167]),/* "S/MIME Capabilities" */ | ||
| 1504 | &(nid_objs[387]),/* "SNMPv2" */ | ||
| 1505 | &(nid_objs[386]),/* "Security" */ | ||
| 1506 | &(nid_objs[143]),/* "Strong Extranet ID" */ | ||
| 1507 | &(nid_objs[130]),/* "TLS Web Client Authentication" */ | ||
| 1508 | &(nid_objs[129]),/* "TLS Web Server Authentication" */ | ||
| 1509 | &(nid_objs[133]),/* "Time Stamping" */ | ||
| 1510 | &(nid_objs[375]),/* "Trust Root" */ | ||
| 1511 | &(nid_objs[12]),/* "X509" */ | ||
| 1512 | &(nid_objs[90]),/* "X509v3 Authority Key Identifier" */ | ||
| 1513 | &(nid_objs[87]),/* "X509v3 Basic Constraints" */ | ||
| 1514 | &(nid_objs[103]),/* "X509v3 CRL Distribution Points" */ | ||
| 1515 | &(nid_objs[88]),/* "X509v3 CRL Number" */ | ||
| 1516 | &(nid_objs[141]),/* "X509v3 CRL Reason Code" */ | ||
| 1517 | &(nid_objs[89]),/* "X509v3 Certificate Policies" */ | ||
| 1518 | &(nid_objs[140]),/* "X509v3 Delta CRL Indicator" */ | ||
| 1519 | &(nid_objs[126]),/* "X509v3 Extended Key Usage" */ | ||
| 1520 | &(nid_objs[86]),/* "X509v3 Issuer Alternative Name" */ | ||
| 1521 | &(nid_objs[83]),/* "X509v3 Key Usage" */ | ||
| 1522 | &(nid_objs[84]),/* "X509v3 Private Key Usage Period" */ | ||
| 1523 | &(nid_objs[85]),/* "X509v3 Subject Alternative Name" */ | ||
| 1524 | &(nid_objs[82]),/* "X509v3 Subject Key Identifier" */ | ||
| 1525 | &(nid_objs[184]),/* "X9.57" */ | ||
| 1526 | &(nid_objs[185]),/* "X9.57 CM ?" */ | ||
| 1527 | &(nid_objs[289]),/* "aaControls" */ | ||
| 1528 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
| 1529 | &(nid_objs[288]),/* "ac-targeting" */ | ||
| 1530 | &(nid_objs[364]),/* "ad dvcs" */ | ||
| 1531 | &(nid_objs[376]),/* "algorithm" */ | ||
| 1532 | &(nid_objs[91]),/* "bf-cbc" */ | ||
| 1533 | &(nid_objs[93]),/* "bf-cfb" */ | ||
| 1534 | &(nid_objs[92]),/* "bf-ecb" */ | ||
| 1535 | &(nid_objs[94]),/* "bf-ofb" */ | ||
| 1536 | &(nid_objs[108]),/* "cast5-cbc" */ | ||
| 1537 | &(nid_objs[110]),/* "cast5-cfb" */ | ||
| 1538 | &(nid_objs[109]),/* "cast5-ecb" */ | ||
| 1539 | &(nid_objs[111]),/* "cast5-ofb" */ | ||
| 1540 | &(nid_objs[152]),/* "certBag" */ | ||
| 1541 | &(nid_objs[54]),/* "challengePassword" */ | ||
| 1542 | &(nid_objs[13]),/* "commonName" */ | ||
| 1543 | &(nid_objs[50]),/* "contentType" */ | ||
| 1544 | &(nid_objs[53]),/* "countersignature" */ | ||
| 1545 | &(nid_objs[14]),/* "countryName" */ | ||
| 1546 | &(nid_objs[153]),/* "crlBag" */ | ||
| 1547 | &(nid_objs[390]),/* "dcObject" */ | ||
| 1548 | &(nid_objs[31]),/* "des-cbc" */ | ||
| 1549 | &(nid_objs[30]),/* "des-cfb" */ | ||
| 1550 | &(nid_objs[29]),/* "des-ecb" */ | ||
| 1551 | &(nid_objs[32]),/* "des-ede" */ | ||
| 1552 | &(nid_objs[43]),/* "des-ede-cbc" */ | ||
| 1553 | &(nid_objs[60]),/* "des-ede-cfb" */ | ||
| 1554 | &(nid_objs[62]),/* "des-ede-ofb" */ | ||
| 1555 | &(nid_objs[33]),/* "des-ede3" */ | ||
| 1556 | &(nid_objs[44]),/* "des-ede3-cbc" */ | ||
| 1557 | &(nid_objs[61]),/* "des-ede3-cfb" */ | ||
| 1558 | &(nid_objs[63]),/* "des-ede3-ofb" */ | ||
| 1559 | &(nid_objs[45]),/* "des-ofb" */ | ||
| 1560 | &(nid_objs[107]),/* "description" */ | ||
| 1561 | &(nid_objs[80]),/* "desx-cbc" */ | ||
| 1562 | &(nid_objs[28]),/* "dhKeyAgreement" */ | ||
| 1563 | &(nid_objs[11]),/* "directory services (X.500)" */ | ||
| 1564 | &(nid_objs[378]),/* "directory services - algorithms" */ | ||
| 1565 | &(nid_objs[174]),/* "dnQualifier" */ | ||
| 1566 | &(nid_objs[380]),/* "dod" */ | ||
| 1567 | &(nid_objs[391]),/* "domainComponent" */ | ||
| 1568 | &(nid_objs[116]),/* "dsaEncryption" */ | ||
| 1569 | &(nid_objs[67]),/* "dsaEncryption-old" */ | ||
| 1570 | &(nid_objs[66]),/* "dsaWithSHA" */ | ||
| 1571 | &(nid_objs[113]),/* "dsaWithSHA1" */ | ||
| 1572 | &(nid_objs[70]),/* "dsaWithSHA1-old" */ | ||
| 1573 | &(nid_objs[297]),/* "dvcs" */ | ||
| 1574 | &(nid_objs[48]),/* "emailAddress" */ | ||
| 1575 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | ||
| 1576 | &(nid_objs[156]),/* "friendlyName" */ | ||
| 1577 | &(nid_objs[99]),/* "givenName" */ | ||
| 1578 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
| 1579 | &(nid_objs[381]),/* "iana" */ | ||
| 1580 | &(nid_objs[266]),/* "id-aca" */ | ||
| 1581 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
| 1582 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
| 1583 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
| 1584 | &(nid_objs[357]),/* "id-aca-group" */ | ||
| 1585 | &(nid_objs[358]),/* "id-aca-role" */ | ||
| 1586 | &(nid_objs[176]),/* "id-ad" */ | ||
| 1587 | &(nid_objs[262]),/* "id-alg" */ | ||
| 1588 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
| 1589 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
| 1590 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
| 1591 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
| 1592 | &(nid_objs[268]),/* "id-cct" */ | ||
| 1593 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
| 1594 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
| 1595 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
| 1596 | &(nid_objs[81]),/* "id-ce" */ | ||
| 1597 | &(nid_objs[263]),/* "id-cmc" */ | ||
| 1598 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
| 1599 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
| 1600 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
| 1601 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
| 1602 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
| 1603 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
| 1604 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
| 1605 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
| 1606 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
| 1607 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
| 1608 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
| 1609 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
| 1610 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
| 1611 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
| 1612 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
| 1613 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
| 1614 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
| 1615 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
| 1616 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
| 1617 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
| 1618 | &(nid_objs[260]),/* "id-it" */ | ||
| 1619 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
| 1620 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
| 1621 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
| 1622 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
| 1623 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
| 1624 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
| 1625 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
| 1626 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
| 1627 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
| 1628 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
| 1629 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
| 1630 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
| 1631 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
| 1632 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
| 1633 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
| 1634 | &(nid_objs[128]),/* "id-kp" */ | ||
| 1635 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
| 1636 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
| 1637 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
| 1638 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
| 1639 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
| 1640 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
| 1641 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
| 1642 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
| 1643 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
| 1644 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
| 1645 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
| 1646 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
| 1647 | &(nid_objs[264]),/* "id-on" */ | ||
| 1648 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
| 1649 | &(nid_objs[265]),/* "id-pda" */ | ||
| 1650 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
| 1651 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
| 1652 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
| 1653 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
| 1654 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
| 1655 | &(nid_objs[350]),/* "id-pda-pseudonym" */ | ||
| 1656 | &(nid_objs[175]),/* "id-pe" */ | ||
| 1657 | &(nid_objs[261]),/* "id-pkip" */ | ||
| 1658 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
| 1659 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
| 1660 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
| 1661 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
| 1662 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
| 1663 | &(nid_objs[267]),/* "id-qcs" */ | ||
| 1664 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
| 1665 | &(nid_objs[259]),/* "id-qt" */ | ||
| 1666 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
| 1667 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
| 1668 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
| 1669 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
| 1670 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
| 1671 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
| 1672 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
| 1673 | &(nid_objs[314]),/* "id-regInfo" */ | ||
| 1674 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
| 1675 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
| 1676 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
| 1677 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
| 1678 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
| 1679 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
| 1680 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
| 1681 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
| 1682 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
| 1683 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
| 1684 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
| 1685 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
| 1686 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
| 1687 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
| 1688 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
| 1689 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
| 1690 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
| 1691 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
| 1692 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
| 1693 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
| 1694 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
| 1695 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
| 1696 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
| 1697 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
| 1698 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
| 1699 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
| 1700 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
| 1701 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
| 1702 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
| 1703 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
| 1704 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
| 1705 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
| 1706 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
| 1707 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
| 1708 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
| 1709 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
| 1710 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
| 1711 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
| 1712 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
| 1713 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
| 1714 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
| 1715 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
| 1716 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
| 1717 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
| 1718 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
| 1719 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
| 1720 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
| 1721 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
| 1722 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
| 1723 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
| 1724 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
| 1725 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
| 1726 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
| 1727 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
| 1728 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
| 1729 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
| 1730 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
| 1731 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
| 1732 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
| 1733 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
| 1734 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
| 1735 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
| 1736 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
| 1737 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
| 1738 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
| 1739 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
| 1740 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
| 1741 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
| 1742 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
| 1743 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
| 1744 | &(nid_objs[34]),/* "idea-cbc" */ | ||
| 1745 | &(nid_objs[35]),/* "idea-cfb" */ | ||
| 1746 | &(nid_objs[36]),/* "idea-ecb" */ | ||
| 1747 | &(nid_objs[46]),/* "idea-ofb" */ | ||
| 1748 | &(nid_objs[101]),/* "initials" */ | ||
| 1749 | &(nid_objs[181]),/* "iso" */ | ||
| 1750 | &(nid_objs[150]),/* "keyBag" */ | ||
| 1751 | &(nid_objs[157]),/* "localKeyID" */ | ||
| 1752 | &(nid_objs[15]),/* "localityName" */ | ||
| 1753 | &(nid_objs[ 3]),/* "md2" */ | ||
| 1754 | &(nid_objs[ 7]),/* "md2WithRSAEncryption" */ | ||
| 1755 | &(nid_objs[257]),/* "md4" */ | ||
| 1756 | &(nid_objs[ 4]),/* "md5" */ | ||
| 1757 | &(nid_objs[114]),/* "md5-sha1" */ | ||
| 1758 | &(nid_objs[104]),/* "md5WithRSA" */ | ||
| 1759 | &(nid_objs[ 8]),/* "md5WithRSAEncryption" */ | ||
| 1760 | &(nid_objs[95]),/* "mdc2" */ | ||
| 1761 | &(nid_objs[96]),/* "mdc2WithRSA" */ | ||
| 1762 | &(nid_objs[51]),/* "messageDigest" */ | ||
| 1763 | &(nid_objs[173]),/* "name" */ | ||
| 1764 | &(nid_objs[369]),/* "noCheck" */ | ||
| 1765 | &(nid_objs[379]),/* "org" */ | ||
| 1766 | &(nid_objs[17]),/* "organizationName" */ | ||
| 1767 | &(nid_objs[18]),/* "organizationalUnitName" */ | ||
| 1768 | &(nid_objs[374]),/* "path" */ | ||
| 1769 | &(nid_objs[ 9]),/* "pbeWithMD2AndDES-CBC" */ | ||
| 1770 | &(nid_objs[168]),/* "pbeWithMD2AndRC2-CBC" */ | ||
| 1771 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | ||
| 1772 | &(nid_objs[10]),/* "pbeWithMD5AndDES-CBC" */ | ||
| 1773 | &(nid_objs[169]),/* "pbeWithMD5AndRC2-CBC" */ | ||
| 1774 | &(nid_objs[148]),/* "pbeWithSHA1And128BitRC2-CBC" */ | ||
| 1775 | &(nid_objs[144]),/* "pbeWithSHA1And128BitRC4" */ | ||
| 1776 | &(nid_objs[147]),/* "pbeWithSHA1And2-KeyTripleDES-CBC" */ | ||
| 1777 | &(nid_objs[146]),/* "pbeWithSHA1And3-KeyTripleDES-CBC" */ | ||
| 1778 | &(nid_objs[149]),/* "pbeWithSHA1And40BitRC2-CBC" */ | ||
| 1779 | &(nid_objs[145]),/* "pbeWithSHA1And40BitRC4" */ | ||
| 1780 | &(nid_objs[170]),/* "pbeWithSHA1AndDES-CBC" */ | ||
| 1781 | &(nid_objs[68]),/* "pbeWithSHA1AndRC2-CBC" */ | ||
| 1782 | &(nid_objs[186]),/* "pkcs1" */ | ||
| 1783 | &(nid_objs[27]),/* "pkcs3" */ | ||
| 1784 | &(nid_objs[187]),/* "pkcs5" */ | ||
| 1785 | &(nid_objs[20]),/* "pkcs7" */ | ||
| 1786 | &(nid_objs[21]),/* "pkcs7-data" */ | ||
| 1787 | &(nid_objs[25]),/* "pkcs7-digestData" */ | ||
| 1788 | &(nid_objs[26]),/* "pkcs7-encryptedData" */ | ||
| 1789 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | ||
| 1790 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | ||
| 1791 | &(nid_objs[22]),/* "pkcs7-signedData" */ | ||
| 1792 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
| 1793 | &(nid_objs[47]),/* "pkcs9" */ | ||
| 1794 | &(nid_objs[286]),/* "qcStatements" */ | ||
| 1795 | &(nid_objs[98]),/* "rc2-40-cbc" */ | ||
| 1796 | &(nid_objs[166]),/* "rc2-64-cbc" */ | ||
| 1797 | &(nid_objs[37]),/* "rc2-cbc" */ | ||
| 1798 | &(nid_objs[39]),/* "rc2-cfb" */ | ||
| 1799 | &(nid_objs[38]),/* "rc2-ecb" */ | ||
| 1800 | &(nid_objs[40]),/* "rc2-ofb" */ | ||
| 1801 | &(nid_objs[ 5]),/* "rc4" */ | ||
| 1802 | &(nid_objs[97]),/* "rc4-40" */ | ||
| 1803 | &(nid_objs[120]),/* "rc5-cbc" */ | ||
| 1804 | &(nid_objs[122]),/* "rc5-cfb" */ | ||
| 1805 | &(nid_objs[121]),/* "rc5-ecb" */ | ||
| 1806 | &(nid_objs[123]),/* "rc5-ofb" */ | ||
| 1807 | &(nid_objs[117]),/* "ripemd160" */ | ||
| 1808 | &(nid_objs[119]),/* "ripemd160WithRSA" */ | ||
| 1809 | &(nid_objs[19]),/* "rsa" */ | ||
| 1810 | &(nid_objs[ 6]),/* "rsaEncryption" */ | ||
| 1811 | &(nid_objs[377]),/* "rsaSignature" */ | ||
| 1812 | &(nid_objs[124]),/* "run length compression" */ | ||
| 1813 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
| 1814 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
| 1815 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
| 1816 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
| 1817 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
| 1818 | &(nid_objs[154]),/* "secretBag" */ | ||
| 1819 | &(nid_objs[105]),/* "serialNumber" */ | ||
| 1820 | &(nid_objs[41]),/* "sha" */ | ||
| 1821 | &(nid_objs[64]),/* "sha1" */ | ||
| 1822 | &(nid_objs[115]),/* "sha1WithRSA" */ | ||
| 1823 | &(nid_objs[65]),/* "sha1WithRSAEncryption" */ | ||
| 1824 | &(nid_objs[42]),/* "shaWithRSAEncryption" */ | ||
| 1825 | &(nid_objs[52]),/* "signingTime" */ | ||
| 1826 | &(nid_objs[16]),/* "stateOrProvinceName" */ | ||
| 1827 | &(nid_objs[100]),/* "surname" */ | ||
| 1828 | &(nid_objs[293]),/* "textNotice" */ | ||
| 1829 | &(nid_objs[106]),/* "title" */ | ||
| 1830 | &(nid_objs[ 0]),/* "undefined" */ | ||
| 1831 | &(nid_objs[102]),/* "uniqueIdentifier" */ | ||
| 1832 | &(nid_objs[55]),/* "unstructuredAddress" */ | ||
| 1833 | &(nid_objs[49]),/* "unstructuredName" */ | ||
| 1834 | &(nid_objs[373]),/* "valid" */ | ||
| 1835 | &(nid_objs[158]),/* "x509Certificate" */ | ||
| 1836 | &(nid_objs[160]),/* "x509Crl" */ | ||
| 1837 | &(nid_objs[125]),/* "zlib compression" */ | ||
| 1838 | }; | ||
| 1839 | |||
| 1840 | static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | ||
| 1841 | &(nid_objs[ 0]),/* OBJ_undef 0 */ | ||
| 1842 | &(nid_objs[389]),/* OBJ_Enterprises 1 */ | ||
| 1843 | &(nid_objs[181]),/* OBJ_iso 1 */ | ||
| 1844 | &(nid_objs[182]),/* OBJ_member_body 1 2 */ | ||
| 1845 | &(nid_objs[379]),/* OBJ_org 1 3 */ | ||
| 1846 | &(nid_objs[11]),/* OBJ_X500 2 5 */ | ||
| 1847 | &(nid_objs[380]),/* OBJ_dod 1 3 6 */ | ||
| 1848 | &(nid_objs[12]),/* OBJ_X509 2 5 4 */ | ||
| 1849 | &(nid_objs[378]),/* OBJ_X500algorithms 2 5 8 */ | ||
| 1850 | &(nid_objs[81]),/* OBJ_id_ce 2 5 29 */ | ||
| 1851 | &(nid_objs[183]),/* OBJ_ISO_US 1 2 840 */ | ||
| 1852 | &(nid_objs[381]),/* OBJ_iana 1 3 6 1 */ | ||
| 1853 | &(nid_objs[13]),/* OBJ_commonName 2 5 4 3 */ | ||
| 1854 | &(nid_objs[100]),/* OBJ_surname 2 5 4 4 */ | ||
| 1855 | &(nid_objs[105]),/* OBJ_serialNumber 2 5 4 5 */ | ||
| 1856 | &(nid_objs[14]),/* OBJ_countryName 2 5 4 6 */ | ||
| 1857 | &(nid_objs[15]),/* OBJ_localityName 2 5 4 7 */ | ||
| 1858 | &(nid_objs[16]),/* OBJ_stateOrProvinceName 2 5 4 8 */ | ||
| 1859 | &(nid_objs[17]),/* OBJ_organizationName 2 5 4 10 */ | ||
| 1860 | &(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */ | ||
| 1861 | &(nid_objs[106]),/* OBJ_title 2 5 4 12 */ | ||
| 1862 | &(nid_objs[107]),/* OBJ_description 2 5 4 13 */ | ||
| 1863 | &(nid_objs[173]),/* OBJ_name 2 5 4 41 */ | ||
| 1864 | &(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */ | ||
| 1865 | &(nid_objs[101]),/* OBJ_initials 2 5 4 43 */ | ||
| 1866 | &(nid_objs[102]),/* OBJ_uniqueIdentifier 2 5 4 45 */ | ||
| 1867 | &(nid_objs[174]),/* OBJ_dnQualifier 2 5 4 46 */ | ||
| 1868 | &(nid_objs[82]),/* OBJ_subject_key_identifier 2 5 29 14 */ | ||
| 1869 | &(nid_objs[83]),/* OBJ_key_usage 2 5 29 15 */ | ||
| 1870 | &(nid_objs[84]),/* OBJ_private_key_usage_period 2 5 29 16 */ | ||
| 1871 | &(nid_objs[85]),/* OBJ_subject_alt_name 2 5 29 17 */ | ||
| 1872 | &(nid_objs[86]),/* OBJ_issuer_alt_name 2 5 29 18 */ | ||
| 1873 | &(nid_objs[87]),/* OBJ_basic_constraints 2 5 29 19 */ | ||
| 1874 | &(nid_objs[88]),/* OBJ_crl_number 2 5 29 20 */ | ||
| 1875 | &(nid_objs[141]),/* OBJ_crl_reason 2 5 29 21 */ | ||
| 1876 | &(nid_objs[142]),/* OBJ_invalidity_date 2 5 29 24 */ | ||
| 1877 | &(nid_objs[140]),/* OBJ_delta_crl 2 5 29 27 */ | ||
| 1878 | &(nid_objs[103]),/* OBJ_crl_distribution_points 2 5 29 31 */ | ||
| 1879 | &(nid_objs[89]),/* OBJ_certificate_policies 2 5 29 32 */ | ||
| 1880 | &(nid_objs[90]),/* OBJ_authority_key_identifier 2 5 29 35 */ | ||
| 1881 | &(nid_objs[126]),/* OBJ_ext_key_usage 2 5 29 37 */ | ||
| 1882 | &(nid_objs[390]),/* OBJ_dcObject 1466 344 */ | ||
| 1883 | &(nid_objs[382]),/* OBJ_Directory 1 3 6 1 1 */ | ||
| 1884 | &(nid_objs[383]),/* OBJ_Management 1 3 6 1 2 */ | ||
| 1885 | &(nid_objs[384]),/* OBJ_Experimental 1 3 6 1 3 */ | ||
| 1886 | &(nid_objs[385]),/* OBJ_Private 1 3 6 1 4 */ | ||
| 1887 | &(nid_objs[386]),/* OBJ_Security 1 3 6 1 5 */ | ||
| 1888 | &(nid_objs[387]),/* OBJ_SNMPv2 1 3 6 1 6 */ | ||
| 1889 | &(nid_objs[388]),/* OBJ_Mail 1 3 6 1 7 */ | ||
| 1890 | &(nid_objs[376]),/* OBJ_algorithm 1 3 14 3 2 */ | ||
| 1891 | &(nid_objs[19]),/* OBJ_rsa 2 5 8 1 1 */ | ||
| 1892 | &(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */ | ||
| 1893 | &(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */ | ||
| 1894 | &(nid_objs[184]),/* OBJ_X9_57 1 2 840 10040 */ | ||
| 1895 | &(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */ | ||
| 1896 | &(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */ | ||
| 1897 | &(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */ | ||
| 1898 | &(nid_objs[45]),/* OBJ_des_ofb64 1 3 14 3 2 8 */ | ||
| 1899 | &(nid_objs[30]),/* OBJ_des_cfb64 1 3 14 3 2 9 */ | ||
| 1900 | &(nid_objs[377]),/* OBJ_rsaSignature 1 3 14 3 2 11 */ | ||
| 1901 | &(nid_objs[67]),/* OBJ_dsa_2 1 3 14 3 2 12 */ | ||
| 1902 | &(nid_objs[66]),/* OBJ_dsaWithSHA 1 3 14 3 2 13 */ | ||
| 1903 | &(nid_objs[42]),/* OBJ_shaWithRSAEncryption 1 3 14 3 2 15 */ | ||
| 1904 | &(nid_objs[32]),/* OBJ_des_ede 1 3 14 3 2 17 */ | ||
| 1905 | &(nid_objs[41]),/* OBJ_sha 1 3 14 3 2 18 */ | ||
| 1906 | &(nid_objs[64]),/* OBJ_sha1 1 3 14 3 2 26 */ | ||
| 1907 | &(nid_objs[70]),/* OBJ_dsaWithSHA1_2 1 3 14 3 2 27 */ | ||
| 1908 | &(nid_objs[115]),/* OBJ_sha1WithRSA 1 3 14 3 2 29 */ | ||
| 1909 | &(nid_objs[117]),/* OBJ_ripemd160 1 3 36 3 2 1 */ | ||
| 1910 | &(nid_objs[143]),/* OBJ_sxnet 1 3 101 1 4 1 */ | ||
| 1911 | &(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666 1 */ | ||
| 1912 | &(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666 2 */ | ||
| 1913 | &(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */ | ||
| 1914 | &(nid_objs[185]),/* OBJ_X9cm 1 2 840 10040 4 */ | ||
| 1915 | &(nid_objs[127]),/* OBJ_id_pkix 1 3 6 1 5 5 7 */ | ||
| 1916 | &(nid_objs[119]),/* OBJ_ripemd160WithRSA 1 3 36 3 3 1 2 */ | ||
| 1917 | &(nid_objs[ 2]),/* OBJ_pkcs 1 2 840 113549 1 */ | ||
| 1918 | &(nid_objs[116]),/* OBJ_dsa 1 2 840 10040 4 1 */ | ||
| 1919 | &(nid_objs[113]),/* OBJ_dsaWithSHA1 1 2 840 10040 4 3 */ | ||
| 1920 | &(nid_objs[258]),/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */ | ||
| 1921 | &(nid_objs[175]),/* OBJ_id_pe 1 3 6 1 5 5 7 1 */ | ||
| 1922 | &(nid_objs[259]),/* OBJ_id_qt 1 3 6 1 5 5 7 2 */ | ||
| 1923 | &(nid_objs[128]),/* OBJ_id_kp 1 3 6 1 5 5 7 3 */ | ||
| 1924 | &(nid_objs[260]),/* OBJ_id_it 1 3 6 1 5 5 7 4 */ | ||
| 1925 | &(nid_objs[261]),/* OBJ_id_pkip 1 3 6 1 5 5 7 5 */ | ||
| 1926 | &(nid_objs[262]),/* OBJ_id_alg 1 3 6 1 5 5 7 6 */ | ||
| 1927 | &(nid_objs[263]),/* OBJ_id_cmc 1 3 6 1 5 5 7 7 */ | ||
| 1928 | &(nid_objs[264]),/* OBJ_id_on 1 3 6 1 5 5 7 8 */ | ||
| 1929 | &(nid_objs[265]),/* OBJ_id_pda 1 3 6 1 5 5 7 9 */ | ||
| 1930 | &(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */ | ||
| 1931 | &(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */ | ||
| 1932 | &(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */ | ||
| 1933 | &(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */ | ||
| 1934 | &(nid_objs[57]),/* OBJ_netscape 2 16 840 1 113730 */ | ||
| 1935 | &(nid_objs[186]),/* OBJ_pkcs1 1 2 840 113549 1 1 */ | ||
| 1936 | &(nid_objs[27]),/* OBJ_pkcs3 1 2 840 113549 1 3 */ | ||
| 1937 | &(nid_objs[187]),/* OBJ_pkcs5 1 2 840 113549 1 5 */ | ||
| 1938 | &(nid_objs[20]),/* OBJ_pkcs7 1 2 840 113549 1 7 */ | ||
| 1939 | &(nid_objs[47]),/* OBJ_pkcs9 1 2 840 113549 1 9 */ | ||
| 1940 | &(nid_objs[ 3]),/* OBJ_md2 1 2 840 113549 2 2 */ | ||
| 1941 | &(nid_objs[257]),/* OBJ_md4 1 2 840 113549 2 4 */ | ||
| 1942 | &(nid_objs[ 4]),/* OBJ_md5 1 2 840 113549 2 5 */ | ||
| 1943 | &(nid_objs[163]),/* OBJ_hmacWithSHA1 1 2 840 113549 2 7 */ | ||
| 1944 | &(nid_objs[37]),/* OBJ_rc2_cbc 1 2 840 113549 3 2 */ | ||
| 1945 | &(nid_objs[ 5]),/* OBJ_rc4 1 2 840 113549 3 4 */ | ||
| 1946 | &(nid_objs[44]),/* OBJ_des_ede3_cbc 1 2 840 113549 3 7 */ | ||
| 1947 | &(nid_objs[120]),/* OBJ_rc5_cbc 1 2 840 113549 3 8 */ | ||
| 1948 | &(nid_objs[269]),/* OBJ_id_pkix1_explicit_88 1 3 6 1 5 5 7 0 1 */ | ||
| 1949 | &(nid_objs[270]),/* OBJ_id_pkix1_implicit_88 1 3 6 1 5 5 7 0 2 */ | ||
| 1950 | &(nid_objs[271]),/* OBJ_id_pkix1_explicit_93 1 3 6 1 5 5 7 0 3 */ | ||
| 1951 | &(nid_objs[272]),/* OBJ_id_pkix1_implicit_93 1 3 6 1 5 5 7 0 4 */ | ||
| 1952 | &(nid_objs[273]),/* OBJ_id_mod_crmf 1 3 6 1 5 5 7 0 5 */ | ||
| 1953 | &(nid_objs[274]),/* OBJ_id_mod_cmc 1 3 6 1 5 5 7 0 6 */ | ||
| 1954 | &(nid_objs[275]),/* OBJ_id_mod_kea_profile_88 1 3 6 1 5 5 7 0 7 */ | ||
| 1955 | &(nid_objs[276]),/* OBJ_id_mod_kea_profile_93 1 3 6 1 5 5 7 0 8 */ | ||
| 1956 | &(nid_objs[277]),/* OBJ_id_mod_cmp 1 3 6 1 5 5 7 0 9 */ | ||
| 1957 | &(nid_objs[278]),/* OBJ_id_mod_qualified_cert_88 1 3 6 1 5 5 7 0 10 */ | ||
| 1958 | &(nid_objs[279]),/* OBJ_id_mod_qualified_cert_93 1 3 6 1 5 5 7 0 11 */ | ||
| 1959 | &(nid_objs[280]),/* OBJ_id_mod_attribute_cert 1 3 6 1 5 5 7 0 12 */ | ||
| 1960 | &(nid_objs[281]),/* OBJ_id_mod_timestamp_protocol 1 3 6 1 5 5 7 0 13 */ | ||
| 1961 | &(nid_objs[282]),/* OBJ_id_mod_ocsp 1 3 6 1 5 5 7 0 14 */ | ||
| 1962 | &(nid_objs[283]),/* OBJ_id_mod_dvcs 1 3 6 1 5 5 7 0 15 */ | ||
| 1963 | &(nid_objs[284]),/* OBJ_id_mod_cmp2000 1 3 6 1 5 5 7 0 16 */ | ||
| 1964 | &(nid_objs[177]),/* OBJ_info_access 1 3 6 1 5 5 7 1 1 */ | ||
| 1965 | &(nid_objs[285]),/* OBJ_biometricInfo 1 3 6 1 5 5 7 1 2 */ | ||
| 1966 | &(nid_objs[286]),/* OBJ_qcStatements 1 3 6 1 5 5 7 1 3 */ | ||
| 1967 | &(nid_objs[287]),/* OBJ_ac_auditEntity 1 3 6 1 5 5 7 1 4 */ | ||
| 1968 | &(nid_objs[288]),/* OBJ_ac_targeting 1 3 6 1 5 5 7 1 5 */ | ||
| 1969 | &(nid_objs[289]),/* OBJ_aaControls 1 3 6 1 5 5 7 1 6 */ | ||
| 1970 | &(nid_objs[290]),/* OBJ_sbqp_ipAddrBlock 1 3 6 1 5 5 7 1 7 */ | ||
| 1971 | &(nid_objs[291]),/* OBJ_sbqp_autonomousSysNum 1 3 6 1 5 5 7 1 8 */ | ||
| 1972 | &(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */ | ||
| 1973 | &(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */ | ||
| 1974 | &(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */ | ||
| 1975 | &(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */ | ||
| 1976 | &(nid_objs[129]),/* OBJ_server_auth 1 3 6 1 5 5 7 3 1 */ | ||
| 1977 | &(nid_objs[130]),/* OBJ_client_auth 1 3 6 1 5 5 7 3 2 */ | ||
| 1978 | &(nid_objs[131]),/* OBJ_code_sign 1 3 6 1 5 5 7 3 3 */ | ||
| 1979 | &(nid_objs[132]),/* OBJ_email_protect 1 3 6 1 5 5 7 3 4 */ | ||
| 1980 | &(nid_objs[294]),/* OBJ_ipsecEndSystem 1 3 6 1 5 5 7 3 5 */ | ||
| 1981 | &(nid_objs[295]),/* OBJ_ipsecTunnel 1 3 6 1 5 5 7 3 6 */ | ||
| 1982 | &(nid_objs[296]),/* OBJ_ipsecUser 1 3 6 1 5 5 7 3 7 */ | ||
| 1983 | &(nid_objs[133]),/* OBJ_time_stamp 1 3 6 1 5 5 7 3 8 */ | ||
| 1984 | &(nid_objs[180]),/* OBJ_OCSP_sign 1 3 6 1 5 5 7 3 9 */ | ||
| 1985 | &(nid_objs[297]),/* OBJ_dvcs 1 3 6 1 5 5 7 3 10 */ | ||
| 1986 | &(nid_objs[298]),/* OBJ_id_it_caProtEncCert 1 3 6 1 5 5 7 4 1 */ | ||
| 1987 | &(nid_objs[299]),/* OBJ_id_it_signKeyPairTypes 1 3 6 1 5 5 7 4 2 */ | ||
| 1988 | &(nid_objs[300]),/* OBJ_id_it_encKeyPairTypes 1 3 6 1 5 5 7 4 3 */ | ||
| 1989 | &(nid_objs[301]),/* OBJ_id_it_preferredSymmAlg 1 3 6 1 5 5 7 4 4 */ | ||
| 1990 | &(nid_objs[302]),/* OBJ_id_it_caKeyUpdateInfo 1 3 6 1 5 5 7 4 5 */ | ||
| 1991 | &(nid_objs[303]),/* OBJ_id_it_currentCRL 1 3 6 1 5 5 7 4 6 */ | ||
| 1992 | &(nid_objs[304]),/* OBJ_id_it_unsupportedOIDs 1 3 6 1 5 5 7 4 7 */ | ||
| 1993 | &(nid_objs[305]),/* OBJ_id_it_subscriptionRequest 1 3 6 1 5 5 7 4 8 */ | ||
| 1994 | &(nid_objs[306]),/* OBJ_id_it_subscriptionResponse 1 3 6 1 5 5 7 4 9 */ | ||
| 1995 | &(nid_objs[307]),/* OBJ_id_it_keyPairParamReq 1 3 6 1 5 5 7 4 10 */ | ||
| 1996 | &(nid_objs[308]),/* OBJ_id_it_keyPairParamRep 1 3 6 1 5 5 7 4 11 */ | ||
| 1997 | &(nid_objs[309]),/* OBJ_id_it_revPassphrase 1 3 6 1 5 5 7 4 12 */ | ||
| 1998 | &(nid_objs[310]),/* OBJ_id_it_implicitConfirm 1 3 6 1 5 5 7 4 13 */ | ||
| 1999 | &(nid_objs[311]),/* OBJ_id_it_confirmWaitTime 1 3 6 1 5 5 7 4 14 */ | ||
| 2000 | &(nid_objs[312]),/* OBJ_id_it_origPKIMessage 1 3 6 1 5 5 7 4 15 */ | ||
| 2001 | &(nid_objs[313]),/* OBJ_id_regCtrl 1 3 6 1 5 5 7 5 1 */ | ||
| 2002 | &(nid_objs[314]),/* OBJ_id_regInfo 1 3 6 1 5 5 7 5 2 */ | ||
| 2003 | &(nid_objs[323]),/* OBJ_id_alg_des40 1 3 6 1 5 5 7 6 1 */ | ||
| 2004 | &(nid_objs[324]),/* OBJ_id_alg_noSignature 1 3 6 1 5 5 7 6 2 */ | ||
| 2005 | &(nid_objs[325]),/* OBJ_id_alg_dh_sig_hmac_sha1 1 3 6 1 5 5 7 6 3 */ | ||
| 2006 | &(nid_objs[326]),/* OBJ_id_alg_dh_pop 1 3 6 1 5 5 7 6 4 */ | ||
| 2007 | &(nid_objs[327]),/* OBJ_id_cmc_statusInfo 1 3 6 1 5 5 7 7 1 */ | ||
| 2008 | &(nid_objs[328]),/* OBJ_id_cmc_identification 1 3 6 1 5 5 7 7 2 */ | ||
| 2009 | &(nid_objs[329]),/* OBJ_id_cmc_identityProof 1 3 6 1 5 5 7 7 3 */ | ||
| 2010 | &(nid_objs[330]),/* OBJ_id_cmc_dataReturn 1 3 6 1 5 5 7 7 4 */ | ||
| 2011 | &(nid_objs[331]),/* OBJ_id_cmc_transactionId 1 3 6 1 5 5 7 7 5 */ | ||
| 2012 | &(nid_objs[332]),/* OBJ_id_cmc_senderNonce 1 3 6 1 5 5 7 7 6 */ | ||
| 2013 | &(nid_objs[333]),/* OBJ_id_cmc_recipientNonce 1 3 6 1 5 5 7 7 7 */ | ||
| 2014 | &(nid_objs[334]),/* OBJ_id_cmc_addExtensions 1 3 6 1 5 5 7 7 8 */ | ||
| 2015 | &(nid_objs[335]),/* OBJ_id_cmc_encryptedPOP 1 3 6 1 5 5 7 7 9 */ | ||
| 2016 | &(nid_objs[336]),/* OBJ_id_cmc_decryptedPOP 1 3 6 1 5 5 7 7 10 */ | ||
| 2017 | &(nid_objs[337]),/* OBJ_id_cmc_lraPOPWitness 1 3 6 1 5 5 7 7 11 */ | ||
| 2018 | &(nid_objs[338]),/* OBJ_id_cmc_getCert 1 3 6 1 5 5 7 7 15 */ | ||
| 2019 | &(nid_objs[339]),/* OBJ_id_cmc_getCRL 1 3 6 1 5 5 7 7 16 */ | ||
| 2020 | &(nid_objs[340]),/* OBJ_id_cmc_revokeRequest 1 3 6 1 5 5 7 7 17 */ | ||
| 2021 | &(nid_objs[341]),/* OBJ_id_cmc_regInfo 1 3 6 1 5 5 7 7 18 */ | ||
| 2022 | &(nid_objs[342]),/* OBJ_id_cmc_responseInfo 1 3 6 1 5 5 7 7 19 */ | ||
| 2023 | &(nid_objs[343]),/* OBJ_id_cmc_queryPending 1 3 6 1 5 5 7 7 21 */ | ||
| 2024 | &(nid_objs[344]),/* OBJ_id_cmc_popLinkRandom 1 3 6 1 5 5 7 7 22 */ | ||
| 2025 | &(nid_objs[345]),/* OBJ_id_cmc_popLinkWitness 1 3 6 1 5 5 7 7 23 */ | ||
| 2026 | &(nid_objs[346]),/* OBJ_id_cmc_confirmCertAcceptance 1 3 6 1 5 5 7 7 24 */ | ||
| 2027 | &(nid_objs[347]),/* OBJ_id_on_personalData 1 3 6 1 5 5 7 8 1 */ | ||
| 2028 | &(nid_objs[348]),/* OBJ_id_pda_dateOfBirth 1 3 6 1 5 5 7 9 1 */ | ||
| 2029 | &(nid_objs[349]),/* OBJ_id_pda_placeOfBirth 1 3 6 1 5 5 7 9 2 */ | ||
| 2030 | &(nid_objs[350]),/* OBJ_id_pda_pseudonym 1 3 6 1 5 5 7 9 3 */ | ||
| 2031 | &(nid_objs[351]),/* OBJ_id_pda_gender 1 3 6 1 5 5 7 9 4 */ | ||
| 2032 | &(nid_objs[352]),/* OBJ_id_pda_countryOfCitizenship 1 3 6 1 5 5 7 9 5 */ | ||
| 2033 | &(nid_objs[353]),/* OBJ_id_pda_countryOfResidence 1 3 6 1 5 5 7 9 6 */ | ||
| 2034 | &(nid_objs[354]),/* OBJ_id_aca_authenticationInfo 1 3 6 1 5 5 7 10 1 */ | ||
| 2035 | &(nid_objs[355]),/* OBJ_id_aca_accessIdentity 1 3 6 1 5 5 7 10 2 */ | ||
| 2036 | &(nid_objs[356]),/* OBJ_id_aca_chargingIdentity 1 3 6 1 5 5 7 10 3 */ | ||
| 2037 | &(nid_objs[357]),/* OBJ_id_aca_group 1 3 6 1 5 5 7 10 4 */ | ||
| 2038 | &(nid_objs[358]),/* OBJ_id_aca_role 1 3 6 1 5 5 7 10 5 */ | ||
| 2039 | &(nid_objs[359]),/* OBJ_id_qcs_pkixQCSyntax_v1 1 3 6 1 5 5 7 11 1 */ | ||
| 2040 | &(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */ | ||
| 2041 | &(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */ | ||
| 2042 | &(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */ | ||
| 2043 | &(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */ | ||
| 2044 | &(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */ | ||
| 2045 | &(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */ | ||
| 2046 | &(nid_objs[364]),/* OBJ_ad_dvcs 1 3 6 1 5 5 7 48 4 */ | ||
| 2047 | &(nid_objs[58]),/* OBJ_netscape_cert_extension 2 16 840 1 113730 1 */ | ||
| 2048 | &(nid_objs[59]),/* OBJ_netscape_data_type 2 16 840 1 113730 2 */ | ||
| 2049 | &(nid_objs[108]),/* OBJ_cast5_cbc 1 2 840 113533 7 66 10 */ | ||
| 2050 | &(nid_objs[112]),/* OBJ_pbeWithMD5AndCast5_CBC 1 2 840 113533 7 66 12 */ | ||
| 2051 | &(nid_objs[ 6]),/* OBJ_rsaEncryption 1 2 840 113549 1 1 1 */ | ||
| 2052 | &(nid_objs[ 7]),/* OBJ_md2WithRSAEncryption 1 2 840 113549 1 1 2 */ | ||
| 2053 | &(nid_objs[ 8]),/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */ | ||
| 2054 | &(nid_objs[65]),/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */ | ||
| 2055 | &(nid_objs[28]),/* OBJ_dhKeyAgreement 1 2 840 113549 1 3 1 */ | ||
| 2056 | &(nid_objs[ 9]),/* OBJ_pbeWithMD2AndDES_CBC 1 2 840 113549 1 5 1 */ | ||
| 2057 | &(nid_objs[10]),/* OBJ_pbeWithMD5AndDES_CBC 1 2 840 113549 1 5 3 */ | ||
| 2058 | &(nid_objs[168]),/* OBJ_pbeWithMD2AndRC2_CBC 1 2 840 113549 1 5 4 */ | ||
| 2059 | &(nid_objs[169]),/* OBJ_pbeWithMD5AndRC2_CBC 1 2 840 113549 1 5 6 */ | ||
| 2060 | &(nid_objs[170]),/* OBJ_pbeWithSHA1AndDES_CBC 1 2 840 113549 1 5 10 */ | ||
| 2061 | &(nid_objs[68]),/* OBJ_pbeWithSHA1AndRC2_CBC 1 2 840 113549 1 5 11 */ | ||
| 2062 | &(nid_objs[69]),/* OBJ_id_pbkdf2 1 2 840 113549 1 5 12 */ | ||
| 2063 | &(nid_objs[161]),/* OBJ_pbes2 1 2 840 113549 1 5 13 */ | ||
| 2064 | &(nid_objs[162]),/* OBJ_pbmac1 1 2 840 113549 1 5 14 */ | ||
| 2065 | &(nid_objs[21]),/* OBJ_pkcs7_data 1 2 840 113549 1 7 1 */ | ||
| 2066 | &(nid_objs[22]),/* OBJ_pkcs7_signed 1 2 840 113549 1 7 2 */ | ||
| 2067 | &(nid_objs[23]),/* OBJ_pkcs7_enveloped 1 2 840 113549 1 7 3 */ | ||
| 2068 | &(nid_objs[24]),/* OBJ_pkcs7_signedAndEnveloped 1 2 840 113549 1 7 4 */ | ||
| 2069 | &(nid_objs[25]),/* OBJ_pkcs7_digest 1 2 840 113549 1 7 5 */ | ||
| 2070 | &(nid_objs[26]),/* OBJ_pkcs7_encrypted 1 2 840 113549 1 7 6 */ | ||
| 2071 | &(nid_objs[48]),/* OBJ_pkcs9_emailAddress 1 2 840 113549 1 9 1 */ | ||
| 2072 | &(nid_objs[49]),/* OBJ_pkcs9_unstructuredName 1 2 840 113549 1 9 2 */ | ||
| 2073 | &(nid_objs[50]),/* OBJ_pkcs9_contentType 1 2 840 113549 1 9 3 */ | ||
| 2074 | &(nid_objs[51]),/* OBJ_pkcs9_messageDigest 1 2 840 113549 1 9 4 */ | ||
| 2075 | &(nid_objs[52]),/* OBJ_pkcs9_signingTime 1 2 840 113549 1 9 5 */ | ||
| 2076 | &(nid_objs[53]),/* OBJ_pkcs9_countersignature 1 2 840 113549 1 9 6 */ | ||
| 2077 | &(nid_objs[54]),/* OBJ_pkcs9_challengePassword 1 2 840 113549 1 9 7 */ | ||
| 2078 | &(nid_objs[55]),/* OBJ_pkcs9_unstructuredAddress 1 2 840 113549 1 9 8 */ | ||
| 2079 | &(nid_objs[56]),/* OBJ_pkcs9_extCertAttributes 1 2 840 113549 1 9 9 */ | ||
| 2080 | &(nid_objs[172]),/* OBJ_ext_req 1 2 840 113549 1 9 14 */ | ||
| 2081 | &(nid_objs[167]),/* OBJ_SMIMECapabilities 1 2 840 113549 1 9 15 */ | ||
| 2082 | &(nid_objs[188]),/* OBJ_SMIME 1 2 840 113549 1 9 16 */ | ||
| 2083 | &(nid_objs[156]),/* OBJ_friendlyName 1 2 840 113549 1 9 20 */ | ||
| 2084 | &(nid_objs[157]),/* OBJ_localKeyID 1 2 840 113549 1 9 21 */ | ||
| 2085 | &(nid_objs[91]),/* OBJ_bf_cbc 1 3 6 1 4 1 3029 1 2 */ | ||
| 2086 | &(nid_objs[315]),/* OBJ_id_regCtrl_regToken 1 3 6 1 5 5 7 5 1 1 */ | ||
| 2087 | &(nid_objs[316]),/* OBJ_id_regCtrl_authenticator 1 3 6 1 5 5 7 5 1 2 */ | ||
| 2088 | &(nid_objs[317]),/* OBJ_id_regCtrl_pkiPublicationInfo 1 3 6 1 5 5 7 5 1 3 */ | ||
| 2089 | &(nid_objs[318]),/* OBJ_id_regCtrl_pkiArchiveOptions 1 3 6 1 5 5 7 5 1 4 */ | ||
| 2090 | &(nid_objs[319]),/* OBJ_id_regCtrl_oldCertID 1 3 6 1 5 5 7 5 1 5 */ | ||
| 2091 | &(nid_objs[320]),/* OBJ_id_regCtrl_protocolEncrKey 1 3 6 1 5 5 7 5 1 6 */ | ||
| 2092 | &(nid_objs[321]),/* OBJ_id_regInfo_utf8Pairs 1 3 6 1 5 5 7 5 2 1 */ | ||
| 2093 | &(nid_objs[322]),/* OBJ_id_regInfo_certReq 1 3 6 1 5 5 7 5 2 2 */ | ||
| 2094 | &(nid_objs[365]),/* OBJ_id_pkix_OCSP_basic 1 3 6 1 5 5 7 48 1 1 */ | ||
| 2095 | &(nid_objs[366]),/* OBJ_id_pkix_OCSP_Nonce 1 3 6 1 5 5 7 48 1 2 */ | ||
| 2096 | &(nid_objs[367]),/* OBJ_id_pkix_OCSP_CrlID 1 3 6 1 5 5 7 48 1 3 */ | ||
| 2097 | &(nid_objs[368]),/* OBJ_id_pkix_OCSP_acceptableResponses 1 3 6 1 5 5 7 48 1 4 */ | ||
| 2098 | &(nid_objs[369]),/* OBJ_id_pkix_OCSP_noCheck 1 3 6 1 5 5 7 48 1 5 */ | ||
| 2099 | &(nid_objs[370]),/* OBJ_id_pkix_OCSP_archiveCutoff 1 3 6 1 5 5 7 48 1 6 */ | ||
| 2100 | &(nid_objs[371]),/* OBJ_id_pkix_OCSP_serviceLocator 1 3 6 1 5 5 7 48 1 7 */ | ||
| 2101 | &(nid_objs[372]),/* OBJ_id_pkix_OCSP_extendedStatus 1 3 6 1 5 5 7 48 1 8 */ | ||
| 2102 | &(nid_objs[373]),/* OBJ_id_pkix_OCSP_valid 1 3 6 1 5 5 7 48 1 9 */ | ||
| 2103 | &(nid_objs[374]),/* OBJ_id_pkix_OCSP_path 1 3 6 1 5 5 7 48 1 10 */ | ||
| 2104 | &(nid_objs[375]),/* OBJ_id_pkix_OCSP_trustRoot 1 3 6 1 5 5 7 48 1 11 */ | ||
| 2105 | &(nid_objs[71]),/* OBJ_netscape_cert_type 2 16 840 1 113730 1 1 */ | ||
| 2106 | &(nid_objs[72]),/* OBJ_netscape_base_url 2 16 840 1 113730 1 2 */ | ||
| 2107 | &(nid_objs[73]),/* OBJ_netscape_revocation_url 2 16 840 1 113730 1 3 */ | ||
| 2108 | &(nid_objs[74]),/* OBJ_netscape_ca_revocation_url 2 16 840 1 113730 1 4 */ | ||
| 2109 | &(nid_objs[75]),/* OBJ_netscape_renewal_url 2 16 840 1 113730 1 7 */ | ||
| 2110 | &(nid_objs[76]),/* OBJ_netscape_ca_policy_url 2 16 840 1 113730 1 8 */ | ||
| 2111 | &(nid_objs[77]),/* OBJ_netscape_ssl_server_name 2 16 840 1 113730 1 12 */ | ||
| 2112 | &(nid_objs[78]),/* OBJ_netscape_comment 2 16 840 1 113730 1 13 */ | ||
| 2113 | &(nid_objs[79]),/* OBJ_netscape_cert_sequence 2 16 840 1 113730 2 5 */ | ||
| 2114 | &(nid_objs[139]),/* OBJ_ns_sgc 2 16 840 1 113730 4 1 */ | ||
| 2115 | &(nid_objs[391]),/* OBJ_domainComponent 0 9 2342 19200300 100 1 25 */ | ||
| 2116 | &(nid_objs[392]),/* OBJ_Domain 0 9 2342 19200300 100 4 13 */ | ||
| 2117 | &(nid_objs[189]),/* OBJ_id_smime_mod 1 2 840 113549 1 9 16 0 */ | ||
| 2118 | &(nid_objs[190]),/* OBJ_id_smime_ct 1 2 840 113549 1 9 16 1 */ | ||
| 2119 | &(nid_objs[191]),/* OBJ_id_smime_aa 1 2 840 113549 1 9 16 2 */ | ||
| 2120 | &(nid_objs[192]),/* OBJ_id_smime_alg 1 2 840 113549 1 9 16 3 */ | ||
| 2121 | &(nid_objs[193]),/* OBJ_id_smime_cd 1 2 840 113549 1 9 16 4 */ | ||
| 2122 | &(nid_objs[194]),/* OBJ_id_smime_spq 1 2 840 113549 1 9 16 5 */ | ||
| 2123 | &(nid_objs[195]),/* OBJ_id_smime_cti 1 2 840 113549 1 9 16 6 */ | ||
| 2124 | &(nid_objs[158]),/* OBJ_x509Certificate 1 2 840 113549 1 9 22 1 */ | ||
| 2125 | &(nid_objs[159]),/* OBJ_sdsiCertificate 1 2 840 113549 1 9 22 2 */ | ||
| 2126 | &(nid_objs[160]),/* OBJ_x509Crl 1 2 840 113549 1 9 23 1 */ | ||
| 2127 | &(nid_objs[144]),/* OBJ_pbe_WithSHA1And128BitRC4 1 2 840 113549 1 12 1 1 */ | ||
| 2128 | &(nid_objs[145]),/* OBJ_pbe_WithSHA1And40BitRC4 1 2 840 113549 1 12 1 2 */ | ||
| 2129 | &(nid_objs[146]),/* OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC 1 2 840 113549 1 12 1 3 */ | ||
| 2130 | &(nid_objs[147]),/* OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC 1 2 840 113549 1 12 1 4 */ | ||
| 2131 | &(nid_objs[148]),/* OBJ_pbe_WithSHA1And128BitRC2_CBC 1 2 840 113549 1 12 1 5 */ | ||
| 2132 | &(nid_objs[149]),/* OBJ_pbe_WithSHA1And40BitRC2_CBC 1 2 840 113549 1 12 1 6 */ | ||
| 2133 | &(nid_objs[171]),/* OBJ_ms_ext_req 1 3 6 1 4 1 311 2 1 14 */ | ||
| 2134 | &(nid_objs[134]),/* OBJ_ms_code_ind 1 3 6 1 4 1 311 2 1 21 */ | ||
| 2135 | &(nid_objs[135]),/* OBJ_ms_code_com 1 3 6 1 4 1 311 2 1 22 */ | ||
| 2136 | &(nid_objs[136]),/* OBJ_ms_ctl_sign 1 3 6 1 4 1 311 10 3 1 */ | ||
| 2137 | &(nid_objs[137]),/* OBJ_ms_sgc 1 3 6 1 4 1 311 10 3 3 */ | ||
| 2138 | &(nid_objs[138]),/* OBJ_ms_efs 1 3 6 1 4 1 311 10 3 4 */ | ||
| 2139 | &(nid_objs[196]),/* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */ | ||
| 2140 | &(nid_objs[197]),/* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */ | ||
| 2141 | &(nid_objs[198]),/* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */ | ||
| 2142 | &(nid_objs[199]),/* OBJ_id_smime_mod_msg_v3 1 2 840 113549 1 9 16 0 4 */ | ||
| 2143 | &(nid_objs[200]),/* OBJ_id_smime_mod_ets_eSignature_88 1 2 840 113549 1 9 16 0 5 */ | ||
| 2144 | &(nid_objs[201]),/* OBJ_id_smime_mod_ets_eSignature_97 1 2 840 113549 1 9 16 0 6 */ | ||
| 2145 | &(nid_objs[202]),/* OBJ_id_smime_mod_ets_eSigPolicy_88 1 2 840 113549 1 9 16 0 7 */ | ||
| 2146 | &(nid_objs[203]),/* OBJ_id_smime_mod_ets_eSigPolicy_97 1 2 840 113549 1 9 16 0 8 */ | ||
| 2147 | &(nid_objs[204]),/* OBJ_id_smime_ct_receipt 1 2 840 113549 1 9 16 1 1 */ | ||
| 2148 | &(nid_objs[205]),/* OBJ_id_smime_ct_authData 1 2 840 113549 1 9 16 1 2 */ | ||
| 2149 | &(nid_objs[206]),/* OBJ_id_smime_ct_publishCert 1 2 840 113549 1 9 16 1 3 */ | ||
| 2150 | &(nid_objs[207]),/* OBJ_id_smime_ct_TSTInfo 1 2 840 113549 1 9 16 1 4 */ | ||
| 2151 | &(nid_objs[208]),/* OBJ_id_smime_ct_TDTInfo 1 2 840 113549 1 9 16 1 5 */ | ||
| 2152 | &(nid_objs[209]),/* OBJ_id_smime_ct_contentInfo 1 2 840 113549 1 9 16 1 6 */ | ||
| 2153 | &(nid_objs[210]),/* OBJ_id_smime_ct_DVCSRequestData 1 2 840 113549 1 9 16 1 7 */ | ||
| 2154 | &(nid_objs[211]),/* OBJ_id_smime_ct_DVCSResponseData 1 2 840 113549 1 9 16 1 8 */ | ||
| 2155 | &(nid_objs[212]),/* OBJ_id_smime_aa_receiptRequest 1 2 840 113549 1 9 16 2 1 */ | ||
| 2156 | &(nid_objs[213]),/* OBJ_id_smime_aa_securityLabel 1 2 840 113549 1 9 16 2 2 */ | ||
| 2157 | &(nid_objs[214]),/* OBJ_id_smime_aa_mlExpandHistory 1 2 840 113549 1 9 16 2 3 */ | ||
| 2158 | &(nid_objs[215]),/* OBJ_id_smime_aa_contentHint 1 2 840 113549 1 9 16 2 4 */ | ||
| 2159 | &(nid_objs[216]),/* OBJ_id_smime_aa_msgSigDigest 1 2 840 113549 1 9 16 2 5 */ | ||
| 2160 | &(nid_objs[217]),/* OBJ_id_smime_aa_encapContentType 1 2 840 113549 1 9 16 2 6 */ | ||
| 2161 | &(nid_objs[218]),/* OBJ_id_smime_aa_contentIdentifier 1 2 840 113549 1 9 16 2 7 */ | ||
| 2162 | &(nid_objs[219]),/* OBJ_id_smime_aa_macValue 1 2 840 113549 1 9 16 2 8 */ | ||
| 2163 | &(nid_objs[220]),/* OBJ_id_smime_aa_equivalentLabels 1 2 840 113549 1 9 16 2 9 */ | ||
| 2164 | &(nid_objs[221]),/* OBJ_id_smime_aa_contentReference 1 2 840 113549 1 9 16 2 10 */ | ||
| 2165 | &(nid_objs[222]),/* OBJ_id_smime_aa_encrypKeyPref 1 2 840 113549 1 9 16 2 11 */ | ||
| 2166 | &(nid_objs[223]),/* OBJ_id_smime_aa_signingCertificate 1 2 840 113549 1 9 16 2 12 */ | ||
| 2167 | &(nid_objs[224]),/* OBJ_id_smime_aa_smimeEncryptCerts 1 2 840 113549 1 9 16 2 13 */ | ||
| 2168 | &(nid_objs[225]),/* OBJ_id_smime_aa_timeStampToken 1 2 840 113549 1 9 16 2 14 */ | ||
| 2169 | &(nid_objs[226]),/* OBJ_id_smime_aa_ets_sigPolicyId 1 2 840 113549 1 9 16 2 15 */ | ||
| 2170 | &(nid_objs[227]),/* OBJ_id_smime_aa_ets_commitmentType 1 2 840 113549 1 9 16 2 16 */ | ||
| 2171 | &(nid_objs[228]),/* OBJ_id_smime_aa_ets_signerLocation 1 2 840 113549 1 9 16 2 17 */ | ||
| 2172 | &(nid_objs[229]),/* OBJ_id_smime_aa_ets_signerAttr 1 2 840 113549 1 9 16 2 18 */ | ||
| 2173 | &(nid_objs[230]),/* OBJ_id_smime_aa_ets_otherSigCert 1 2 840 113549 1 9 16 2 19 */ | ||
| 2174 | &(nid_objs[231]),/* OBJ_id_smime_aa_ets_contentTimestamp 1 2 840 113549 1 9 16 2 20 */ | ||
| 2175 | &(nid_objs[232]),/* OBJ_id_smime_aa_ets_CertificateRefs 1 2 840 113549 1 9 16 2 21 */ | ||
| 2176 | &(nid_objs[233]),/* OBJ_id_smime_aa_ets_RevocationRefs 1 2 840 113549 1 9 16 2 22 */ | ||
| 2177 | &(nid_objs[234]),/* OBJ_id_smime_aa_ets_certValues 1 2 840 113549 1 9 16 2 23 */ | ||
| 2178 | &(nid_objs[235]),/* OBJ_id_smime_aa_ets_revocationValues 1 2 840 113549 1 9 16 2 24 */ | ||
| 2179 | &(nid_objs[236]),/* OBJ_id_smime_aa_ets_escTimeStamp 1 2 840 113549 1 9 16 2 25 */ | ||
| 2180 | &(nid_objs[237]),/* OBJ_id_smime_aa_ets_certCRLTimestamp 1 2 840 113549 1 9 16 2 26 */ | ||
| 2181 | &(nid_objs[238]),/* OBJ_id_smime_aa_ets_archiveTimeStamp 1 2 840 113549 1 9 16 2 27 */ | ||
| 2182 | &(nid_objs[239]),/* OBJ_id_smime_aa_signatureType 1 2 840 113549 1 9 16 2 28 */ | ||
| 2183 | &(nid_objs[240]),/* OBJ_id_smime_aa_dvcs_dvc 1 2 840 113549 1 9 16 2 29 */ | ||
| 2184 | &(nid_objs[241]),/* OBJ_id_smime_alg_ESDHwith3DES 1 2 840 113549 1 9 16 3 1 */ | ||
| 2185 | &(nid_objs[242]),/* OBJ_id_smime_alg_ESDHwithRC2 1 2 840 113549 1 9 16 3 2 */ | ||
| 2186 | &(nid_objs[243]),/* OBJ_id_smime_alg_3DESwrap 1 2 840 113549 1 9 16 3 3 */ | ||
| 2187 | &(nid_objs[244]),/* OBJ_id_smime_alg_RC2wrap 1 2 840 113549 1 9 16 3 4 */ | ||
| 2188 | &(nid_objs[245]),/* OBJ_id_smime_alg_ESDH 1 2 840 113549 1 9 16 3 5 */ | ||
| 2189 | &(nid_objs[246]),/* OBJ_id_smime_alg_CMS3DESwrap 1 2 840 113549 1 9 16 3 6 */ | ||
| 2190 | &(nid_objs[247]),/* OBJ_id_smime_alg_CMSRC2wrap 1 2 840 113549 1 9 16 3 7 */ | ||
| 2191 | &(nid_objs[248]),/* OBJ_id_smime_cd_ldap 1 2 840 113549 1 9 16 4 1 */ | ||
| 2192 | &(nid_objs[249]),/* OBJ_id_smime_spq_ets_sqt_uri 1 2 840 113549 1 9 16 5 1 */ | ||
| 2193 | &(nid_objs[250]),/* OBJ_id_smime_spq_ets_sqt_unotice 1 2 840 113549 1 9 16 5 2 */ | ||
| 2194 | &(nid_objs[251]),/* OBJ_id_smime_cti_ets_proofOfOrigin 1 2 840 113549 1 9 16 6 1 */ | ||
| 2195 | &(nid_objs[252]),/* OBJ_id_smime_cti_ets_proofOfReceipt 1 2 840 113549 1 9 16 6 2 */ | ||
| 2196 | &(nid_objs[253]),/* OBJ_id_smime_cti_ets_proofOfDelivery 1 2 840 113549 1 9 16 6 3 */ | ||
| 2197 | &(nid_objs[254]),/* OBJ_id_smime_cti_ets_proofOfSender 1 2 840 113549 1 9 16 6 4 */ | ||
| 2198 | &(nid_objs[255]),/* OBJ_id_smime_cti_ets_proofOfApproval 1 2 840 113549 1 9 16 6 5 */ | ||
| 2199 | &(nid_objs[256]),/* OBJ_id_smime_cti_ets_proofOfCreation 1 2 840 113549 1 9 16 6 6 */ | ||
| 2200 | &(nid_objs[150]),/* OBJ_keyBag 1 2 840 113549 1 12 10 1 1 */ | ||
| 2201 | &(nid_objs[151]),/* OBJ_pkcs8ShroudedKeyBag 1 2 840 113549 1 12 10 1 2 */ | ||
| 2202 | &(nid_objs[152]),/* OBJ_certBag 1 2 840 113549 1 12 10 1 3 */ | ||
| 2203 | &(nid_objs[153]),/* OBJ_crlBag 1 2 840 113549 1 12 10 1 4 */ | ||
| 2204 | &(nid_objs[154]),/* OBJ_secretBag 1 2 840 113549 1 12 10 1 5 */ | ||
| 2205 | &(nid_objs[155]),/* OBJ_safeContentsBag 1 2 840 113549 1 12 10 1 6 */ | ||
| 2206 | &(nid_objs[34]),/* OBJ_idea_cbc 1 3 6 1 4 1 188 7 1 1 2 */ | ||
| 2207 | }; | ||
| 2208 | |||
diff --git a/src/lib/libcrypto/pkcs12/p12_bags.c b/src/lib/libcrypto/pkcs12/p12_bags.c deleted file mode 100644 index 56547ef933..0000000000 --- a/src/lib/libcrypto/pkcs12/p12_bags.c +++ /dev/null | |||
| @@ -1,192 +0,0 @@ | |||
| 1 | /* p12_bags.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12_BAGS(PKCS12_BAGS *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | int bagnid, v = 0; | ||
| 67 | M_ASN1_I2D_vars(a); | ||
| 68 | bagnid = OBJ_obj2nid (a->type); | ||
| 69 | M_ASN1_I2D_len (a->type, i2d_ASN1_OBJECT); | ||
| 70 | |||
| 71 | switch (bagnid) { | ||
| 72 | |||
| 73 | case NID_x509Certificate: | ||
| 74 | M_ASN1_I2D_len_EXP_opt (a->value.x509cert, | ||
| 75 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 76 | break; | ||
| 77 | |||
| 78 | case NID_x509Crl: | ||
| 79 | M_ASN1_I2D_len_EXP_opt (a->value.x509crl, | ||
| 80 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 81 | break; | ||
| 82 | |||
| 83 | case NID_sdsiCertificate: | ||
| 84 | M_ASN1_I2D_len_EXP_opt (a->value.sdsicert, | ||
| 85 | i2d_ASN1_IA5STRING, 0, v); | ||
| 86 | break; | ||
| 87 | |||
| 88 | default: | ||
| 89 | M_ASN1_I2D_len_EXP_opt (a->value.other, | ||
| 90 | i2d_ASN1_TYPE, 0, v); | ||
| 91 | break; | ||
| 92 | } | ||
| 93 | |||
| 94 | M_ASN1_I2D_seq_total (); | ||
| 95 | |||
| 96 | M_ASN1_I2D_put (a->type, i2d_ASN1_OBJECT); | ||
| 97 | |||
| 98 | switch (bagnid) { | ||
| 99 | |||
| 100 | case NID_x509Certificate: | ||
| 101 | M_ASN1_I2D_put_EXP_opt (a->value.x509cert, | ||
| 102 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 103 | break; | ||
| 104 | |||
| 105 | case NID_x509Crl: | ||
| 106 | M_ASN1_I2D_put_EXP_opt (a->value.x509crl, | ||
| 107 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 108 | break; | ||
| 109 | |||
| 110 | case NID_sdsiCertificate: | ||
| 111 | M_ASN1_I2D_put_EXP_opt (a->value.sdsicert, | ||
| 112 | i2d_ASN1_IA5STRING, 0, v); | ||
| 113 | break; | ||
| 114 | |||
| 115 | default: | ||
| 116 | M_ASN1_I2D_put_EXP_opt (a->value.other, i2d_ASN1_TYPE, 0, v); | ||
| 117 | break; | ||
| 118 | } | ||
| 119 | M_ASN1_I2D_finish(); | ||
| 120 | } | ||
| 121 | |||
| 122 | PKCS12_BAGS *PKCS12_BAGS_new(void) | ||
| 123 | { | ||
| 124 | PKCS12_BAGS *ret=NULL; | ||
| 125 | ASN1_CTX c; | ||
| 126 | M_ASN1_New_Malloc(ret, PKCS12_BAGS); | ||
| 127 | ret->type=NULL; | ||
| 128 | ret->value.other=NULL; | ||
| 129 | return (ret); | ||
| 130 | M_ASN1_New_Error(ASN1_F_PKCS12_BAGS_NEW); | ||
| 131 | } | ||
| 132 | |||
| 133 | PKCS12_BAGS *d2i_PKCS12_BAGS(PKCS12_BAGS **a, unsigned char **pp, | ||
| 134 | long length) | ||
| 135 | { | ||
| 136 | int bagnid; | ||
| 137 | M_ASN1_D2I_vars(a,PKCS12_BAGS *,PKCS12_BAGS_new); | ||
| 138 | M_ASN1_D2I_Init(); | ||
| 139 | M_ASN1_D2I_start_sequence(); | ||
| 140 | M_ASN1_D2I_get (ret->type, d2i_ASN1_OBJECT); | ||
| 141 | bagnid = OBJ_obj2nid (ret->type); | ||
| 142 | switch (bagnid) { | ||
| 143 | |||
| 144 | case NID_x509Certificate: | ||
| 145 | M_ASN1_D2I_get_EXP_opt (ret->value.x509cert, | ||
| 146 | d2i_ASN1_OCTET_STRING, 0); | ||
| 147 | break; | ||
| 148 | |||
| 149 | case NID_x509Crl: | ||
| 150 | M_ASN1_D2I_get_EXP_opt (ret->value.x509crl, | ||
| 151 | d2i_ASN1_OCTET_STRING, 0); | ||
| 152 | break; | ||
| 153 | |||
| 154 | case NID_sdsiCertificate: | ||
| 155 | M_ASN1_D2I_get_EXP_opt (ret->value.sdsicert, | ||
| 156 | d2i_ASN1_IA5STRING, 0); | ||
| 157 | break; | ||
| 158 | |||
| 159 | default: | ||
| 160 | M_ASN1_D2I_get_EXP_opt (ret->value.other, | ||
| 161 | d2i_ASN1_TYPE, 0); | ||
| 162 | break; | ||
| 163 | } | ||
| 164 | |||
| 165 | M_ASN1_D2I_Finish(a, PKCS12_BAGS_free, ASN1_F_D2I_PKCS12_BAGS); | ||
| 166 | } | ||
| 167 | |||
| 168 | void PKCS12_BAGS_free (PKCS12_BAGS *a) | ||
| 169 | { | ||
| 170 | if (a == NULL) return; | ||
| 171 | switch (OBJ_obj2nid(a->type)) { | ||
| 172 | |||
| 173 | case NID_x509Certificate: | ||
| 174 | M_ASN1_OCTET_STRING_free (a->value.x509cert); | ||
| 175 | break; | ||
| 176 | |||
| 177 | case NID_x509Crl: | ||
| 178 | M_ASN1_OCTET_STRING_free (a->value.x509crl); | ||
| 179 | break; | ||
| 180 | |||
| 181 | case NID_sdsiCertificate: | ||
| 182 | M_ASN1_IA5STRING_free (a->value.sdsicert); | ||
| 183 | break; | ||
| 184 | |||
| 185 | default: | ||
| 186 | ASN1_TYPE_free (a->value.other); | ||
| 187 | break; | ||
| 188 | } | ||
| 189 | |||
| 190 | ASN1_OBJECT_free (a->type); | ||
| 191 | OPENSSL_free (a); | ||
| 192 | } | ||
diff --git a/src/lib/libcrypto/pkcs12/p12_lib.c b/src/lib/libcrypto/pkcs12/p12_lib.c deleted file mode 100644 index 7d464e3a32..0000000000 --- a/src/lib/libcrypto/pkcs12/p12_lib.c +++ /dev/null | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* p12_lib.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12(PKCS12 *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len (a->version, i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len (a->authsafes, i2d_PKCS7); | ||
| 70 | M_ASN1_I2D_len (a->mac, i2d_PKCS12_MAC_DATA); | ||
| 71 | |||
| 72 | M_ASN1_I2D_seq_total(); | ||
| 73 | |||
| 74 | M_ASN1_I2D_put (a->version, i2d_ASN1_INTEGER); | ||
| 75 | M_ASN1_I2D_put (a->authsafes, i2d_PKCS7); | ||
| 76 | M_ASN1_I2D_put (a->mac, i2d_PKCS12_MAC_DATA); | ||
| 77 | |||
| 78 | M_ASN1_I2D_finish(); | ||
| 79 | } | ||
| 80 | |||
| 81 | PKCS12 *d2i_PKCS12(PKCS12 **a, unsigned char **pp, long length) | ||
| 82 | { | ||
| 83 | M_ASN1_D2I_vars(a,PKCS12 *,PKCS12_new); | ||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get (ret->version, d2i_ASN1_INTEGER); | ||
| 87 | M_ASN1_D2I_get (ret->authsafes, d2i_PKCS7); | ||
| 88 | M_ASN1_D2I_get_opt (ret->mac, d2i_PKCS12_MAC_DATA, V_ASN1_SEQUENCE); | ||
| 89 | M_ASN1_D2I_Finish(a, PKCS12_free, ASN1_F_D2I_PKCS12); | ||
| 90 | } | ||
| 91 | |||
| 92 | PKCS12 *PKCS12_new(void) | ||
| 93 | { | ||
| 94 | PKCS12 *ret=NULL; | ||
| 95 | ASN1_CTX c; | ||
| 96 | M_ASN1_New_Malloc(ret, PKCS12); | ||
| 97 | ret->version=NULL; | ||
| 98 | ret->mac=NULL; | ||
| 99 | ret->authsafes=NULL; | ||
| 100 | return (ret); | ||
| 101 | M_ASN1_New_Error(ASN1_F_PKCS12_NEW); | ||
| 102 | } | ||
| 103 | |||
| 104 | void PKCS12_free (PKCS12 *a) | ||
| 105 | { | ||
| 106 | if (a == NULL) return; | ||
| 107 | M_ASN1_INTEGER_free(a->version); | ||
| 108 | PKCS12_MAC_DATA_free (a->mac); | ||
| 109 | PKCS7_free (a->authsafes); | ||
| 110 | OPENSSL_free (a); | ||
| 111 | } | ||
diff --git a/src/lib/libcrypto/pkcs12/p12_mac.c b/src/lib/libcrypto/pkcs12/p12_mac.c deleted file mode 100644 index fbd1eca24f..0000000000 --- a/src/lib/libcrypto/pkcs12/p12_mac.c +++ /dev/null | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | /* p12_mac.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12_MAC_DATA(PKCS12_MAC_DATA *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | M_ASN1_I2D_len (a->dinfo, i2d_X509_SIG); | ||
| 68 | M_ASN1_I2D_len (a->salt, i2d_ASN1_OCTET_STRING); | ||
| 69 | M_ASN1_I2D_len (a->iter, i2d_ASN1_INTEGER); | ||
| 70 | |||
| 71 | M_ASN1_I2D_seq_total(); | ||
| 72 | |||
| 73 | M_ASN1_I2D_put (a->dinfo, i2d_X509_SIG); | ||
| 74 | M_ASN1_I2D_put (a->salt, i2d_ASN1_OCTET_STRING); | ||
| 75 | M_ASN1_I2D_put (a->iter, i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_finish(); | ||
| 77 | } | ||
| 78 | |||
| 79 | PKCS12_MAC_DATA *PKCS12_MAC_DATA_new(void) | ||
| 80 | { | ||
| 81 | PKCS12_MAC_DATA *ret=NULL; | ||
| 82 | ASN1_CTX c; | ||
| 83 | M_ASN1_New_Malloc(ret, PKCS12_MAC_DATA); | ||
| 84 | ret->dinfo = X509_SIG_new(); | ||
| 85 | ret->salt = M_ASN1_OCTET_STRING_new(); | ||
| 86 | ret->iter = NULL; | ||
| 87 | return(ret); | ||
| 88 | M_ASN1_New_Error(ASN1_F_PKCS12_MAC_DATA_NEW); | ||
| 89 | } | ||
| 90 | |||
| 91 | PKCS12_MAC_DATA *d2i_PKCS12_MAC_DATA(PKCS12_MAC_DATA **a, unsigned char **pp, | ||
| 92 | long length) | ||
| 93 | { | ||
| 94 | M_ASN1_D2I_vars(a,PKCS12_MAC_DATA *,PKCS12_MAC_DATA_new); | ||
| 95 | M_ASN1_D2I_Init(); | ||
| 96 | M_ASN1_D2I_start_sequence(); | ||
| 97 | M_ASN1_D2I_get(ret->dinfo, d2i_X509_SIG); | ||
| 98 | M_ASN1_D2I_get(ret->salt, d2i_ASN1_OCTET_STRING); | ||
| 99 | M_ASN1_D2I_get_opt(ret->iter, d2i_ASN1_INTEGER, V_ASN1_INTEGER); | ||
| 100 | M_ASN1_D2I_Finish(a, PKCS12_MAC_DATA_free, ASN1_F_D2I_PKCS12_MAC_DATA); | ||
| 101 | } | ||
| 102 | |||
| 103 | void PKCS12_MAC_DATA_free (PKCS12_MAC_DATA *a) | ||
| 104 | { | ||
| 105 | if (a == NULL) return; | ||
| 106 | X509_SIG_free (a->dinfo); | ||
| 107 | M_ASN1_OCTET_STRING_free(a->salt); | ||
| 108 | M_ASN1_INTEGER_free(a->iter); | ||
| 109 | OPENSSL_free (a); | ||
| 110 | } | ||
diff --git a/src/lib/libcrypto/pkcs12/p12_sbag.c b/src/lib/libcrypto/pkcs12/p12_sbag.c deleted file mode 100644 index 64ac32ee6f..0000000000 --- a/src/lib/libcrypto/pkcs12/p12_sbag.c +++ /dev/null | |||
| @@ -1,234 +0,0 @@ | |||
| 1 | /* p12_sbag.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12_SAFEBAG(PKCS12_SAFEBAG *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | int bagnid, v = 0; | ||
| 67 | M_ASN1_I2D_vars(a); | ||
| 68 | bagnid = OBJ_obj2nid (a->type); | ||
| 69 | M_ASN1_I2D_len (a->type, i2d_ASN1_OBJECT); | ||
| 70 | |||
| 71 | switch (bagnid) { | ||
| 72 | |||
| 73 | case NID_keyBag: | ||
| 74 | M_ASN1_I2D_len_EXP_opt (a->value.keybag, | ||
| 75 | i2d_PKCS8_PRIV_KEY_INFO, 0, v); | ||
| 76 | break; | ||
| 77 | |||
| 78 | case NID_pkcs8ShroudedKeyBag: | ||
| 79 | M_ASN1_I2D_len_EXP_opt (a->value.shkeybag, | ||
| 80 | i2d_X509_SIG, 0, v); | ||
| 81 | break; | ||
| 82 | |||
| 83 | case NID_safeContentsBag: | ||
| 84 | M_ASN1_I2D_len_EXP_SEQUENCE_opt_type | ||
| 85 | (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, | ||
| 86 | 0, V_ASN1_SEQUENCE, v); | ||
| 87 | break; | ||
| 88 | |||
| 89 | case NID_certBag: | ||
| 90 | case NID_crlBag: | ||
| 91 | case NID_secretBag: | ||
| 92 | M_ASN1_I2D_len_EXP_opt (a->value.bag, | ||
| 93 | i2d_PKCS12_BAGS, 0, v); | ||
| 94 | break; | ||
| 95 | |||
| 96 | default: | ||
| 97 | M_ASN1_I2D_len_EXP_opt (a->value.other, | ||
| 98 | i2d_ASN1_TYPE, 0, v); | ||
| 99 | break; | ||
| 100 | } | ||
| 101 | |||
| 102 | M_ASN1_I2D_len_SET_type (X509_ATTRIBUTE,a->attrib, i2d_X509_ATTRIBUTE); | ||
| 103 | |||
| 104 | M_ASN1_I2D_seq_total (); | ||
| 105 | |||
| 106 | M_ASN1_I2D_put (a->type, i2d_ASN1_OBJECT); | ||
| 107 | |||
| 108 | switch (bagnid) { | ||
| 109 | |||
| 110 | case NID_keyBag: | ||
| 111 | M_ASN1_I2D_put_EXP_opt (a->value.keybag, | ||
| 112 | i2d_PKCS8_PRIV_KEY_INFO, 0, v); | ||
| 113 | break; | ||
| 114 | |||
| 115 | case NID_pkcs8ShroudedKeyBag: | ||
| 116 | M_ASN1_I2D_put_EXP_opt (a->value.shkeybag, | ||
| 117 | i2d_X509_SIG, 0, v); | ||
| 118 | break; | ||
| 119 | |||
| 120 | case NID_safeContentsBag: | ||
| 121 | M_ASN1_I2D_put_EXP_SEQUENCE_opt_type | ||
| 122 | (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, | ||
| 123 | 0, V_ASN1_SEQUENCE, v); | ||
| 124 | break; | ||
| 125 | |||
| 126 | case NID_certBag: | ||
| 127 | case NID_crlBag: | ||
| 128 | case NID_secretBag: | ||
| 129 | M_ASN1_I2D_put_EXP_opt (a->value.bag, | ||
| 130 | i2d_PKCS12_BAGS, 0, v); | ||
| 131 | break; | ||
| 132 | |||
| 133 | default: | ||
| 134 | M_ASN1_I2D_put_EXP_opt (a->value.other, | ||
| 135 | i2d_ASN1_TYPE, 0, v); | ||
| 136 | break; | ||
| 137 | } | ||
| 138 | |||
| 139 | M_ASN1_I2D_put_SET_type (X509_ATTRIBUTE, a->attrib, i2d_X509_ATTRIBUTE); | ||
| 140 | |||
| 141 | M_ASN1_I2D_finish(); | ||
| 142 | } | ||
| 143 | |||
| 144 | PKCS12_SAFEBAG *PKCS12_SAFEBAG_new(void) | ||
| 145 | { | ||
| 146 | PKCS12_SAFEBAG *ret=NULL; | ||
| 147 | ASN1_CTX c; | ||
| 148 | M_ASN1_New_Malloc(ret, PKCS12_SAFEBAG); | ||
| 149 | ret->type=NULL; | ||
| 150 | ret->value.other=NULL; | ||
| 151 | M_ASN1_New(ret->attrib, sk_X509_ATTRIBUTE_new_null); | ||
| 152 | ret->rest=NULL; | ||
| 153 | return (ret); | ||
| 154 | M_ASN1_New_Error(ASN1_F_PKCS12_SAFEBAG_NEW); | ||
| 155 | } | ||
| 156 | |||
| 157 | PKCS12_SAFEBAG *d2i_PKCS12_SAFEBAG(PKCS12_SAFEBAG **a, unsigned char **pp, | ||
| 158 | long length) | ||
| 159 | { | ||
| 160 | int bagnid; | ||
| 161 | M_ASN1_D2I_vars(a,PKCS12_SAFEBAG *,PKCS12_SAFEBAG_new); | ||
| 162 | M_ASN1_D2I_Init(); | ||
| 163 | M_ASN1_D2I_start_sequence(); | ||
| 164 | M_ASN1_D2I_get (ret->type, d2i_ASN1_OBJECT); | ||
| 165 | bagnid = OBJ_obj2nid (ret->type); | ||
| 166 | |||
| 167 | switch (bagnid) { | ||
| 168 | |||
| 169 | case NID_keyBag: | ||
| 170 | M_ASN1_D2I_get_EXP_opt (ret->value.keybag, | ||
| 171 | d2i_PKCS8_PRIV_KEY_INFO, 0); | ||
| 172 | break; | ||
| 173 | |||
| 174 | case NID_pkcs8ShroudedKeyBag: | ||
| 175 | M_ASN1_D2I_get_EXP_opt (ret->value.shkeybag, | ||
| 176 | d2i_X509_SIG, 0); | ||
| 177 | break; | ||
| 178 | |||
| 179 | case NID_safeContentsBag: | ||
| 180 | M_ASN1_D2I_get_EXP_set_opt_type | ||
| 181 | (PKCS12_SAFEBAG, ret->value.safes, | ||
| 182 | d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, 0, | ||
| 183 | V_ASN1_SEQUENCE); | ||
| 184 | break; | ||
| 185 | |||
| 186 | case NID_certBag: | ||
| 187 | case NID_crlBag: | ||
| 188 | case NID_secretBag: | ||
| 189 | M_ASN1_D2I_get_EXP_opt (ret->value.bag, | ||
| 190 | d2i_PKCS12_BAGS, 0); | ||
| 191 | break; | ||
| 192 | |||
| 193 | default: | ||
| 194 | M_ASN1_D2I_get_EXP_opt (ret->value.other, | ||
| 195 | d2i_ASN1_TYPE, 0); | ||
| 196 | break; | ||
| 197 | } | ||
| 198 | M_ASN1_D2I_get_set_opt_type(X509_ATTRIBUTE,ret->attrib, | ||
| 199 | d2i_X509_ATTRIBUTE,X509_ATTRIBUTE_free); | ||
| 200 | M_ASN1_D2I_Finish(a, PKCS12_SAFEBAG_free, ASN1_F_D2I_PKCS12_SAFEBAG); | ||
| 201 | } | ||
| 202 | |||
| 203 | void PKCS12_SAFEBAG_free (PKCS12_SAFEBAG *a) | ||
| 204 | { | ||
| 205 | if (a == NULL) return; | ||
| 206 | switch (OBJ_obj2nid(a->type)) { | ||
| 207 | |||
| 208 | case NID_keyBag: | ||
| 209 | PKCS8_PRIV_KEY_INFO_free (a->value.keybag); | ||
| 210 | break; | ||
| 211 | |||
| 212 | case NID_pkcs8ShroudedKeyBag: | ||
| 213 | X509_SIG_free (a->value.shkeybag); | ||
| 214 | break; | ||
| 215 | |||
| 216 | case NID_certBag: | ||
| 217 | case NID_crlBag: | ||
| 218 | case NID_secretBag: | ||
| 219 | PKCS12_BAGS_free (a->value.bag); | ||
| 220 | break; | ||
| 221 | |||
| 222 | default: | ||
| 223 | ASN1_TYPE_free (a->value.other); | ||
| 224 | break; | ||
| 225 | } | ||
| 226 | |||
| 227 | ASN1_OBJECT_free (a->type); | ||
| 228 | sk_X509_ATTRIBUTE_pop_free (a->attrib, X509_ATTRIBUTE_free); | ||
| 229 | OPENSSL_free (a); | ||
| 230 | } | ||
| 231 | |||
| 232 | IMPLEMENT_STACK_OF(PKCS12_SAFEBAG) | ||
| 233 | IMPLEMENT_ASN1_SET_OF(PKCS12_SAFEBAG) | ||
| 234 | IMPLEMENT_PKCS12_STACK_OF(PKCS12_SAFEBAG) | ||
diff --git a/src/lib/libcrypto/rand/md_rand_munged.c b/src/lib/libcrypto/rand/md_rand_munged.c deleted file mode 100644 index 1611bf335b..0000000000 --- a/src/lib/libcrypto/rand/md_rand_munged.c +++ /dev/null | |||
| @@ -1,515 +0,0 @@ | |||
| 1 | /* crypto/rand/md_rand.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <sys/types.h> | ||
| 61 | #include <fcntl.h> | ||
| 62 | #include <time.h> | ||
| 63 | #include <string.h> | ||
| 64 | |||
| 65 | #include "openssl/e_os.h" | ||
| 66 | |||
| 67 | #include <openssl/crypto.h> | ||
| 68 | |||
| 69 | #if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND) | ||
| 70 | #if !defined(NO_SHA) && !defined(NO_SHA1) | ||
| 71 | #define USE_SHA1_RAND | ||
| 72 | #elif !defined(NO_MD5) | ||
| 73 | #define USE_MD5_RAND | ||
| 74 | #elif !defined(NO_MDC2) && !defined(NO_DES) | ||
| 75 | #define USE_MDC2_RAND | ||
| 76 | #elif !defined(NO_MD2) | ||
| 77 | #define USE_MD2_RAND | ||
| 78 | #else | ||
| 79 | #error No message digest algorithm available | ||
| 80 | #endif | ||
| 81 | #endif | ||
| 82 | |||
| 83 | /* Changed how the state buffer used. I now attempt to 'wrap' such | ||
| 84 | * that I don't run over the same locations the next time go through | ||
| 85 | * the 1023 bytes - many thanks to | ||
| 86 | * Robert J. LeBlanc <rjl@renaissoft.com> for his comments | ||
| 87 | */ | ||
| 88 | |||
| 89 | #if defined(USE_MD5_RAND) | ||
| 90 | #include <openssl/md5.h> | ||
| 91 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | ||
| 92 | #define MD_CTX MD5_CTX | ||
| 93 | #define MD_Init(a) MD5_Init(a) | ||
| 94 | #define MD_Update(a,b,c) MD5_Update(a,b,c) | ||
| 95 | #define MD_Final(a,b) MD5_Final(a,b) | ||
| 96 | #define MD(a,b,c) MD5(a,b,c) | ||
| 97 | #elif defined(USE_SHA1_RAND) | ||
| 98 | #include <openssl/sha.h> | ||
| 99 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | ||
| 100 | #define MD_CTX SHA_CTX | ||
| 101 | #define MD_Init(a) SHA1_Init(a) | ||
| 102 | #define MD_Update(a,b,c) SHA1_Update(a,b,c) | ||
| 103 | #define MD_Final(a,b) SHA1_Final(a,b) | ||
| 104 | #define MD(a,b,c) SHA1(a,b,c) | ||
| 105 | #elif defined(USE_MDC2_RAND) | ||
| 106 | #include <openssl/mdc2.h> | ||
| 107 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | ||
| 108 | #define MD_CTX MDC2_CTX | ||
| 109 | #define MD_Init(a) MDC2_Init(a) | ||
| 110 | #define MD_Update(a,b,c) MDC2_Update(a,b,c) | ||
| 111 | #define MD_Final(a,b) MDC2_Final(a,b) | ||
| 112 | #define MD(a,b,c) MDC2(a,b,c) | ||
| 113 | #elif defined(USE_MD2_RAND) | ||
| 114 | #include <openssl/md2.h> | ||
| 115 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | ||
| 116 | #define MD_CTX MD2_CTX | ||
| 117 | #define MD_Init(a) MD2_Init(a) | ||
| 118 | #define MD_Update(a,b,c) MD2_Update(a,b,c) | ||
| 119 | #define MD_Final(a,b) MD2_Final(a,b) | ||
| 120 | #define MD(a,b,c) MD2(a,b,c) | ||
| 121 | #endif | ||
| 122 | |||
| 123 | #include <openssl/rand.h> | ||
| 124 | |||
| 125 | /* #define NORAND 1 */ | ||
| 126 | /* #define PREDICT 1 */ | ||
| 127 | |||
| 128 | #define STATE_SIZE 1023 | ||
| 129 | static int state_num=0,state_index=0; | ||
| 130 | static unsigned char state[STATE_SIZE+MD_DIGEST_LENGTH]; | ||
| 131 | static unsigned char md[MD_DIGEST_LENGTH]; | ||
| 132 | static long md_count[2]={0,0}; | ||
| 133 | static double entropy=0; | ||
| 134 | static int initialized=0; | ||
| 135 | |||
| 136 | const char *RAND_version="RAND" OPENSSL_VERSION_PTEXT; | ||
| 137 | |||
| 138 | static void ssleay_rand_cleanup(void); | ||
| 139 | static void ssleay_rand_seed(const void *buf, int num); | ||
| 140 | static void ssleay_rand_add(const void *buf, int num, double add_entropy); | ||
| 141 | static int ssleay_rand_bytes(unsigned char *buf, int num); | ||
| 142 | static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num); | ||
| 143 | |||
| 144 | RAND_METHOD rand_ssleay_meth={ | ||
| 145 | ssleay_rand_seed, | ||
| 146 | ssleay_rand_bytes, | ||
| 147 | ssleay_rand_cleanup, | ||
| 148 | ssleay_rand_add, | ||
| 149 | ssleay_rand_pseudo_bytes, | ||
| 150 | }; | ||
| 151 | |||
| 152 | RAND_METHOD *RAND_SSLeay(void) | ||
| 153 | { | ||
| 154 | return(&rand_ssleay_meth); | ||
| 155 | } | ||
| 156 | |||
| 157 | static void ssleay_rand_cleanup(void) | ||
| 158 | { | ||
| 159 | memset(state,0,sizeof(state)); | ||
| 160 | state_num=0; | ||
| 161 | state_index=0; | ||
| 162 | memset(md,0,MD_DIGEST_LENGTH); | ||
| 163 | md_count[0]=0; | ||
| 164 | md_count[1]=0; | ||
| 165 | entropy=0; | ||
| 166 | } | ||
| 167 | |||
| 168 | static void ssleay_rand_add(const void *buf, int num, double add) | ||
| 169 | { | ||
| 170 | int i,j,k,st_idx; | ||
| 171 | long md_c[2]; | ||
| 172 | unsigned char local_md[MD_DIGEST_LENGTH]; | ||
| 173 | MD_CTX m; | ||
| 174 | |||
| 175 | #ifdef NORAND | ||
| 176 | return; | ||
| 177 | #endif | ||
| 178 | |||
| 179 | /* | ||
| 180 | * (Based on the rand(3) manpage) | ||
| 181 | * | ||
| 182 | * The input is chopped up into units of 20 bytes (or less for | ||
| 183 | * the last block). Each of these blocks is run through the hash | ||
| 184 | * function as follows: The data passed to the hash function | ||
| 185 | * is the current 'md', the same number of bytes from the 'state' | ||
| 186 | * (the location determined by in incremented looping index) as | ||
| 187 | * the current 'block', the new key data 'block', and 'count' | ||
| 188 | * (which is incremented after each use). | ||
| 189 | * The result of this is kept in 'md' and also xored into the | ||
| 190 | * 'state' at the same locations that were used as input into the | ||
| 191 | * hash function. | ||
| 192 | */ | ||
| 193 | |||
| 194 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 195 | st_idx=state_index; | ||
| 196 | |||
| 197 | /* use our own copies of the counters so that even | ||
| 198 | * if a concurrent thread seeds with exactly the | ||
| 199 | * same data and uses the same subarray there's _some_ | ||
| 200 | * difference */ | ||
| 201 | md_c[0] = md_count[0]; | ||
| 202 | md_c[1] = md_count[1]; | ||
| 203 | |||
| 204 | memcpy(local_md, md, sizeof md); | ||
| 205 | |||
| 206 | /* state_index <= state_num <= STATE_SIZE */ | ||
| 207 | state_index += num; | ||
| 208 | if (state_index >= STATE_SIZE) | ||
| 209 | { | ||
| 210 | state_index%=STATE_SIZE; | ||
| 211 | state_num=STATE_SIZE; | ||
| 212 | } | ||
| 213 | else if (state_num < STATE_SIZE) | ||
| 214 | { | ||
| 215 | if (state_index > state_num) | ||
| 216 | state_num=state_index; | ||
| 217 | } | ||
| 218 | /* state_index <= state_num <= STATE_SIZE */ | ||
| 219 | |||
| 220 | /* state[st_idx], ..., state[(st_idx + num - 1) % STATE_SIZE] | ||
| 221 | * are what we will use now, but other threads may use them | ||
| 222 | * as well */ | ||
| 223 | |||
| 224 | md_count[1] += (num / MD_DIGEST_LENGTH) + (num % MD_DIGEST_LENGTH > 0); | ||
| 225 | |||
| 226 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 227 | |||
| 228 | for (i=0; i<num; i+=MD_DIGEST_LENGTH) | ||
| 229 | { | ||
| 230 | j=(num-i); | ||
| 231 | j=(j > MD_DIGEST_LENGTH)?MD_DIGEST_LENGTH:j; | ||
| 232 | |||
| 233 | MD_Init(&m); | ||
| 234 | MD_Update(&m,local_md,MD_DIGEST_LENGTH); | ||
| 235 | k=(st_idx+j)-STATE_SIZE; | ||
| 236 | if (k > 0) | ||
| 237 | { | ||
| 238 | MD_Update(&m,&(state[st_idx]),j-k); | ||
| 239 | MD_Update(&m,&(state[0]),k); | ||
| 240 | } | ||
| 241 | else | ||
| 242 | MD_Update(&m,&(state[st_idx]),j); | ||
| 243 | |||
| 244 | MD_Update(&m,buf,j); | ||
| 245 | MD_Update(&m,(unsigned char *)&(md_count[0]),sizeof(md_count)); | ||
| 246 | MD_Final(md,&m); | ||
| 247 | md_count[1]++; | ||
| 248 | |||
| 249 | buf=(const char *)buf + j; | ||
| 250 | |||
| 251 | for (k=0; k<j; k++) | ||
| 252 | { | ||
| 253 | state[st_idx++]^=md[k]; | ||
| 254 | if (st_idx >= STATE_SIZE) | ||
| 255 | { | ||
| 256 | st_idx=0; | ||
| 257 | st_num=STATE_SIZE; | ||
| 258 | } | ||
| 259 | } | ||
| 260 | } | ||
| 261 | memset((char *)&m,0,sizeof(m)); | ||
| 262 | } | ||
| 263 | |||
| 264 | static void ssleay_rand_bytes(unsigned char *buf, int num) | ||
| 265 | { | ||
| 266 | int i,j,k,st_num,st_idx; | ||
| 267 | MD_CTX m; | ||
| 268 | static int init=1; | ||
| 269 | unsigned long l; | ||
| 270 | #ifdef DEVRANDOM | ||
| 271 | int fd; | ||
| 272 | #endif | ||
| 273 | |||
| 274 | #ifdef PREDICT | ||
| 275 | { | ||
| 276 | static unsigned char val=0; | ||
| 277 | |||
| 278 | for (i=0; i<num; i++) | ||
| 279 | buf[i]=val++; | ||
| 280 | return; | ||
| 281 | } | ||
| 282 | #endif | ||
| 283 | |||
| 284 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 285 | |||
| 286 | if (init) | ||
| 287 | { | ||
| 288 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 289 | /* put in some default random data, we need more than | ||
| 290 | * just this */ | ||
| 291 | RAND_seed(&m,sizeof(m)); | ||
| 292 | #ifndef MSDOS | ||
| 293 | l=getpid(); | ||
| 294 | RAND_seed(&l,sizeof(l)); | ||
| 295 | l=getuid(); | ||
| 296 | RAND_seed(&l,sizeof(l)); | ||
| 297 | #endif | ||
| 298 | l=time(NULL); | ||
| 299 | RAND_seed(&l,sizeof(l)); | ||
| 300 | |||
| 301 | /* #ifdef DEVRANDOM */ | ||
| 302 | /* | ||
| 303 | * Use a random entropy pool device. | ||
| 304 | * Linux 1.3.x, OpenBSD, and FreeBSD have | ||
| 305 | * this. Use /dev/urandom if you can | ||
| 306 | * as /dev/random will block if it runs out | ||
| 307 | * of random entries. | ||
| 308 | */ | ||
| 309 | if ((fd = open(DEVRANDOM, O_RDONLY)) != NULL) | ||
| 310 | { | ||
| 311 | unsigned char tmpbuf[32]; | ||
| 312 | |||
| 313 | read(fd, tmpbuf, sizeof(tmpbuf)); | ||
| 314 | /* we don't care how many bytes we read, | ||
| 315 | * we will just copy the 'stack' if there is | ||
| 316 | * nothing else :-) */ | ||
| 317 | /* the above comment is EVIL. Security software | ||
| 318 | * RELIES ON THESE PRIMITIVES HAVING MORE SECURE | ||
| 319 | * BEHAVIOUR! Secure entropy is required in | ||
| 320 | * many cases! */ | ||
| 321 | RAND_seed(tmpbuf,32); | ||
| 322 | memset(tmpbuf,0,32); | ||
| 323 | } | ||
| 324 | /* #endif */ | ||
| 325 | #ifdef PURIFY | ||
| 326 | memset(state,0,STATE_SIZE); | ||
| 327 | memset(md,0,MD_DIGEST_LENGTH); | ||
| 328 | #endif | ||
| 329 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 330 | init=0; | ||
| 331 | } | ||
| 332 | |||
| 333 | st_idx=state_index; | ||
| 334 | st_num=state_num; | ||
| 335 | state_index+=num; | ||
| 336 | if (state_index > state_num) | ||
| 337 | state_index=(state_index%state_num); | ||
| 338 | |||
| 339 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 340 | |||
| 341 | while (num > 0) | ||
| 342 | { | ||
| 343 | j=(num >= MD_DIGEST_LENGTH/2)?MD_DIGEST_LENGTH/2:num; | ||
| 344 | num-=j; | ||
| 345 | MD_Init(&m); | ||
| 346 | #ifndef GETPID_IS_MEANINGLESS | ||
| 347 | if (curr_pid) /* just in the first iteration to save time */ | ||
| 348 | { | ||
| 349 | MD_Update(&m,(unsigned char*)&curr_pid,sizeof curr_pid); | ||
| 350 | curr_pid = 0; | ||
| 351 | } | ||
| 352 | #endif | ||
| 353 | MD_Update(&m,&(local_md[MD_DIGEST_LENGTH/2]),MD_DIGEST_LENGTH/2); | ||
| 354 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); | ||
| 355 | #ifndef PURIFY | ||
| 356 | MD_Update(&m,buf,j); /* purify complains */ | ||
| 357 | #endif | ||
| 358 | k=(st_idx+j)-st_num; | ||
| 359 | if (k > 0) | ||
| 360 | { | ||
| 361 | MD_Update(&m,&(state[st_idx]),j-k); | ||
| 362 | MD_Update(&m,&(state[0]),k); | ||
| 363 | } | ||
| 364 | else | ||
| 365 | MD_Update(&m,&(state[st_idx]),j); | ||
| 366 | MD_Final(local_md,&m); | ||
| 367 | |||
| 368 | for (i=0; i<j; i++) | ||
| 369 | { | ||
| 370 | state[st_idx++]^=local_md[i]; /* may compete with other threads */ | ||
| 371 | *(buf++)=local_md[i+MD_DIGEST_LENGTH/2]; | ||
| 372 | if (st_idx >= st_num) | ||
| 373 | st_idx=0; | ||
| 374 | } | ||
| 375 | } | ||
| 376 | |||
| 377 | MD_Init(&m); | ||
| 378 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); | ||
| 379 | MD_Update(&m,local_md,MD_DIGEST_LENGTH); | ||
| 380 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 381 | MD_Update(&m,md,MD_DIGEST_LENGTH); | ||
| 382 | MD_Final(md,&m); | ||
| 383 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 384 | |||
| 385 | memset(&m,0,sizeof(m)); | ||
| 386 | if (ok) | ||
| 387 | return(1); | ||
| 388 | else | ||
| 389 | { | ||
| 390 | RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED); | ||
| 391 | return(0); | ||
| 392 | } | ||
| 393 | } | ||
| 394 | |||
| 395 | /* pseudo-random bytes that are guaranteed to be unique but not | ||
| 396 | unpredictable */ | ||
| 397 | static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) | ||
| 398 | { | ||
| 399 | int ret, err; | ||
| 400 | |||
| 401 | ret = RAND_bytes(buf, num); | ||
| 402 | if (ret == 0) | ||
| 403 | { | ||
| 404 | err = ERR_peek_error(); | ||
| 405 | if (ERR_GET_LIB(err) == ERR_LIB_RAND && | ||
| 406 | ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED) | ||
| 407 | (void)ERR_get_error(); | ||
| 408 | } | ||
| 409 | return (ret); | ||
| 410 | } | ||
| 411 | |||
| 412 | int RAND_status(void) | ||
| 413 | { | ||
| 414 | if (!initialized) | ||
| 415 | ssleay_rand_initialize(); | ||
| 416 | return (entropy >= ENTROPY_NEEDED); | ||
| 417 | } | ||
| 418 | |||
| 419 | #ifdef WINDOWS | ||
| 420 | #include <windows.h> | ||
| 421 | #include <openssl/rand.h> | ||
| 422 | |||
| 423 | /***************************************************************************** | ||
| 424 | * Initialisation function for the SSL random generator. Takes the contents | ||
| 425 | * of the screen as random seed. | ||
| 426 | * | ||
| 427 | * Created 960901 by Gertjan van Oosten, gertjan@West.NL, West Consulting B.V. | ||
| 428 | * | ||
| 429 | * Code adapted from | ||
| 430 | * <URL:http://www.microsoft.com/kb/developr/win_dk/q97193.htm>; | ||
| 431 | * the original copyright message is: | ||
| 432 | * | ||
| 433 | * (C) Copyright Microsoft Corp. 1993. All rights reserved. | ||
| 434 | * | ||
| 435 | * You have a royalty-free right to use, modify, reproduce and | ||
| 436 | * distribute the Sample Files (and/or any modified version) in | ||
| 437 | * any way you find useful, provided that you agree that | ||
| 438 | * Microsoft has no warranty obligations or liability for any | ||
| 439 | * Sample Application Files which are modified. | ||
| 440 | */ | ||
| 441 | /* | ||
| 442 | * I have modified the loading of bytes via RAND_seed() mechanism since | ||
| 443 | * the original would have been very very CPU intensive since RAND_seed() | ||
| 444 | * does an MD5 per 16 bytes of input. The cost to digest 16 bytes is the same | ||
| 445 | * as that to digest 56 bytes. So under the old system, a screen of | ||
| 446 | * 1024*768*256 would have been CPU cost of approximately 49,000 56 byte MD5 | ||
| 447 | * digests or digesting 2.7 mbytes. What I have put in place would | ||
| 448 | * be 48 16k MD5 digests, or effectively 48*16+48 MD5 bytes or 816 kbytes | ||
| 449 | * or about 3.5 times as much. | ||
| 450 | * - eric | ||
| 451 | */ | ||
| 452 | void RAND_screen(void) | ||
| 453 | { | ||
| 454 | HDC hScrDC; /* screen DC */ | ||
| 455 | HDC hMemDC; /* memory DC */ | ||
| 456 | HBITMAP hBitmap; /* handle for our bitmap */ | ||
| 457 | HBITMAP hOldBitmap; /* handle for previous bitmap */ | ||
| 458 | BITMAP bm; /* bitmap properties */ | ||
| 459 | unsigned int size; /* size of bitmap */ | ||
| 460 | char *bmbits; /* contents of bitmap */ | ||
| 461 | int w; /* screen width */ | ||
| 462 | int h; /* screen height */ | ||
| 463 | int y; /* y-coordinate of screen lines to grab */ | ||
| 464 | int n = 16; /* number of screen lines to grab at a time */ | ||
| 465 | |||
| 466 | /* Create a screen DC and a memory DC compatible to screen DC */ | ||
| 467 | hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); | ||
| 468 | hMemDC = CreateCompatibleDC(hScrDC); | ||
| 469 | |||
| 470 | /* Get screen resolution */ | ||
| 471 | w = GetDeviceCaps(hScrDC, HORZRES); | ||
| 472 | h = GetDeviceCaps(hScrDC, VERTRES); | ||
| 473 | |||
| 474 | /* Create a bitmap compatible with the screen DC */ | ||
| 475 | hBitmap = CreateCompatibleBitmap(hScrDC, w, n); | ||
| 476 | |||
| 477 | /* Select new bitmap into memory DC */ | ||
| 478 | hOldBitmap = SelectObject(hMemDC, hBitmap); | ||
| 479 | |||
| 480 | /* Get bitmap properties */ | ||
| 481 | GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm); | ||
| 482 | size = (unsigned int)bm.bmWidthBytes * bm.bmHeight * bm.bmPlanes; | ||
| 483 | |||
| 484 | bmbits = Malloc(size); | ||
| 485 | if (bmbits) { | ||
| 486 | /* Now go through the whole screen, repeatedly grabbing n lines */ | ||
| 487 | for (y = 0; y < h-n; y += n) | ||
| 488 | { | ||
| 489 | unsigned char md[MD_DIGEST_LENGTH]; | ||
| 490 | |||
| 491 | /* Bitblt screen DC to memory DC */ | ||
| 492 | BitBlt(hMemDC, 0, 0, w, n, hScrDC, 0, y, SRCCOPY); | ||
| 493 | |||
| 494 | /* Copy bitmap bits from memory DC to bmbits */ | ||
| 495 | GetBitmapBits(hBitmap, size, bmbits); | ||
| 496 | |||
| 497 | /* Get the MD5 of the bitmap */ | ||
| 498 | MD(bmbits,size,md); | ||
| 499 | |||
| 500 | /* Seed the random generator with the MD5 digest */ | ||
| 501 | RAND_seed(md, MD_DIGEST_LENGTH); | ||
| 502 | } | ||
| 503 | |||
| 504 | Free(bmbits); | ||
| 505 | } | ||
| 506 | |||
| 507 | /* Select old bitmap back into memory DC */ | ||
| 508 | hBitmap = SelectObject(hMemDC, hOldBitmap); | ||
| 509 | |||
| 510 | /* Clean up */ | ||
| 511 | DeleteObject(hBitmap); | ||
| 512 | DeleteDC(hMemDC); | ||
| 513 | DeleteDC(hScrDC); | ||
| 514 | } | ||
| 515 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_bmp.c b/src/lib/libssl/src/crypto/asn1/a_bmp.c deleted file mode 100644 index d9ac5a0475..0000000000 --- a/src/lib/libssl/src/crypto/asn1/a_bmp.c +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | /* crypto/asn1/a_bmp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1.h> | ||
| 62 | |||
| 63 | ASN1_BMPSTRING *ASN1_BMPSTRING_new(void) | ||
| 64 | { return M_ASN1_BMPSTRING_new(); } | ||
| 65 | |||
| 66 | void ASN1_BMPSTRING_free(ASN1_BMPSTRING *x) | ||
| 67 | { M_ASN1_BMPSTRING_free(x); } | ||
| 68 | |||
| 69 | int i2d_ASN1_BMPSTRING(ASN1_BMPSTRING *a, unsigned char **pp) | ||
| 70 | { | ||
| 71 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | ||
| 72 | V_ASN1_BMPSTRING,V_ASN1_UNIVERSAL)); | ||
| 73 | } | ||
| 74 | |||
| 75 | ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(ASN1_BMPSTRING **a, unsigned char **pp, | ||
| 76 | long length) | ||
| 77 | { | ||
| 78 | ASN1_BMPSTRING *ret=NULL; | ||
| 79 | |||
| 80 | ret=(ASN1_BMPSTRING *)d2i_ASN1_bytes((ASN1_STRING **)a, | ||
| 81 | pp,length,V_ASN1_BMPSTRING,V_ASN1_UNIVERSAL); | ||
| 82 | if (ret == NULL) | ||
| 83 | { | ||
| 84 | ASN1err(ASN1_F_D2I_ASN1_BMPSTRING,ERR_R_NESTED_ASN1_ERROR); | ||
| 85 | return(NULL); | ||
| 86 | } | ||
| 87 | return(ret); | ||
| 88 | } | ||
| 89 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/a_null.c b/src/lib/libssl/src/crypto/asn1/a_null.c deleted file mode 100644 index 119fd784be..0000000000 --- a/src/lib/libssl/src/crypto/asn1/a_null.c +++ /dev/null | |||
| @@ -1,119 +0,0 @@ | |||
| 1 | /* a_null.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1.h> | ||
| 62 | |||
| 63 | /* ASN1 functions for NULL type. For compatibility with other ASN1 code | ||
| 64 | * it returns a pointer to an "ASN1_NULL" structure. The new/free functions | ||
| 65 | * don't need to do any allocating because nothing is stored in a NULL. | ||
| 66 | */ | ||
| 67 | |||
| 68 | int i2d_ASN1_NULL(ASN1_NULL *a, unsigned char **pp) | ||
| 69 | { | ||
| 70 | if(!a) return 0; | ||
| 71 | if (pp) ASN1_put_object(pp,0,0,V_ASN1_NULL,V_ASN1_UNIVERSAL); | ||
| 72 | return 2; | ||
| 73 | } | ||
| 74 | |||
| 75 | ASN1_NULL *d2i_ASN1_NULL(ASN1_NULL **a, unsigned char **pp, long length) | ||
| 76 | { | ||
| 77 | ASN1_NULL *ret = NULL; | ||
| 78 | unsigned char *p; | ||
| 79 | long len; | ||
| 80 | int inf,tag,xclass; | ||
| 81 | int i=0; | ||
| 82 | |||
| 83 | p= *pp; | ||
| 84 | inf=ASN1_get_object(&p,&len,&tag,&xclass,length); | ||
| 85 | if (inf & 0x80) | ||
| 86 | { | ||
| 87 | i=ASN1_R_BAD_OBJECT_HEADER; | ||
| 88 | goto err; | ||
| 89 | } | ||
| 90 | |||
| 91 | if (tag != V_ASN1_NULL) | ||
| 92 | { | ||
| 93 | i=ASN1_R_EXPECTING_A_NULL; | ||
| 94 | goto err; | ||
| 95 | } | ||
| 96 | |||
| 97 | if (len != 0) | ||
| 98 | { | ||
| 99 | i=ASN1_R_NULL_IS_WRONG_LENGTH; | ||
| 100 | goto err; | ||
| 101 | } | ||
| 102 | ret=(ASN1_NULL *)1; | ||
| 103 | if (a != NULL) (*a)=ret; | ||
| 104 | *pp=p; | ||
| 105 | return(ret); | ||
| 106 | err: | ||
| 107 | ASN1err(ASN1_F_D2I_ASN1_NULL,i); | ||
| 108 | return(ret); | ||
| 109 | } | ||
| 110 | |||
| 111 | ASN1_NULL *ASN1_NULL_new(void) | ||
| 112 | { | ||
| 113 | return (ASN1_NULL *)1; | ||
| 114 | } | ||
| 115 | |||
| 116 | void ASN1_NULL_free(ASN1_NULL *a) | ||
| 117 | { | ||
| 118 | return; | ||
| 119 | } | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_vis.c b/src/lib/libssl/src/crypto/asn1/a_vis.c deleted file mode 100644 index 5cfc080bec..0000000000 --- a/src/lib/libssl/src/crypto/asn1/a_vis.c +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | /* crypto/asn1/a_vis.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1.h> | ||
| 62 | |||
| 63 | ASN1_VISIBLESTRING *ASN1_VISIBLESTRING_new(void) | ||
| 64 | { return M_ASN1_VISIBLESTRING_new(); } | ||
| 65 | |||
| 66 | void ASN1_VISIBLESTRING_free(ASN1_VISIBLESTRING *x) | ||
| 67 | { M_ASN1_VISIBLESTRING_free(x); } | ||
| 68 | |||
| 69 | int i2d_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING *a, unsigned char **pp) | ||
| 70 | { | ||
| 71 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | ||
| 72 | V_ASN1_VISIBLESTRING,V_ASN1_UNIVERSAL)); | ||
| 73 | } | ||
| 74 | |||
| 75 | ASN1_VISIBLESTRING *d2i_ASN1_VISIBLESTRING(ASN1_VISIBLESTRING **a, | ||
| 76 | unsigned char **pp, long length) | ||
| 77 | { | ||
| 78 | ASN1_VISIBLESTRING *ret=NULL; | ||
| 79 | |||
| 80 | ret=(ASN1_VISIBLESTRING *)d2i_ASN1_bytes((ASN1_STRING **)a, | ||
| 81 | pp,length,V_ASN1_VISIBLESTRING,V_ASN1_UNIVERSAL); | ||
| 82 | if (ret == NULL) | ||
| 83 | { | ||
| 84 | ASN1err(ASN1_F_D2I_ASN1_VISIBLESTRING,ERR_R_NESTED_ASN1_ERROR); | ||
| 85 | return(NULL); | ||
| 86 | } | ||
| 87 | return(ret); | ||
| 88 | } | ||
| 89 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_dhp.c b/src/lib/libssl/src/crypto/asn1/d2i_dhp.c deleted file mode 100644 index 635ae829db..0000000000 --- a/src/lib/libssl/src/crypto/asn1/d2i_dhp.c +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_dhp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DH | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dh.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | DH *d2i_DHparams(DH **a, unsigned char **pp, long length) | ||
| 68 | { | ||
| 69 | int i=ERR_R_NESTED_ASN1_ERROR; | ||
| 70 | ASN1_INTEGER *bs=NULL; | ||
| 71 | long v=0; | ||
| 72 | M_ASN1_D2I_vars(a,DH *,DH_new); | ||
| 73 | |||
| 74 | M_ASN1_D2I_Init(); | ||
| 75 | M_ASN1_D2I_start_sequence(); | ||
| 76 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 77 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 78 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 79 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 80 | |||
| 81 | if (!M_ASN1_D2I_end_sequence()) | ||
| 82 | { | ||
| 83 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 84 | for (i=0; i<bs->length; i++) | ||
| 85 | v=(v<<8)|(bs->data[i]); | ||
| 86 | ret->length=(int)v; | ||
| 87 | } | ||
| 88 | |||
| 89 | M_ASN1_BIT_STRING_free(bs); | ||
| 90 | |||
| 91 | M_ASN1_D2I_Finish_2(a); | ||
| 92 | |||
| 93 | err_bn: | ||
| 94 | i=ERR_R_BN_LIB; | ||
| 95 | err: | ||
| 96 | ASN1err(ASN1_F_D2I_DHPARAMS,i); | ||
| 97 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DH_free(ret); | ||
| 98 | if (bs != NULL) M_ASN1_BIT_STRING_free(bs); | ||
| 99 | return(NULL); | ||
| 100 | } | ||
| 101 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_dsap.c b/src/lib/libssl/src/crypto/asn1/d2i_dsap.c deleted file mode 100644 index 9d4dea6145..0000000000 --- a/src/lib/libssl/src/crypto/asn1/d2i_dsap.c +++ /dev/null | |||
| @@ -1,98 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_dsap.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | #ifndef NO_NEG_PUBKEY_BUG | ||
| 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | ||
| 69 | #endif | ||
| 70 | |||
| 71 | DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length) | ||
| 72 | { | ||
| 73 | int i=ERR_R_NESTED_ASN1_ERROR; | ||
| 74 | ASN1_INTEGER *bs=NULL; | ||
| 75 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 76 | |||
| 77 | M_ASN1_D2I_Init(); | ||
| 78 | M_ASN1_D2I_start_sequence(); | ||
| 79 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 80 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 81 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 82 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 83 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 84 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 85 | |||
| 86 | M_ASN1_BIT_STRING_free(bs); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Finish_2(a); | ||
| 89 | |||
| 90 | err_bn: | ||
| 91 | i=ERR_R_BN_LIB; | ||
| 92 | err: | ||
| 93 | ASN1err(ASN1_F_D2I_DSAPARAMS,i); | ||
| 94 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 95 | if (bs != NULL) M_ASN1_BIT_STRING_free(bs); | ||
| 96 | return(NULL); | ||
| 97 | } | ||
| 98 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_r_pr.c b/src/lib/libssl/src/crypto/asn1/d2i_r_pr.c deleted file mode 100644 index 6c8a45f821..0000000000 --- a/src/lib/libssl/src/crypto/asn1/d2i_r_pr.c +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_r_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | static ASN1_METHOD method={ | ||
| 68 | (int (*)()) i2d_RSAPrivateKey, | ||
| 69 | (char *(*)())d2i_RSAPrivateKey, | ||
| 70 | (char *(*)())RSA_new, | ||
| 71 | (void (*)()) RSA_free}; | ||
| 72 | |||
| 73 | ASN1_METHOD *RSAPrivateKey_asn1_meth(void) | ||
| 74 | { | ||
| 75 | return(&method); | ||
| 76 | } | ||
| 77 | |||
| 78 | RSA *d2i_RSAPrivateKey(RSA **a, unsigned char **pp, long length) | ||
| 79 | { | ||
| 80 | int i=ASN1_R_PARSING; | ||
| 81 | ASN1_INTEGER *bs=NULL; | ||
| 82 | M_ASN1_D2I_vars(a,RSA *,RSA_new); | ||
| 83 | |||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 87 | if (bs->length == 0) | ||
| 88 | ret->version=0; | ||
| 89 | else ret->version=bs->data[0]; | ||
| 90 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 91 | if ((ret->n=BN_bin2bn(bs->data,bs->length,ret->n)) == NULL) goto err_bn; | ||
| 92 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 93 | if ((ret->e=BN_bin2bn(bs->data,bs->length,ret->e)) == NULL) goto err_bn; | ||
| 94 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 95 | if ((ret->d=BN_bin2bn(bs->data,bs->length,ret->d)) == NULL) goto err_bn; | ||
| 96 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 97 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 98 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 99 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 100 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 101 | if ((ret->dmp1=BN_bin2bn(bs->data,bs->length,ret->dmp1)) == NULL) | ||
| 102 | goto err_bn; | ||
| 103 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 104 | if ((ret->dmq1=BN_bin2bn(bs->data,bs->length,ret->dmq1)) == NULL) | ||
| 105 | goto err_bn; | ||
| 106 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 107 | if ((ret->iqmp=BN_bin2bn(bs->data,bs->length,ret->iqmp)) == NULL) | ||
| 108 | goto err_bn; | ||
| 109 | |||
| 110 | M_ASN1_INTEGER_free(bs); | ||
| 111 | |||
| 112 | M_ASN1_D2I_Finish_2(a); | ||
| 113 | err_bn: | ||
| 114 | i=ERR_R_BN_LIB; | ||
| 115 | err: | ||
| 116 | ASN1err(ASN1_F_D2I_RSAPRIVATEKEY,i); | ||
| 117 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) RSA_free(ret); | ||
| 118 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 119 | |||
| 120 | return(NULL); | ||
| 121 | } | ||
| 122 | #else /* !NO_RSA */ | ||
| 123 | |||
| 124 | # if PEDANTIC | ||
| 125 | static void *dummy=&dummy; | ||
| 126 | # endif | ||
| 127 | |||
| 128 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c deleted file mode 100644 index 9e5d41cf53..0000000000 --- a/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c +++ /dev/null | |||
| @@ -1,103 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_r_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | #ifndef NO_NEG_PUBKEY_BUG | ||
| 68 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | ||
| 69 | #endif | ||
| 70 | |||
| 71 | RSA *d2i_RSAPublicKey(RSA **a, unsigned char **pp, long length) | ||
| 72 | { | ||
| 73 | int i=ASN1_R_PARSING; | ||
| 74 | ASN1_INTEGER *bs=NULL; | ||
| 75 | M_ASN1_D2I_vars(a,RSA *,RSA_new); | ||
| 76 | |||
| 77 | M_ASN1_D2I_Init(); | ||
| 78 | M_ASN1_D2I_start_sequence(); | ||
| 79 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 80 | if ((ret->n=BN_bin2bn(bs->data,bs->length,ret->n)) == NULL) goto err_bn; | ||
| 81 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 82 | if ((ret->e=BN_bin2bn(bs->data,bs->length,ret->e)) == NULL) goto err_bn; | ||
| 83 | |||
| 84 | M_ASN1_INTEGER_free(bs); | ||
| 85 | bs=NULL; | ||
| 86 | |||
| 87 | M_ASN1_D2I_Finish_2(a); | ||
| 88 | |||
| 89 | err_bn: | ||
| 90 | i=ERR_R_BN_LIB; | ||
| 91 | err: | ||
| 92 | ASN1err(ASN1_F_D2I_RSAPUBLICKEY,i); | ||
| 93 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) RSA_free(ret); | ||
| 94 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 95 | return(NULL); | ||
| 96 | } | ||
| 97 | #else /* !NO_RSA */ | ||
| 98 | |||
| 99 | # if PEDANTIC | ||
| 100 | static void *dummy=&dummy; | ||
| 101 | # endif | ||
| 102 | |||
| 103 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c b/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c deleted file mode 100644 index 55d5802d70..0000000000 --- a/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c +++ /dev/null | |||
| @@ -1,106 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_s_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ | ||
| 60 | |||
| 61 | #ifndef NO_DSA | ||
| 62 | #include <stdio.h> | ||
| 63 | #include "cryptlib.h" | ||
| 64 | #include <openssl/bn.h> | ||
| 65 | #include <openssl/dsa.h> | ||
| 66 | #include <openssl/objects.h> | ||
| 67 | #include <openssl/asn1_mac.h> | ||
| 68 | |||
| 69 | DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length) | ||
| 70 | { | ||
| 71 | int i=ASN1_R_PARSING; | ||
| 72 | ASN1_INTEGER *bs=NULL; | ||
| 73 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 74 | |||
| 75 | M_ASN1_D2I_Init(); | ||
| 76 | M_ASN1_D2I_start_sequence(); | ||
| 77 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 78 | if (bs->length == 0) | ||
| 79 | ret->version=0; | ||
| 80 | else ret->version=bs->data[0]; | ||
| 81 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 82 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 83 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 84 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 85 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 86 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 87 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 88 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 89 | == NULL) goto err_bn; | ||
| 90 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 91 | if ((ret->priv_key=BN_bin2bn(bs->data,bs->length,ret->priv_key)) | ||
| 92 | == NULL) goto err_bn; | ||
| 93 | |||
| 94 | M_ASN1_INTEGER_free(bs); | ||
| 95 | bs = NULL; | ||
| 96 | |||
| 97 | M_ASN1_D2I_Finish_2(a); | ||
| 98 | err_bn: | ||
| 99 | i=ERR_R_BN_LIB; | ||
| 100 | err: | ||
| 101 | ASN1err(ASN1_F_D2I_DSAPRIVATEKEY,i); | ||
| 102 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 103 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 104 | return(NULL); | ||
| 105 | } | ||
| 106 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c deleted file mode 100644 index 0b7d2fafcc..0000000000 --- a/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c +++ /dev/null | |||
| @@ -1,121 +0,0 @@ | |||
| 1 | /* crypto/asn1/d2i_s_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* Original version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ | ||
| 60 | |||
| 61 | #ifndef NO_DSA | ||
| 62 | #include <stdio.h> | ||
| 63 | #include "cryptlib.h" | ||
| 64 | #include <openssl/bn.h> | ||
| 65 | #include <openssl/dsa.h> | ||
| 66 | #include <openssl/objects.h> | ||
| 67 | #include <openssl/asn1_mac.h> | ||
| 68 | |||
| 69 | #ifndef NO_NEG_PUBKEY_BUG | ||
| 70 | #define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER | ||
| 71 | #endif | ||
| 72 | |||
| 73 | DSA *d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length) | ||
| 74 | { | ||
| 75 | int i=ASN1_R_PARSING; | ||
| 76 | ASN1_INTEGER *bs=NULL; | ||
| 77 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 78 | |||
| 79 | M_ASN1_D2I_Init(); | ||
| 80 | if ((length != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) | ||
| 81 | == (V_ASN1_UNIVERSAL|(V_ASN1_INTEGER)))) | ||
| 82 | { | ||
| 83 | c.slen=length; | ||
| 84 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 85 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 86 | == NULL) | ||
| 87 | goto err_bn; | ||
| 88 | ret->write_params=0; | ||
| 89 | } | ||
| 90 | else | ||
| 91 | { | ||
| 92 | M_ASN1_D2I_start_sequence(); | ||
| 93 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 94 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 95 | == NULL) | ||
| 96 | goto err_bn; | ||
| 97 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 98 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) | ||
| 99 | goto err_bn; | ||
| 100 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 101 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) | ||
| 102 | goto err_bn; | ||
| 103 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 104 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) | ||
| 105 | goto err_bn; | ||
| 106 | |||
| 107 | ret->write_params=1; | ||
| 108 | } | ||
| 109 | |||
| 110 | M_ASN1_INTEGER_free(bs); | ||
| 111 | bs=NULL; | ||
| 112 | M_ASN1_D2I_Finish_2(a); | ||
| 113 | err_bn: | ||
| 114 | i=ERR_R_BN_LIB; | ||
| 115 | err: | ||
| 116 | ASN1err(ASN1_F_D2I_DSAPUBLICKEY,i); | ||
| 117 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 118 | if (bs != NULL) M_ASN1_INTEGER_free(bs); | ||
| 119 | return(NULL); | ||
| 120 | } | ||
| 121 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_dhp.c b/src/lib/libssl/src/crypto/asn1/i2d_dhp.c deleted file mode 100644 index b1de17fe07..0000000000 --- a/src/lib/libssl/src/crypto/asn1/i2d_dhp.c +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_dhp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DH | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/asn1_mac.h> | ||
| 64 | #include <openssl/dh.h> | ||
| 65 | |||
| 66 | int i2d_DHparams(DH *a, unsigned char **pp) | ||
| 67 | { | ||
| 68 | BIGNUM *num[3]; | ||
| 69 | ASN1_INTEGER bs; | ||
| 70 | unsigned int j,i,tot=0,len,max=0; | ||
| 71 | int t,ret= -1; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | num[0]=a->p; | ||
| 76 | num[1]=a->g; | ||
| 77 | if (a->length != 0) | ||
| 78 | { | ||
| 79 | if ((num[2]=BN_new()) == NULL) goto err; | ||
| 80 | if (!BN_set_word(num[2],a->length)) goto err; | ||
| 81 | } | ||
| 82 | else | ||
| 83 | num[2]=NULL; | ||
| 84 | |||
| 85 | for (i=0; i<3; i++) | ||
| 86 | { | ||
| 87 | if (num[i] == NULL) continue; | ||
| 88 | j=BN_num_bits(num[i]); | ||
| 89 | len=((j == 0)?0:((j/8)+1)); | ||
| 90 | if (len > max) max=len; | ||
| 91 | len=ASN1_object_size(0,len, | ||
| 92 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 93 | tot+=len; | ||
| 94 | } | ||
| 95 | |||
| 96 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 97 | if (pp == NULL) | ||
| 98 | { | ||
| 99 | if (num[2] != NULL) | ||
| 100 | BN_free(num[2]); | ||
| 101 | return(t); | ||
| 102 | } | ||
| 103 | |||
| 104 | p= *pp; | ||
| 105 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 106 | |||
| 107 | bs.type=V_ASN1_INTEGER; | ||
| 108 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 109 | if (bs.data == NULL) | ||
| 110 | { | ||
| 111 | ASN1err(ASN1_F_I2D_DHPARAMS,ERR_R_MALLOC_FAILURE); | ||
| 112 | goto err; | ||
| 113 | } | ||
| 114 | |||
| 115 | for (i=0; i<3; i++) | ||
| 116 | { | ||
| 117 | if (num[i] == NULL) continue; | ||
| 118 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 119 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 120 | } | ||
| 121 | OPENSSL_free(bs.data); | ||
| 122 | ret=t; | ||
| 123 | err: | ||
| 124 | if (num[2] != NULL) BN_free(num[2]); | ||
| 125 | *pp=p; | ||
| 126 | return(ret); | ||
| 127 | } | ||
| 128 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_dsap.c b/src/lib/libssl/src/crypto/asn1/i2d_dsap.c deleted file mode 100644 index 157fb43893..0000000000 --- a/src/lib/libssl/src/crypto/asn1/i2d_dsap.c +++ /dev/null | |||
| @@ -1,117 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_dsap.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/asn1_mac.h> | ||
| 64 | #include <openssl/dsa.h> | ||
| 65 | |||
| 66 | int i2d_DSAparams(DSA *a, unsigned char **pp) | ||
| 67 | { | ||
| 68 | BIGNUM *num[3]; | ||
| 69 | ASN1_INTEGER bs; | ||
| 70 | unsigned int j,i,tot=0,len,max=0; | ||
| 71 | int t,ret= -1; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | num[0]=a->p; | ||
| 76 | num[1]=a->q; | ||
| 77 | num[2]=a->g; | ||
| 78 | |||
| 79 | for (i=0; i<3; i++) | ||
| 80 | { | ||
| 81 | if (num[i] == NULL) continue; | ||
| 82 | j=BN_num_bits(num[i]); | ||
| 83 | len=((j == 0)?0:((j/8)+1)); | ||
| 84 | if (len > max) max=len; | ||
| 85 | len=ASN1_object_size(0,len, | ||
| 86 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 87 | tot+=len; | ||
| 88 | } | ||
| 89 | |||
| 90 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 91 | if (pp == NULL) return(t); | ||
| 92 | |||
| 93 | p= *pp; | ||
| 94 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 95 | |||
| 96 | bs.type=V_ASN1_INTEGER; | ||
| 97 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 98 | if (bs.data == NULL) | ||
| 99 | { | ||
| 100 | ASN1err(ASN1_F_I2D_DSAPARAMS,ERR_R_MALLOC_FAILURE); | ||
| 101 | goto err; | ||
| 102 | } | ||
| 103 | |||
| 104 | for (i=0; i<3; i++) | ||
| 105 | { | ||
| 106 | if (num[i] == NULL) continue; | ||
| 107 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 108 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 109 | } | ||
| 110 | OPENSSL_free(bs.data); | ||
| 111 | ret=t; | ||
| 112 | err: | ||
| 113 | *pp=p; | ||
| 114 | return(ret); | ||
| 115 | } | ||
| 116 | #endif | ||
| 117 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c b/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c deleted file mode 100644 index 88b1aac989..0000000000 --- a/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c +++ /dev/null | |||
| @@ -1,133 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_r_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_RSAPrivateKey(RSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[9]; | ||
| 70 | unsigned char data[1]; | ||
| 71 | ASN1_INTEGER bs; | ||
| 72 | unsigned int j,i,tot,t,len,max=0; | ||
| 73 | unsigned char *p; | ||
| 74 | |||
| 75 | if (a == NULL) return(0); | ||
| 76 | |||
| 77 | num[1]=a->n; | ||
| 78 | num[2]=a->e; | ||
| 79 | num[3]=a->d; | ||
| 80 | num[4]=a->p; | ||
| 81 | num[5]=a->q; | ||
| 82 | num[6]=a->dmp1; | ||
| 83 | num[7]=a->dmq1; | ||
| 84 | num[8]=a->iqmp; | ||
| 85 | |||
| 86 | bs.length=1; | ||
| 87 | bs.data=data; | ||
| 88 | bs.type=V_ASN1_INTEGER; | ||
| 89 | data[0]=a->version&0x7f; | ||
| 90 | |||
| 91 | tot=i2d_ASN1_INTEGER(&(bs),NULL); | ||
| 92 | for (i=1; i<9; i++) | ||
| 93 | { | ||
| 94 | j=BN_num_bits(num[i]); | ||
| 95 | len=((j == 0)?0:((j/8)+1)); | ||
| 96 | if (len > max) max=len; | ||
| 97 | len=ASN1_object_size(0,len, | ||
| 98 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 99 | tot+=len; | ||
| 100 | } | ||
| 101 | |||
| 102 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 103 | if (pp == NULL) return(t); | ||
| 104 | |||
| 105 | p= *pp; | ||
| 106 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 107 | |||
| 108 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 109 | |||
| 110 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 111 | if (bs.data == NULL) | ||
| 112 | { | ||
| 113 | ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | ||
| 114 | return(-1); | ||
| 115 | } | ||
| 116 | |||
| 117 | for (i=1; i<9; i++) | ||
| 118 | { | ||
| 119 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 120 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 121 | } | ||
| 122 | OPENSSL_free(bs.data); | ||
| 123 | *pp=p; | ||
| 124 | return(t); | ||
| 125 | } | ||
| 126 | #else /* !NO_RSA */ | ||
| 127 | |||
| 128 | # if PEDANTIC | ||
| 129 | static void *dummy=&dummy; | ||
| 130 | # endif | ||
| 131 | |||
| 132 | #endif | ||
| 133 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c b/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c deleted file mode 100644 index 8178c2c3b3..0000000000 --- a/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c +++ /dev/null | |||
| @@ -1,118 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_r_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/rsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_RSAPublicKey(RSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[2]; | ||
| 70 | ASN1_INTEGER bs; | ||
| 71 | unsigned int j,i,tot=0,len,max=0,t; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | |||
| 76 | num[0]=a->n; | ||
| 77 | num[1]=a->e; | ||
| 78 | |||
| 79 | for (i=0; i<2; i++) | ||
| 80 | { | ||
| 81 | j=BN_num_bits(num[i]); | ||
| 82 | len=((j == 0)?0:((j/8)+1)); | ||
| 83 | if (len > max) max=len; | ||
| 84 | len=ASN1_object_size(0,len, | ||
| 85 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 86 | tot+=len; | ||
| 87 | } | ||
| 88 | |||
| 89 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 90 | if (pp == NULL) return(t); | ||
| 91 | |||
| 92 | p= *pp; | ||
| 93 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 94 | |||
| 95 | bs.type=V_ASN1_INTEGER; | ||
| 96 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 97 | if (bs.data == NULL) | ||
| 98 | { | ||
| 99 | ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | ||
| 100 | return(-1); | ||
| 101 | } | ||
| 102 | |||
| 103 | for (i=0; i<2; i++) | ||
| 104 | { | ||
| 105 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 106 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 107 | } | ||
| 108 | OPENSSL_free(bs.data); | ||
| 109 | *pp=p; | ||
| 110 | return(t); | ||
| 111 | } | ||
| 112 | #else /* !NO_RSA */ | ||
| 113 | |||
| 114 | # if PEDANTIC | ||
| 115 | static void *dummy=&dummy; | ||
| 116 | # endif | ||
| 117 | |||
| 118 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c b/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c deleted file mode 100644 index 9922952ad7..0000000000 --- a/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_s_pr.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_DSAPrivateKey(DSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[6]; | ||
| 70 | unsigned char data[1]; | ||
| 71 | ASN1_INTEGER bs; | ||
| 72 | unsigned int j,i,tot,t,len,max=0; | ||
| 73 | unsigned char *p; | ||
| 74 | |||
| 75 | if (a == NULL) return(0); | ||
| 76 | |||
| 77 | num[1]=a->p; | ||
| 78 | num[2]=a->q; | ||
| 79 | num[3]=a->g; | ||
| 80 | num[4]=a->pub_key; | ||
| 81 | num[5]=a->priv_key; | ||
| 82 | |||
| 83 | bs.length=1; | ||
| 84 | bs.data=data; | ||
| 85 | bs.type=V_ASN1_INTEGER; | ||
| 86 | data[0]=a->version&0x7f; | ||
| 87 | |||
| 88 | tot=i2d_ASN1_INTEGER(&(bs),NULL); | ||
| 89 | for (i=1; i<6; i++) | ||
| 90 | { | ||
| 91 | j=BN_num_bits(num[i]); | ||
| 92 | len=((j == 0)?0:((j/8)+1)); | ||
| 93 | if (len > max) max=len; | ||
| 94 | len=ASN1_object_size(0,len, | ||
| 95 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 96 | tot+=len; | ||
| 97 | } | ||
| 98 | |||
| 99 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 100 | if (pp == NULL) return(t); | ||
| 101 | |||
| 102 | p= *pp; | ||
| 103 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 104 | |||
| 105 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 106 | |||
| 107 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 108 | if (bs.data == NULL) | ||
| 109 | { | ||
| 110 | ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | ||
| 111 | return(-1); | ||
| 112 | } | ||
| 113 | |||
| 114 | for (i=1; i<6; i++) | ||
| 115 | { | ||
| 116 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 117 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 118 | } | ||
| 119 | OPENSSL_free(bs.data); | ||
| 120 | *pp=p; | ||
| 121 | return(t); | ||
| 122 | } | ||
| 123 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c b/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c deleted file mode 100644 index e6014b82a8..0000000000 --- a/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c +++ /dev/null | |||
| @@ -1,129 +0,0 @@ | |||
| 1 | /* crypto/asn1/i2d_s_pu.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_DSA | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/bn.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/asn1_mac.h> | ||
| 66 | |||
| 67 | int i2d_DSAPublicKey(DSA *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | BIGNUM *num[4]; | ||
| 70 | ASN1_INTEGER bs; | ||
| 71 | unsigned int j,i,tot=0,len,max=0,t=0,all,n=1; | ||
| 72 | unsigned char *p; | ||
| 73 | |||
| 74 | if (a == NULL) return(0); | ||
| 75 | |||
| 76 | all=a->write_params; | ||
| 77 | |||
| 78 | num[0]=a->pub_key; | ||
| 79 | if (all) | ||
| 80 | { | ||
| 81 | num[1]=a->p; | ||
| 82 | num[2]=a->q; | ||
| 83 | num[3]=a->g; | ||
| 84 | n=4; | ||
| 85 | } | ||
| 86 | |||
| 87 | for (i=0; i<n; i++) | ||
| 88 | { | ||
| 89 | j=BN_num_bits(num[i]); | ||
| 90 | len=((j == 0)?0:((j/8)+1)); | ||
| 91 | if (len > max) max=len; | ||
| 92 | len=ASN1_object_size(0,len, | ||
| 93 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 94 | tot+=len; | ||
| 95 | } | ||
| 96 | |||
| 97 | if (all) | ||
| 98 | { | ||
| 99 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 100 | if (pp == NULL) return(t); | ||
| 101 | } | ||
| 102 | else | ||
| 103 | { | ||
| 104 | if (pp == NULL) return(tot); | ||
| 105 | } | ||
| 106 | |||
| 107 | p= *pp; | ||
| 108 | if (all) | ||
| 109 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 110 | |||
| 111 | bs.type=V_ASN1_INTEGER; | ||
| 112 | bs.data=(unsigned char *)OPENSSL_malloc(max+4); | ||
| 113 | if (bs.data == NULL) | ||
| 114 | { | ||
| 115 | ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | ||
| 116 | return(-1); | ||
| 117 | } | ||
| 118 | |||
| 119 | for (i=0; i<n; i++) | ||
| 120 | { | ||
| 121 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 122 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 123 | } | ||
| 124 | OPENSSL_free(bs.data); | ||
| 125 | *pp=p; | ||
| 126 | if(all) return(t); | ||
| 127 | else return(tot); | ||
| 128 | } | ||
| 129 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_dgst.c b/src/lib/libssl/src/crypto/asn1/p7_dgst.c deleted file mode 100644 index c170244616..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_dgst.c +++ /dev/null | |||
| @@ -1,121 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_dgst.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->md,i2d_X509_ALGOR); | ||
| 70 | M_ASN1_I2D_len(a->contents,i2d_PKCS7); | ||
| 71 | M_ASN1_I2D_len(a->digest,i2d_ASN1_OCTET_STRING); | ||
| 72 | |||
| 73 | M_ASN1_I2D_seq_total(); | ||
| 74 | |||
| 75 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_put(a->md,i2d_X509_ALGOR); | ||
| 77 | M_ASN1_I2D_put(a->contents,i2d_PKCS7); | ||
| 78 | M_ASN1_I2D_put(a->digest,i2d_ASN1_OCTET_STRING); | ||
| 79 | |||
| 80 | M_ASN1_I2D_finish(); | ||
| 81 | } | ||
| 82 | |||
| 83 | PKCS7_DIGEST *d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, unsigned char **pp, | ||
| 84 | long length) | ||
| 85 | { | ||
| 86 | M_ASN1_D2I_vars(a,PKCS7_DIGEST *,PKCS7_DIGEST_new); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Init(); | ||
| 89 | M_ASN1_D2I_start_sequence(); | ||
| 90 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 91 | M_ASN1_D2I_get(ret->md,d2i_X509_ALGOR); | ||
| 92 | M_ASN1_D2I_get(ret->contents,d2i_PKCS7); | ||
| 93 | M_ASN1_D2I_get(ret->digest,d2i_ASN1_OCTET_STRING); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Finish(a,PKCS7_DIGEST_free,ASN1_F_D2I_PKCS7_DIGEST); | ||
| 96 | } | ||
| 97 | |||
| 98 | PKCS7_DIGEST *PKCS7_DIGEST_new(void) | ||
| 99 | { | ||
| 100 | PKCS7_DIGEST *ret=NULL; | ||
| 101 | ASN1_CTX c; | ||
| 102 | |||
| 103 | M_ASN1_New_Malloc(ret,PKCS7_DIGEST); | ||
| 104 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 105 | M_ASN1_New(ret->md,X509_ALGOR_new); | ||
| 106 | M_ASN1_New(ret->contents,PKCS7_new); | ||
| 107 | M_ASN1_New(ret->digest,M_ASN1_OCTET_STRING_new); | ||
| 108 | return(ret); | ||
| 109 | M_ASN1_New_Error(ASN1_F_PKCS7_DIGEST_NEW); | ||
| 110 | } | ||
| 111 | |||
| 112 | void PKCS7_DIGEST_free(PKCS7_DIGEST *a) | ||
| 113 | { | ||
| 114 | if (a == NULL) return; | ||
| 115 | M_ASN1_INTEGER_free(a->version); | ||
| 116 | X509_ALGOR_free(a->md); | ||
| 117 | PKCS7_free(a->contents); | ||
| 118 | M_ASN1_OCTET_STRING_free(a->digest); | ||
| 119 | OPENSSL_free(a); | ||
| 120 | } | ||
| 121 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_enc.c b/src/lib/libssl/src/crypto/asn1/p7_enc.c deleted file mode 100644 index 38ccafbdb0..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_enc.c +++ /dev/null | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_enc.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 70 | |||
| 71 | M_ASN1_I2D_seq_total(); | ||
| 72 | |||
| 73 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 74 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 75 | |||
| 76 | M_ASN1_I2D_finish(); | ||
| 77 | } | ||
| 78 | |||
| 79 | PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, unsigned char **pp, | ||
| 80 | long length) | ||
| 81 | { | ||
| 82 | M_ASN1_D2I_vars(a,PKCS7_ENCRYPT *,PKCS7_ENCRYPT_new); | ||
| 83 | |||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 87 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 88 | |||
| 89 | M_ASN1_D2I_Finish(a,PKCS7_ENCRYPT_free,ASN1_F_D2I_PKCS7_ENCRYPT); | ||
| 90 | } | ||
| 91 | |||
| 92 | PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void) | ||
| 93 | { | ||
| 94 | PKCS7_ENCRYPT *ret=NULL; | ||
| 95 | ASN1_CTX c; | ||
| 96 | |||
| 97 | M_ASN1_New_Malloc(ret,PKCS7_ENCRYPT); | ||
| 98 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 99 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 100 | return(ret); | ||
| 101 | M_ASN1_New_Error(ASN1_F_PKCS7_ENCRYPT_NEW); | ||
| 102 | } | ||
| 103 | |||
| 104 | void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a) | ||
| 105 | { | ||
| 106 | if (a == NULL) return; | ||
| 107 | M_ASN1_INTEGER_free(a->version); | ||
| 108 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 109 | OPENSSL_free(a); | ||
| 110 | } | ||
| 111 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_enc_c.c b/src/lib/libssl/src/crypto/asn1/p7_enc_c.c deleted file mode 100644 index 031178ab52..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_enc_c.c +++ /dev/null | |||
| @@ -1,120 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_enc_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->content_type,i2d_ASN1_OBJECT); | ||
| 69 | M_ASN1_I2D_len(a->algorithm,i2d_X509_ALGOR); | ||
| 70 | M_ASN1_I2D_len_IMP_opt(a->enc_data,i2d_ASN1_OCTET_STRING); | ||
| 71 | |||
| 72 | M_ASN1_I2D_seq_total(); | ||
| 73 | |||
| 74 | M_ASN1_I2D_put(a->content_type,i2d_ASN1_OBJECT); | ||
| 75 | M_ASN1_I2D_put(a->algorithm,i2d_X509_ALGOR); | ||
| 76 | M_ASN1_I2D_put_IMP_opt(a->enc_data,i2d_ASN1_OCTET_STRING,0); | ||
| 77 | |||
| 78 | M_ASN1_I2D_finish(); | ||
| 79 | } | ||
| 80 | |||
| 81 | PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a, | ||
| 82 | unsigned char **pp, long length) | ||
| 83 | { | ||
| 84 | M_ASN1_D2I_vars(a,PKCS7_ENC_CONTENT *,PKCS7_ENC_CONTENT_new); | ||
| 85 | |||
| 86 | M_ASN1_D2I_Init(); | ||
| 87 | M_ASN1_D2I_start_sequence(); | ||
| 88 | M_ASN1_D2I_get(ret->content_type,d2i_ASN1_OBJECT); | ||
| 89 | M_ASN1_D2I_get(ret->algorithm,d2i_X509_ALGOR); | ||
| 90 | M_ASN1_D2I_get_IMP_opt(ret->enc_data,d2i_ASN1_OCTET_STRING,0, | ||
| 91 | V_ASN1_OCTET_STRING); | ||
| 92 | |||
| 93 | M_ASN1_D2I_Finish(a,PKCS7_ENC_CONTENT_free, | ||
| 94 | ASN1_F_D2I_PKCS7_ENC_CONTENT); | ||
| 95 | } | ||
| 96 | |||
| 97 | PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new(void) | ||
| 98 | { | ||
| 99 | PKCS7_ENC_CONTENT *ret=NULL; | ||
| 100 | ASN1_CTX c; | ||
| 101 | |||
| 102 | M_ASN1_New_Malloc(ret,PKCS7_ENC_CONTENT); | ||
| 103 | /* M_ASN1_New(ret->content_type,ASN1_OBJECT_new); */ | ||
| 104 | /* We will almost always want this: so make it the default */ | ||
| 105 | ret->content_type=OBJ_nid2obj(NID_pkcs7_data); | ||
| 106 | M_ASN1_New(ret->algorithm,X509_ALGOR_new); | ||
| 107 | ret->enc_data=NULL; | ||
| 108 | return(ret); | ||
| 109 | M_ASN1_New_Error(ASN1_F_PKCS7_ENC_CONTENT_NEW); | ||
| 110 | } | ||
| 111 | |||
| 112 | void PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a) | ||
| 113 | { | ||
| 114 | if (a == NULL) return; | ||
| 115 | ASN1_OBJECT_free(a->content_type); | ||
| 116 | X509_ALGOR_free(a->algorithm); | ||
| 117 | M_ASN1_OCTET_STRING_free(a->enc_data); | ||
| 118 | OPENSSL_free(a); | ||
| 119 | } | ||
| 120 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_evp.c b/src/lib/libssl/src/crypto/asn1/p7_evp.c deleted file mode 100644 index 60be3e5f66..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_evp.c +++ /dev/null | |||
| @@ -1,119 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_evp.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 70 | i2d_PKCS7_RECIP_INFO); | ||
| 71 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 72 | |||
| 73 | M_ASN1_I2D_seq_total(); | ||
| 74 | |||
| 75 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_put_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 77 | i2d_PKCS7_RECIP_INFO); | ||
| 78 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 79 | |||
| 80 | M_ASN1_I2D_finish(); | ||
| 81 | } | ||
| 82 | |||
| 83 | PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, unsigned char **pp, | ||
| 84 | long length) | ||
| 85 | { | ||
| 86 | M_ASN1_D2I_vars(a,PKCS7_ENVELOPE *,PKCS7_ENVELOPE_new); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Init(); | ||
| 89 | M_ASN1_D2I_start_sequence(); | ||
| 90 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 91 | M_ASN1_D2I_get_set_type(PKCS7_RECIP_INFO,ret->recipientinfo, | ||
| 92 | d2i_PKCS7_RECIP_INFO,PKCS7_RECIP_INFO_free); | ||
| 93 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Finish(a,PKCS7_ENVELOPE_free,ASN1_F_D2I_PKCS7_ENVELOPE); | ||
| 96 | } | ||
| 97 | |||
| 98 | PKCS7_ENVELOPE *PKCS7_ENVELOPE_new(void) | ||
| 99 | { | ||
| 100 | PKCS7_ENVELOPE *ret=NULL; | ||
| 101 | ASN1_CTX c; | ||
| 102 | |||
| 103 | M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE); | ||
| 104 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 105 | M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null); | ||
| 106 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 107 | return(ret); | ||
| 108 | M_ASN1_New_Error(ASN1_F_PKCS7_ENVELOPE_NEW); | ||
| 109 | } | ||
| 110 | |||
| 111 | void PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a) | ||
| 112 | { | ||
| 113 | if (a == NULL) return; | ||
| 114 | M_ASN1_INTEGER_free(a->version); | ||
| 115 | sk_PKCS7_RECIP_INFO_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); | ||
| 116 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 117 | OPENSSL_free(a); | ||
| 118 | } | ||
| 119 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_i_s.c b/src/lib/libssl/src/crypto/asn1/p7_i_s.c deleted file mode 100644 index 4a7260a5c8..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_i_s.c +++ /dev/null | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_i_s.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a, | ||
| 65 | unsigned char **pp) | ||
| 66 | { | ||
| 67 | M_ASN1_I2D_vars(a); | ||
| 68 | |||
| 69 | M_ASN1_I2D_len(a->issuer,i2d_X509_NAME); | ||
| 70 | M_ASN1_I2D_len(a->serial,i2d_ASN1_INTEGER); | ||
| 71 | |||
| 72 | M_ASN1_I2D_seq_total(); | ||
| 73 | |||
| 74 | M_ASN1_I2D_put(a->issuer,i2d_X509_NAME); | ||
| 75 | M_ASN1_I2D_put(a->serial,i2d_ASN1_INTEGER); | ||
| 76 | |||
| 77 | M_ASN1_I2D_finish(); | ||
| 78 | } | ||
| 79 | |||
| 80 | PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, unsigned char **pp, long length) | ||
| 81 | { | ||
| 82 | M_ASN1_D2I_vars(a,PKCS7_ISSUER_AND_SERIAL *,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 83 | |||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get(ret->issuer,d2i_X509_NAME); | ||
| 87 | M_ASN1_D2I_get(ret->serial,d2i_ASN1_INTEGER); | ||
| 88 | M_ASN1_D2I_Finish(a,PKCS7_ISSUER_AND_SERIAL_free, | ||
| 89 | ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL); | ||
| 90 | } | ||
| 91 | |||
| 92 | PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new(void) | ||
| 93 | { | ||
| 94 | PKCS7_ISSUER_AND_SERIAL *ret=NULL; | ||
| 95 | ASN1_CTX c; | ||
| 96 | |||
| 97 | M_ASN1_New_Malloc(ret,PKCS7_ISSUER_AND_SERIAL); | ||
| 98 | M_ASN1_New(ret->issuer,X509_NAME_new); | ||
| 99 | M_ASN1_New(ret->serial,M_ASN1_INTEGER_new); | ||
| 100 | return(ret); | ||
| 101 | M_ASN1_New_Error(ASN1_F_PKCS7_ISSUER_AND_SERIAL_NEW); | ||
| 102 | } | ||
| 103 | |||
| 104 | void PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a) | ||
| 105 | { | ||
| 106 | if (a == NULL) return; | ||
| 107 | X509_NAME_free(a->issuer); | ||
| 108 | M_ASN1_INTEGER_free(a->serial); | ||
| 109 | OPENSSL_free(a); | ||
| 110 | } | ||
| 111 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_lib.c b/src/lib/libssl/src/crypto/asn1/p7_lib.c deleted file mode 100644 index 8a340b0119..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_lib.c +++ /dev/null | |||
| @@ -1,393 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_lib.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs7.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | #ifdef PKCS7_INDEFINITE_ENCODING | ||
| 66 | |||
| 67 | int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | ||
| 68 | { | ||
| 69 | M_ASN1_I2D_vars(a); | ||
| 70 | |||
| 71 | if (a->asn1 != NULL) | ||
| 72 | { | ||
| 73 | if (pp == NULL) | ||
| 74 | return((int)a->length); | ||
| 75 | memcpy(*pp,a->asn1,(int)a->length); | ||
| 76 | *pp+=a->length; | ||
| 77 | return((int)a->length); | ||
| 78 | } | ||
| 79 | |||
| 80 | ret+=4; /* sequence, BER header plus '0 0' end padding */ | ||
| 81 | M_ASN1_I2D_len(a->type,i2d_ASN1_OBJECT); | ||
| 82 | if (a->d.ptr != NULL) | ||
| 83 | { | ||
| 84 | ret+=4; /* explicit tag [ 0 ] BER plus '0 0' */ | ||
| 85 | switch (OBJ_obj2nid(a->type)) | ||
| 86 | { | ||
| 87 | case NID_pkcs7_data: | ||
| 88 | M_ASN1_I2D_len(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 89 | break; | ||
| 90 | case NID_pkcs7_signed: | ||
| 91 | M_ASN1_I2D_len(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 92 | break; | ||
| 93 | case NID_pkcs7_enveloped: | ||
| 94 | M_ASN1_I2D_len(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 95 | break; | ||
| 96 | case NID_pkcs7_signedAndEnveloped: | ||
| 97 | M_ASN1_I2D_len(a->d.signed_and_enveloped, | ||
| 98 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 99 | break; | ||
| 100 | case NID_pkcs7_digest: | ||
| 101 | M_ASN1_I2D_len(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 102 | break; | ||
| 103 | case NID_pkcs7_encrypted: | ||
| 104 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 105 | break; | ||
| 106 | default: | ||
| 107 | M_ASN1_I2D_len(a->d.other,i2d_ASN1_TYPE); | ||
| 108 | break; | ||
| 109 | } | ||
| 110 | } | ||
| 111 | r=ret; | ||
| 112 | if (pp == NULL) return(r); | ||
| 113 | p= *pp; | ||
| 114 | M_ASN1_I2D_INF_seq_start(V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 115 | M_ASN1_I2D_put(a->type,i2d_ASN1_OBJECT); | ||
| 116 | |||
| 117 | if (a->d.ptr != NULL) | ||
| 118 | { | ||
| 119 | M_ASN1_I2D_INF_seq_start(0,V_ASN1_CONTEXT_SPECIFIC); | ||
| 120 | switch (OBJ_obj2nid(a->type)) | ||
| 121 | { | ||
| 122 | case NID_pkcs7_data: | ||
| 123 | M_ASN1_I2D_put(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 124 | break; | ||
| 125 | case NID_pkcs7_signed: | ||
| 126 | M_ASN1_I2D_put(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 127 | break; | ||
| 128 | case NID_pkcs7_enveloped: | ||
| 129 | M_ASN1_I2D_put(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 130 | break; | ||
| 131 | case NID_pkcs7_signedAndEnveloped: | ||
| 132 | M_ASN1_I2D_put(a->d.signed_and_enveloped, | ||
| 133 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 134 | break; | ||
| 135 | case NID_pkcs7_digest: | ||
| 136 | M_ASN1_I2D_put(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 137 | break; | ||
| 138 | case NID_pkcs7_encrypted: | ||
| 139 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 140 | break; | ||
| 141 | default: | ||
| 142 | M_ASN1_I2D_put(a->d.other,i2d_ASN1_TYPE); | ||
| 143 | break; | ||
| 144 | } | ||
| 145 | M_ASN1_I2D_INF_seq_end(); | ||
| 146 | } | ||
| 147 | M_ASN1_I2D_INF_seq_end(); | ||
| 148 | M_ASN1_I2D_finish(); | ||
| 149 | } | ||
| 150 | |||
| 151 | #else | ||
| 152 | |||
| 153 | int i2d_PKCS7(PKCS7 *a, unsigned char **pp) | ||
| 154 | { | ||
| 155 | int explen = 0; | ||
| 156 | M_ASN1_I2D_vars(a); | ||
| 157 | |||
| 158 | if (a->asn1 != NULL) | ||
| 159 | { | ||
| 160 | if (pp == NULL) | ||
| 161 | return((int)a->length); | ||
| 162 | memcpy(*pp,a->asn1,(int)a->length); | ||
| 163 | *pp+=a->length; | ||
| 164 | return((int)a->length); | ||
| 165 | } | ||
| 166 | |||
| 167 | M_ASN1_I2D_len(a->type,i2d_ASN1_OBJECT); | ||
| 168 | if (a->d.ptr != NULL) | ||
| 169 | { | ||
| 170 | /* Save current length */ | ||
| 171 | r = ret; | ||
| 172 | switch (OBJ_obj2nid(a->type)) | ||
| 173 | { | ||
| 174 | case NID_pkcs7_data: | ||
| 175 | M_ASN1_I2D_len(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 176 | break; | ||
| 177 | case NID_pkcs7_signed: | ||
| 178 | M_ASN1_I2D_len(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 179 | break; | ||
| 180 | case NID_pkcs7_enveloped: | ||
| 181 | M_ASN1_I2D_len(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 182 | break; | ||
| 183 | case NID_pkcs7_signedAndEnveloped: | ||
| 184 | M_ASN1_I2D_len(a->d.signed_and_enveloped, | ||
| 185 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 186 | break; | ||
| 187 | case NID_pkcs7_digest: | ||
| 188 | M_ASN1_I2D_len(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 189 | break; | ||
| 190 | case NID_pkcs7_encrypted: | ||
| 191 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 192 | break; | ||
| 193 | default: | ||
| 194 | M_ASN1_I2D_len(a->d.other,i2d_ASN1_TYPE); | ||
| 195 | break; | ||
| 196 | } | ||
| 197 | /* Work out explicit tag content size */ | ||
| 198 | explen = ret - r; | ||
| 199 | /* Work out explicit tag size: Note: ASN1_object_size | ||
| 200 | * includes the content length. | ||
| 201 | */ | ||
| 202 | ret = r + ASN1_object_size(1, explen, 0); | ||
| 203 | } | ||
| 204 | |||
| 205 | M_ASN1_I2D_seq_total(); | ||
| 206 | |||
| 207 | M_ASN1_I2D_put(a->type,i2d_ASN1_OBJECT); | ||
| 208 | |||
| 209 | if (a->d.ptr != NULL) | ||
| 210 | { | ||
| 211 | ASN1_put_object(&p, 1, explen, 0, V_ASN1_CONTEXT_SPECIFIC); | ||
| 212 | switch (OBJ_obj2nid(a->type)) | ||
| 213 | { | ||
| 214 | case NID_pkcs7_data: | ||
| 215 | M_ASN1_I2D_put(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 216 | break; | ||
| 217 | case NID_pkcs7_signed: | ||
| 218 | M_ASN1_I2D_put(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 219 | break; | ||
| 220 | case NID_pkcs7_enveloped: | ||
| 221 | M_ASN1_I2D_put(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 222 | break; | ||
| 223 | case NID_pkcs7_signedAndEnveloped: | ||
| 224 | M_ASN1_I2D_put(a->d.signed_and_enveloped, | ||
| 225 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 226 | break; | ||
| 227 | case NID_pkcs7_digest: | ||
| 228 | M_ASN1_I2D_put(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 229 | break; | ||
| 230 | case NID_pkcs7_encrypted: | ||
| 231 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 232 | break; | ||
| 233 | default: | ||
| 234 | M_ASN1_I2D_put(a->d.other,i2d_ASN1_TYPE); | ||
| 235 | break; | ||
| 236 | } | ||
| 237 | } | ||
| 238 | M_ASN1_I2D_finish(); | ||
| 239 | } | ||
| 240 | |||
| 241 | #endif | ||
| 242 | |||
| 243 | PKCS7 *d2i_PKCS7(PKCS7 **a, unsigned char **pp, long length) | ||
| 244 | { | ||
| 245 | M_ASN1_D2I_vars(a,PKCS7 *,PKCS7_new); | ||
| 246 | |||
| 247 | if ((a != NULL) && ((*a) != NULL)) | ||
| 248 | { | ||
| 249 | if ((*a)->asn1 != NULL) | ||
| 250 | { | ||
| 251 | OPENSSL_free((*a)->asn1); | ||
| 252 | (*a)->asn1=NULL; | ||
| 253 | } | ||
| 254 | (*a)->length=0; | ||
| 255 | } | ||
| 256 | |||
| 257 | M_ASN1_D2I_Init(); | ||
| 258 | M_ASN1_D2I_start_sequence(); | ||
| 259 | M_ASN1_D2I_get(ret->type,d2i_ASN1_OBJECT); | ||
| 260 | if (!M_ASN1_D2I_end_sequence()) | ||
| 261 | { | ||
| 262 | int Tinf,Ttag,Tclass; | ||
| 263 | long Tlen; | ||
| 264 | |||
| 265 | if (M_ASN1_next != (V_ASN1_CONSTRUCTED| | ||
| 266 | V_ASN1_CONTEXT_SPECIFIC|0)) | ||
| 267 | { | ||
| 268 | c.error=ASN1_R_BAD_PKCS7_CONTENT; | ||
| 269 | c.line=__LINE__; | ||
| 270 | goto err; | ||
| 271 | } | ||
| 272 | |||
| 273 | ret->detached=0; | ||
| 274 | |||
| 275 | c.q=c.p; | ||
| 276 | Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass, | ||
| 277 | (c.inf & 1)?(length+ *pp-c.q):c.slen); | ||
| 278 | if (Tinf & 0x80) { c.line=__LINE__; goto err; } | ||
| 279 | c.slen-=(c.p-c.q); | ||
| 280 | |||
| 281 | switch (OBJ_obj2nid(ret->type)) | ||
| 282 | { | ||
| 283 | case NID_pkcs7_data: | ||
| 284 | M_ASN1_D2I_get(ret->d.data,d2i_ASN1_OCTET_STRING); | ||
| 285 | break; | ||
| 286 | case NID_pkcs7_signed: | ||
| 287 | M_ASN1_D2I_get(ret->d.sign,d2i_PKCS7_SIGNED); | ||
| 288 | if (ret->d.sign->contents->d.ptr == NULL) | ||
| 289 | ret->detached=1; | ||
| 290 | break; | ||
| 291 | case NID_pkcs7_enveloped: | ||
| 292 | M_ASN1_D2I_get(ret->d.enveloped,d2i_PKCS7_ENVELOPE); | ||
| 293 | break; | ||
| 294 | case NID_pkcs7_signedAndEnveloped: | ||
| 295 | M_ASN1_D2I_get(ret->d.signed_and_enveloped, | ||
| 296 | d2i_PKCS7_SIGN_ENVELOPE); | ||
| 297 | break; | ||
| 298 | case NID_pkcs7_digest: | ||
| 299 | M_ASN1_D2I_get(ret->d.digest,d2i_PKCS7_DIGEST); | ||
| 300 | break; | ||
| 301 | case NID_pkcs7_encrypted: | ||
| 302 | M_ASN1_D2I_get(ret->d.encrypted,d2i_PKCS7_ENCRYPT); | ||
| 303 | break; | ||
| 304 | default: | ||
| 305 | M_ASN1_D2I_get(ret->d.other,d2i_ASN1_TYPE); | ||
| 306 | break; | ||
| 307 | } | ||
| 308 | if (Tinf == (1|V_ASN1_CONSTRUCTED)) | ||
| 309 | { | ||
| 310 | c.q=c.p; | ||
| 311 | if (!ASN1_check_infinite_end(&c.p,c.slen)) | ||
| 312 | { | ||
| 313 | c.error=ERR_R_MISSING_ASN1_EOS; | ||
| 314 | c.line=__LINE__; | ||
| 315 | goto err; | ||
| 316 | } | ||
| 317 | c.slen-=(c.p-c.q); | ||
| 318 | } | ||
| 319 | } | ||
| 320 | else | ||
| 321 | ret->detached=1; | ||
| 322 | |||
| 323 | M_ASN1_D2I_Finish(a,PKCS7_free,ASN1_F_D2I_PKCS7); | ||
| 324 | } | ||
| 325 | |||
| 326 | PKCS7 *PKCS7_new(void) | ||
| 327 | { | ||
| 328 | PKCS7 *ret=NULL; | ||
| 329 | ASN1_CTX c; | ||
| 330 | |||
| 331 | M_ASN1_New_Malloc(ret,PKCS7); | ||
| 332 | ret->type=OBJ_nid2obj(NID_undef); | ||
| 333 | ret->asn1=NULL; | ||
| 334 | ret->length=0; | ||
| 335 | ret->detached=0; | ||
| 336 | ret->d.ptr=NULL; | ||
| 337 | return(ret); | ||
| 338 | M_ASN1_New_Error(ASN1_F_PKCS7_NEW); | ||
| 339 | } | ||
| 340 | |||
| 341 | void PKCS7_free(PKCS7 *a) | ||
| 342 | { | ||
| 343 | if (a == NULL) return; | ||
| 344 | |||
| 345 | PKCS7_content_free(a); | ||
| 346 | if (a->type != NULL) | ||
| 347 | { | ||
| 348 | ASN1_OBJECT_free(a->type); | ||
| 349 | } | ||
| 350 | OPENSSL_free(a); | ||
| 351 | } | ||
| 352 | |||
| 353 | void PKCS7_content_free(PKCS7 *a) | ||
| 354 | { | ||
| 355 | if(a == NULL) | ||
| 356 | return; | ||
| 357 | |||
| 358 | if (a->asn1 != NULL) OPENSSL_free(a->asn1); | ||
| 359 | |||
| 360 | if (a->d.ptr != NULL) | ||
| 361 | { | ||
| 362 | if (a->type == NULL) return; | ||
| 363 | |||
| 364 | switch (OBJ_obj2nid(a->type)) | ||
| 365 | { | ||
| 366 | case NID_pkcs7_data: | ||
| 367 | M_ASN1_OCTET_STRING_free(a->d.data); | ||
| 368 | break; | ||
| 369 | case NID_pkcs7_signed: | ||
| 370 | PKCS7_SIGNED_free(a->d.sign); | ||
| 371 | break; | ||
| 372 | case NID_pkcs7_enveloped: | ||
| 373 | PKCS7_ENVELOPE_free(a->d.enveloped); | ||
| 374 | break; | ||
| 375 | case NID_pkcs7_signedAndEnveloped: | ||
| 376 | PKCS7_SIGN_ENVELOPE_free(a->d.signed_and_enveloped); | ||
| 377 | break; | ||
| 378 | case NID_pkcs7_digest: | ||
| 379 | PKCS7_DIGEST_free(a->d.digest); | ||
| 380 | break; | ||
| 381 | case NID_pkcs7_encrypted: | ||
| 382 | PKCS7_ENCRYPT_free(a->d.encrypted); | ||
| 383 | break; | ||
| 384 | default: | ||
| 385 | ASN1_TYPE_free(a->d.other); | ||
| 386 | break; | ||
| 387 | } | ||
| 388 | } | ||
| 389 | a->d.ptr=NULL; | ||
| 390 | } | ||
| 391 | |||
| 392 | IMPLEMENT_STACK_OF(PKCS7) | ||
| 393 | IMPLEMENT_ASN1_SET_OF(PKCS7) | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_recip.c b/src/lib/libssl/src/crypto/asn1/p7_recip.c deleted file mode 100644 index 5f6c88a2fa..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_recip.c +++ /dev/null | |||
| @@ -1,125 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_recip.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 70 | M_ASN1_I2D_len(a->key_enc_algor,i2d_X509_ALGOR); | ||
| 71 | M_ASN1_I2D_len(a->enc_key,i2d_ASN1_OCTET_STRING); | ||
| 72 | |||
| 73 | M_ASN1_I2D_seq_total(); | ||
| 74 | |||
| 75 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_put(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 77 | M_ASN1_I2D_put(a->key_enc_algor,i2d_X509_ALGOR); | ||
| 78 | M_ASN1_I2D_put(a->enc_key,i2d_ASN1_OCTET_STRING); | ||
| 79 | |||
| 80 | M_ASN1_I2D_finish(); | ||
| 81 | } | ||
| 82 | |||
| 83 | PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a, | ||
| 84 | unsigned char **pp, long length) | ||
| 85 | { | ||
| 86 | M_ASN1_D2I_vars(a,PKCS7_RECIP_INFO *,PKCS7_RECIP_INFO_new); | ||
| 87 | |||
| 88 | M_ASN1_D2I_Init(); | ||
| 89 | M_ASN1_D2I_start_sequence(); | ||
| 90 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 91 | M_ASN1_D2I_get(ret->issuer_and_serial,d2i_PKCS7_ISSUER_AND_SERIAL); | ||
| 92 | M_ASN1_D2I_get(ret->key_enc_algor,d2i_X509_ALGOR); | ||
| 93 | M_ASN1_D2I_get(ret->enc_key,d2i_ASN1_OCTET_STRING); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Finish(a,PKCS7_RECIP_INFO_free,ASN1_F_D2I_PKCS7_RECIP_INFO); | ||
| 96 | } | ||
| 97 | |||
| 98 | PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new(void) | ||
| 99 | { | ||
| 100 | PKCS7_RECIP_INFO *ret=NULL; | ||
| 101 | ASN1_CTX c; | ||
| 102 | |||
| 103 | M_ASN1_New_Malloc(ret,PKCS7_RECIP_INFO); | ||
| 104 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 105 | M_ASN1_New(ret->issuer_and_serial,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 106 | M_ASN1_New(ret->key_enc_algor,X509_ALGOR_new); | ||
| 107 | M_ASN1_New(ret->enc_key,M_ASN1_OCTET_STRING_new); | ||
| 108 | ret->cert=NULL; | ||
| 109 | return(ret); | ||
| 110 | M_ASN1_New_Error(ASN1_F_PKCS7_RECIP_INFO_NEW); | ||
| 111 | } | ||
| 112 | |||
| 113 | void PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a) | ||
| 114 | { | ||
| 115 | if (a == NULL) return; | ||
| 116 | M_ASN1_INTEGER_free(a->version); | ||
| 117 | PKCS7_ISSUER_AND_SERIAL_free(a->issuer_and_serial); | ||
| 118 | X509_ALGOR_free(a->key_enc_algor); | ||
| 119 | M_ASN1_OCTET_STRING_free(a->enc_key); | ||
| 120 | if (a->cert != NULL) X509_free(a->cert); | ||
| 121 | OPENSSL_free(a); | ||
| 122 | } | ||
| 123 | |||
| 124 | IMPLEMENT_STACK_OF(PKCS7_RECIP_INFO) | ||
| 125 | IMPLEMENT_ASN1_SET_OF(PKCS7_RECIP_INFO) | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_s_e.c b/src/lib/libssl/src/crypto/asn1/p7_s_e.c deleted file mode 100644 index 709eb24b27..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_s_e.c +++ /dev/null | |||
| @@ -1,145 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_s_e.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 70 | i2d_PKCS7_RECIP_INFO); | ||
| 71 | M_ASN1_I2D_len_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 72 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 73 | M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 74 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 75 | M_ASN1_I2D_len_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 76 | i2d_PKCS7_SIGNER_INFO); | ||
| 77 | |||
| 78 | M_ASN1_I2D_seq_total(); | ||
| 79 | |||
| 80 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 81 | M_ASN1_I2D_put_SET_type(PKCS7_RECIP_INFO,a->recipientinfo, | ||
| 82 | i2d_PKCS7_RECIP_INFO); | ||
| 83 | M_ASN1_I2D_put_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 84 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 85 | M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 86 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 87 | M_ASN1_I2D_put_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 88 | i2d_PKCS7_SIGNER_INFO); | ||
| 89 | |||
| 90 | M_ASN1_I2D_finish(); | ||
| 91 | } | ||
| 92 | |||
| 93 | PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a, | ||
| 94 | unsigned char **pp, long length) | ||
| 95 | { | ||
| 96 | M_ASN1_D2I_vars(a,PKCS7_SIGN_ENVELOPE *,PKCS7_SIGN_ENVELOPE_new); | ||
| 97 | |||
| 98 | M_ASN1_D2I_Init(); | ||
| 99 | M_ASN1_D2I_start_sequence(); | ||
| 100 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 101 | M_ASN1_D2I_get_set_type(PKCS7_RECIP_INFO,ret->recipientinfo, | ||
| 102 | d2i_PKCS7_RECIP_INFO,PKCS7_RECIP_INFO_free); | ||
| 103 | M_ASN1_D2I_get_set_type(X509_ALGOR,ret->md_algs,d2i_X509_ALGOR, | ||
| 104 | X509_ALGOR_free); | ||
| 105 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 106 | M_ASN1_D2I_get_IMP_set_opt_type(X509,ret->cert,d2i_X509,X509_free,0); | ||
| 107 | M_ASN1_D2I_get_IMP_set_opt_type(X509_CRL,ret->crl,d2i_X509_CRL, | ||
| 108 | X509_CRL_free,1); | ||
| 109 | M_ASN1_D2I_get_set_type(PKCS7_SIGNER_INFO,ret->signer_info, | ||
| 110 | d2i_PKCS7_SIGNER_INFO,PKCS7_SIGNER_INFO_free); | ||
| 111 | |||
| 112 | M_ASN1_D2I_Finish(a,PKCS7_SIGN_ENVELOPE_free, | ||
| 113 | ASN1_F_D2I_PKCS7_SIGN_ENVELOPE); | ||
| 114 | } | ||
| 115 | |||
| 116 | PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void) | ||
| 117 | { | ||
| 118 | PKCS7_SIGN_ENVELOPE *ret=NULL; | ||
| 119 | ASN1_CTX c; | ||
| 120 | |||
| 121 | M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE); | ||
| 122 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 123 | M_ASN1_New(ret->recipientinfo,sk_PKCS7_RECIP_INFO_new_null); | ||
| 124 | M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null); | ||
| 125 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 126 | ret->cert=NULL; | ||
| 127 | ret->crl=NULL; | ||
| 128 | M_ASN1_New(ret->signer_info,sk_PKCS7_SIGNER_INFO_new_null); | ||
| 129 | return(ret); | ||
| 130 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGN_ENVELOPE_NEW); | ||
| 131 | } | ||
| 132 | |||
| 133 | void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a) | ||
| 134 | { | ||
| 135 | if (a == NULL) return; | ||
| 136 | M_ASN1_INTEGER_free(a->version); | ||
| 137 | sk_PKCS7_RECIP_INFO_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); | ||
| 138 | sk_X509_ALGOR_pop_free(a->md_algs,X509_ALGOR_free); | ||
| 139 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 140 | sk_X509_pop_free(a->cert,X509_free); | ||
| 141 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); | ||
| 142 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | ||
| 143 | OPENSSL_free(a); | ||
| 144 | } | ||
| 145 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_signd.c b/src/lib/libssl/src/crypto/asn1/p7_signd.c deleted file mode 100644 index c835f5475f..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_signd.c +++ /dev/null | |||
| @@ -1,135 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_signd.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 70 | M_ASN1_I2D_len(a->contents,i2d_PKCS7); | ||
| 71 | M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 72 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 73 | M_ASN1_I2D_len_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 74 | i2d_PKCS7_SIGNER_INFO); | ||
| 75 | |||
| 76 | M_ASN1_I2D_seq_total(); | ||
| 77 | |||
| 78 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 79 | M_ASN1_I2D_put_SET_type(X509_ALGOR,a->md_algs,i2d_X509_ALGOR); | ||
| 80 | M_ASN1_I2D_put(a->contents,i2d_PKCS7); | ||
| 81 | M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0); | ||
| 82 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1); | ||
| 83 | M_ASN1_I2D_put_SET_type(PKCS7_SIGNER_INFO,a->signer_info, | ||
| 84 | i2d_PKCS7_SIGNER_INFO); | ||
| 85 | |||
| 86 | M_ASN1_I2D_finish(); | ||
| 87 | } | ||
| 88 | |||
| 89 | PKCS7_SIGNED *d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, unsigned char **pp, | ||
| 90 | long length) | ||
| 91 | { | ||
| 92 | M_ASN1_D2I_vars(a,PKCS7_SIGNED *,PKCS7_SIGNED_new); | ||
| 93 | |||
| 94 | M_ASN1_D2I_Init(); | ||
| 95 | M_ASN1_D2I_start_sequence(); | ||
| 96 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 97 | M_ASN1_D2I_get_set_type(X509_ALGOR,ret->md_algs,d2i_X509_ALGOR, | ||
| 98 | X509_ALGOR_free); | ||
| 99 | M_ASN1_D2I_get(ret->contents,d2i_PKCS7); | ||
| 100 | M_ASN1_D2I_get_IMP_set_opt_type(X509,ret->cert,d2i_X509,X509_free,0); | ||
| 101 | M_ASN1_D2I_get_IMP_set_opt_type(X509_CRL,ret->crl,d2i_X509_CRL, | ||
| 102 | X509_CRL_free,1); | ||
| 103 | M_ASN1_D2I_get_set_type(PKCS7_SIGNER_INFO,ret->signer_info, | ||
| 104 | d2i_PKCS7_SIGNER_INFO,PKCS7_SIGNER_INFO_free); | ||
| 105 | |||
| 106 | M_ASN1_D2I_Finish(a,PKCS7_SIGNED_free,ASN1_F_D2I_PKCS7_SIGNED); | ||
| 107 | } | ||
| 108 | |||
| 109 | PKCS7_SIGNED *PKCS7_SIGNED_new(void) | ||
| 110 | { | ||
| 111 | PKCS7_SIGNED *ret=NULL; | ||
| 112 | ASN1_CTX c; | ||
| 113 | |||
| 114 | M_ASN1_New_Malloc(ret,PKCS7_SIGNED); | ||
| 115 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 116 | M_ASN1_New(ret->md_algs,sk_X509_ALGOR_new_null); | ||
| 117 | M_ASN1_New(ret->contents,PKCS7_new); | ||
| 118 | ret->cert=NULL; | ||
| 119 | ret->crl=NULL; | ||
| 120 | M_ASN1_New(ret->signer_info,sk_PKCS7_SIGNER_INFO_new_null); | ||
| 121 | return(ret); | ||
| 122 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGNED_NEW); | ||
| 123 | } | ||
| 124 | |||
| 125 | void PKCS7_SIGNED_free(PKCS7_SIGNED *a) | ||
| 126 | { | ||
| 127 | if (a == NULL) return; | ||
| 128 | M_ASN1_INTEGER_free(a->version); | ||
| 129 | sk_X509_ALGOR_pop_free(a->md_algs,X509_ALGOR_free); | ||
| 130 | PKCS7_free(a->contents); | ||
| 131 | sk_X509_pop_free(a->cert,X509_free); | ||
| 132 | sk_X509_CRL_pop_free(a->crl,X509_CRL_free); | ||
| 133 | sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | ||
| 134 | OPENSSL_free(a); | ||
| 135 | } | ||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_signi.c b/src/lib/libssl/src/crypto/asn1/p7_signi.c deleted file mode 100644 index 248bf00945..0000000000 --- a/src/lib/libssl/src/crypto/asn1/p7_signi.c +++ /dev/null | |||
| @@ -1,150 +0,0 @@ | |||
| 1 | /* crypto/asn1/p7_signi.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/x509.h> | ||
| 63 | |||
| 64 | int i2d_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 70 | M_ASN1_I2D_len(a->digest_alg,i2d_X509_ALGOR); | ||
| 71 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_ATTRIBUTE,a->auth_attr, | ||
| 72 | i2d_X509_ATTRIBUTE,0); | ||
| 73 | M_ASN1_I2D_len(a->digest_enc_alg,i2d_X509_ALGOR); | ||
| 74 | M_ASN1_I2D_len(a->enc_digest,i2d_ASN1_OCTET_STRING); | ||
| 75 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_ATTRIBUTE,a->unauth_attr, | ||
| 76 | i2d_X509_ATTRIBUTE,1); | ||
| 77 | |||
| 78 | M_ASN1_I2D_seq_total(); | ||
| 79 | |||
| 80 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 81 | M_ASN1_I2D_put(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 82 | M_ASN1_I2D_put(a->digest_alg,i2d_X509_ALGOR); | ||
| 83 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_ATTRIBUTE,a->auth_attr, | ||
| 84 | i2d_X509_ATTRIBUTE,0); | ||
| 85 | M_ASN1_I2D_put(a->digest_enc_alg,i2d_X509_ALGOR); | ||
| 86 | M_ASN1_I2D_put(a->enc_digest,i2d_ASN1_OCTET_STRING); | ||
| 87 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_ATTRIBUTE,a->unauth_attr, | ||
| 88 | i2d_X509_ATTRIBUTE,1); | ||
| 89 | |||
| 90 | M_ASN1_I2D_finish(); | ||
| 91 | } | ||
| 92 | |||
| 93 | PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a, | ||
| 94 | unsigned char **pp, long length) | ||
| 95 | { | ||
| 96 | M_ASN1_D2I_vars(a,PKCS7_SIGNER_INFO *,PKCS7_SIGNER_INFO_new); | ||
| 97 | |||
| 98 | M_ASN1_D2I_Init(); | ||
| 99 | M_ASN1_D2I_start_sequence(); | ||
| 100 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 101 | M_ASN1_D2I_get(ret->issuer_and_serial,d2i_PKCS7_ISSUER_AND_SERIAL); | ||
| 102 | M_ASN1_D2I_get(ret->digest_alg,d2i_X509_ALGOR); | ||
| 103 | M_ASN1_D2I_get_IMP_set_opt_type(X509_ATTRIBUTE,ret->auth_attr, | ||
| 104 | d2i_X509_ATTRIBUTE,X509_ATTRIBUTE_free, | ||
| 105 | 0); | ||
| 106 | M_ASN1_D2I_get(ret->digest_enc_alg,d2i_X509_ALGOR); | ||
| 107 | M_ASN1_D2I_get(ret->enc_digest,d2i_ASN1_OCTET_STRING); | ||
| 108 | M_ASN1_D2I_get_IMP_set_opt_type(X509_ATTRIBUTE,ret->unauth_attr, | ||
| 109 | d2i_X509_ATTRIBUTE, | ||
| 110 | X509_ATTRIBUTE_free,1); | ||
| 111 | |||
| 112 | M_ASN1_D2I_Finish(a,PKCS7_SIGNER_INFO_free, | ||
| 113 | ASN1_F_D2I_PKCS7_SIGNER_INFO); | ||
| 114 | } | ||
| 115 | |||
| 116 | PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new(void) | ||
| 117 | { | ||
| 118 | PKCS7_SIGNER_INFO *ret=NULL; | ||
| 119 | ASN1_CTX c; | ||
| 120 | |||
| 121 | M_ASN1_New_Malloc(ret,PKCS7_SIGNER_INFO); | ||
| 122 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
| 123 | M_ASN1_New(ret->issuer_and_serial,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 124 | M_ASN1_New(ret->digest_alg,X509_ALGOR_new); | ||
| 125 | ret->auth_attr=NULL; | ||
| 126 | M_ASN1_New(ret->digest_enc_alg,X509_ALGOR_new); | ||
| 127 | M_ASN1_New(ret->enc_digest,M_ASN1_OCTET_STRING_new); | ||
| 128 | ret->unauth_attr=NULL; | ||
| 129 | ret->pkey=NULL; | ||
| 130 | return(ret); | ||
| 131 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGNER_INFO_NEW); | ||
| 132 | } | ||
| 133 | |||
| 134 | void PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a) | ||
| 135 | { | ||
| 136 | if (a == NULL) return; | ||
| 137 | M_ASN1_INTEGER_free(a->version); | ||
| 138 | PKCS7_ISSUER_AND_SERIAL_free(a->issuer_and_serial); | ||
| 139 | X509_ALGOR_free(a->digest_alg); | ||
| 140 | sk_X509_ATTRIBUTE_pop_free(a->auth_attr,X509_ATTRIBUTE_free); | ||
| 141 | X509_ALGOR_free(a->digest_enc_alg); | ||
| 142 | M_ASN1_OCTET_STRING_free(a->enc_digest); | ||
| 143 | sk_X509_ATTRIBUTE_pop_free(a->unauth_attr,X509_ATTRIBUTE_free); | ||
| 144 | if (a->pkey != NULL) | ||
| 145 | EVP_PKEY_free(a->pkey); | ||
| 146 | OPENSSL_free(a); | ||
| 147 | } | ||
| 148 | |||
| 149 | IMPLEMENT_STACK_OF(PKCS7_SIGNER_INFO) | ||
| 150 | IMPLEMENT_ASN1_SET_OF(PKCS7_SIGNER_INFO) | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf.c b/src/lib/libssl/src/crypto/conf/conf.c deleted file mode 100644 index 3031fa3b44..0000000000 --- a/src/lib/libssl/src/crypto/conf/conf.c +++ /dev/null | |||
| @@ -1,730 +0,0 @@ | |||
| 1 | /* crypto/conf/conf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <errno.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/stack.h> | ||
| 63 | #include <openssl/lhash.h> | ||
| 64 | #include <openssl/conf.h> | ||
| 65 | #include <openssl/buffer.h> | ||
| 66 | #include <openssl/err.h> | ||
| 67 | |||
| 68 | #include "conf_lcl.h" | ||
| 69 | |||
| 70 | static void value_free_hash(CONF_VALUE *a, LHASH *conf); | ||
| 71 | static void value_free_stack(CONF_VALUE *a,LHASH *conf); | ||
| 72 | static unsigned long hash(CONF_VALUE *v); | ||
| 73 | static int cmp_conf(CONF_VALUE *a,CONF_VALUE *b); | ||
| 74 | static char *eat_ws(char *p); | ||
| 75 | static char *eat_alpha_numeric(char *p); | ||
| 76 | static void clear_comments(char *p); | ||
| 77 | static int str_copy(LHASH *conf,char *section,char **to, char *from); | ||
| 78 | static char *scan_quote(char *p); | ||
| 79 | static CONF_VALUE *new_section(LHASH *conf,char *section); | ||
| 80 | static CONF_VALUE *get_section(LHASH *conf,char *section); | ||
| 81 | #define scan_esc(p) ((((p)[1] == '\0')?(p++):(p+=2)),p) | ||
| 82 | |||
| 83 | const char *CONF_version="CONF" OPENSSL_VERSION_PTEXT; | ||
| 84 | |||
| 85 | |||
| 86 | LHASH *CONF_load(LHASH *h, const char *file, long *line) | ||
| 87 | { | ||
| 88 | LHASH *ltmp; | ||
| 89 | BIO *in=NULL; | ||
| 90 | |||
| 91 | #ifdef VMS | ||
| 92 | in=BIO_new_file(file, "r"); | ||
| 93 | #else | ||
| 94 | in=BIO_new_file(file, "rb"); | ||
| 95 | #endif | ||
| 96 | if (in == NULL) | ||
| 97 | { | ||
| 98 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
| 99 | return NULL; | ||
| 100 | } | ||
| 101 | |||
| 102 | ltmp = CONF_load_bio(h, in, line); | ||
| 103 | BIO_free(in); | ||
| 104 | |||
| 105 | return ltmp; | ||
| 106 | } | ||
| 107 | #ifndef NO_FP_API | ||
| 108 | LHASH *CONF_load_fp(LHASH *h, FILE *in, long *line) | ||
| 109 | { | ||
| 110 | BIO *btmp; | ||
| 111 | LHASH *ltmp; | ||
| 112 | if(!(btmp = BIO_new_fp(in, BIO_NOCLOSE))) { | ||
| 113 | CONFerr(CONF_F_CONF_LOAD_FP,ERR_R_BUF_LIB); | ||
| 114 | return NULL; | ||
| 115 | } | ||
| 116 | ltmp = CONF_load_bio(h, btmp, line); | ||
| 117 | BIO_free(btmp); | ||
| 118 | return ltmp; | ||
| 119 | } | ||
| 120 | #endif | ||
| 121 | |||
| 122 | LHASH *CONF_load_bio(LHASH *h, BIO *in, long *line) | ||
| 123 | { | ||
| 124 | LHASH *ret=NULL; | ||
| 125 | #define BUFSIZE 512 | ||
| 126 | char btmp[16]; | ||
| 127 | int bufnum=0,i,ii; | ||
| 128 | BUF_MEM *buff=NULL; | ||
| 129 | char *s,*p,*end; | ||
| 130 | int again,n; | ||
| 131 | long eline=0; | ||
| 132 | CONF_VALUE *v=NULL,*vv,*tv; | ||
| 133 | CONF_VALUE *sv=NULL; | ||
| 134 | char *section=NULL,*buf; | ||
| 135 | STACK_OF(CONF_VALUE) *section_sk=NULL,*ts; | ||
| 136 | char *start,*psection,*pname; | ||
| 137 | |||
| 138 | if ((buff=BUF_MEM_new()) == NULL) | ||
| 139 | { | ||
| 140 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 141 | goto err; | ||
| 142 | } | ||
| 143 | |||
| 144 | section=(char *)Malloc(10); | ||
| 145 | if (section == NULL) | ||
| 146 | { | ||
| 147 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 148 | goto err; | ||
| 149 | } | ||
| 150 | strcpy(section,"default"); | ||
| 151 | |||
| 152 | if (h == NULL) | ||
| 153 | { | ||
| 154 | if ((ret=lh_new(hash,cmp_conf)) == NULL) | ||
| 155 | { | ||
| 156 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE); | ||
| 157 | goto err; | ||
| 158 | } | ||
| 159 | } | ||
| 160 | else | ||
| 161 | ret=h; | ||
| 162 | |||
| 163 | sv=new_section(ret,section); | ||
| 164 | if (sv == NULL) | ||
| 165 | { | ||
| 166 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 167 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 168 | goto err; | ||
| 169 | } | ||
| 170 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 171 | |||
| 172 | bufnum=0; | ||
| 173 | for (;;) | ||
| 174 | { | ||
| 175 | again=0; | ||
| 176 | if (!BUF_MEM_grow(buff,bufnum+BUFSIZE)) | ||
| 177 | { | ||
| 178 | CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB); | ||
| 179 | goto err; | ||
| 180 | } | ||
| 181 | p= &(buff->data[bufnum]); | ||
| 182 | *p='\0'; | ||
| 183 | BIO_gets(in, p, BUFSIZE-1); | ||
| 184 | p[BUFSIZE-1]='\0'; | ||
| 185 | ii=i=strlen(p); | ||
| 186 | if (i == 0) break; | ||
| 187 | while (i > 0) | ||
| 188 | { | ||
| 189 | if ((p[i-1] != '\r') && (p[i-1] != '\n')) | ||
| 190 | break; | ||
| 191 | else | ||
| 192 | i--; | ||
| 193 | } | ||
| 194 | /* we removed some trailing stuff so there is a new | ||
| 195 | * line on the end. */ | ||
| 196 | if (i == ii) | ||
| 197 | again=1; /* long line */ | ||
| 198 | else | ||
| 199 | { | ||
| 200 | p[i]='\0'; | ||
| 201 | eline++; /* another input line */ | ||
| 202 | } | ||
| 203 | |||
| 204 | /* we now have a line with trailing \r\n removed */ | ||
| 205 | |||
| 206 | /* i is the number of bytes */ | ||
| 207 | bufnum+=i; | ||
| 208 | |||
| 209 | v=NULL; | ||
| 210 | /* check for line continuation */ | ||
| 211 | if (bufnum >= 1) | ||
| 212 | { | ||
| 213 | /* If we have bytes and the last char '\\' and | ||
| 214 | * second last char is not '\\' */ | ||
| 215 | p= &(buff->data[bufnum-1]); | ||
| 216 | if ( IS_ESC(p[0]) && | ||
| 217 | ((bufnum <= 1) || !IS_ESC(p[-1]))) | ||
| 218 | { | ||
| 219 | bufnum--; | ||
| 220 | again=1; | ||
| 221 | } | ||
| 222 | } | ||
| 223 | if (again) continue; | ||
| 224 | bufnum=0; | ||
| 225 | buf=buff->data; | ||
| 226 | |||
| 227 | clear_comments(buf); | ||
| 228 | n=strlen(buf); | ||
| 229 | s=eat_ws(buf); | ||
| 230 | if (IS_EOF(*s)) continue; /* blank line */ | ||
| 231 | if (*s == '[') | ||
| 232 | { | ||
| 233 | char *ss; | ||
| 234 | |||
| 235 | s++; | ||
| 236 | start=eat_ws(s); | ||
| 237 | ss=start; | ||
| 238 | again: | ||
| 239 | end=eat_alpha_numeric(ss); | ||
| 240 | p=eat_ws(end); | ||
| 241 | if (*p != ']') | ||
| 242 | { | ||
| 243 | if (*p != '\0') | ||
| 244 | { | ||
| 245 | ss=p; | ||
| 246 | goto again; | ||
| 247 | } | ||
| 248 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 249 | CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | ||
| 250 | goto err; | ||
| 251 | } | ||
| 252 | *end='\0'; | ||
| 253 | if (!str_copy(ret,NULL,§ion,start)) goto err; | ||
| 254 | if ((sv=get_section(ret,section)) == NULL) | ||
| 255 | sv=new_section(ret,section); | ||
| 256 | if (sv == NULL) | ||
| 257 | { | ||
| 258 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 259 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 260 | goto err; | ||
| 261 | } | ||
| 262 | section_sk=(STACK_OF(CONF_VALUE) *)sv->value; | ||
| 263 | continue; | ||
| 264 | } | ||
| 265 | else | ||
| 266 | { | ||
| 267 | pname=s; | ||
| 268 | psection=NULL; | ||
| 269 | end=eat_alpha_numeric(s); | ||
| 270 | if ((end[0] == ':') && (end[1] == ':')) | ||
| 271 | { | ||
| 272 | *end='\0'; | ||
| 273 | end+=2; | ||
| 274 | psection=pname; | ||
| 275 | pname=end; | ||
| 276 | end=eat_alpha_numeric(end); | ||
| 277 | } | ||
| 278 | p=eat_ws(end); | ||
| 279 | if (*p != '=') | ||
| 280 | { | ||
| 281 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 282 | CONF_R_MISSING_EQUAL_SIGN); | ||
| 283 | goto err; | ||
| 284 | } | ||
| 285 | *end='\0'; | ||
| 286 | p++; | ||
| 287 | start=eat_ws(p); | ||
| 288 | while (!IS_EOF(*p)) | ||
| 289 | p++; | ||
| 290 | p--; | ||
| 291 | while ((p != start) && (IS_WS(*p))) | ||
| 292 | p--; | ||
| 293 | p++; | ||
| 294 | *p='\0'; | ||
| 295 | |||
| 296 | if (!(v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE)))) | ||
| 297 | { | ||
| 298 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 299 | ERR_R_MALLOC_FAILURE); | ||
| 300 | goto err; | ||
| 301 | } | ||
| 302 | if (psection == NULL) psection=section; | ||
| 303 | v->name=(char *)Malloc(strlen(pname)+1); | ||
| 304 | v->value=NULL; | ||
| 305 | if (v->name == NULL) | ||
| 306 | { | ||
| 307 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 308 | ERR_R_MALLOC_FAILURE); | ||
| 309 | goto err; | ||
| 310 | } | ||
| 311 | strcpy(v->name,pname); | ||
| 312 | if (!str_copy(ret,psection,&(v->value),start)) goto err; | ||
| 313 | |||
| 314 | if (strcmp(psection,section) != 0) | ||
| 315 | { | ||
| 316 | if ((tv=get_section(ret,psection)) | ||
| 317 | == NULL) | ||
| 318 | tv=new_section(ret,psection); | ||
| 319 | if (tv == NULL) | ||
| 320 | { | ||
| 321 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 322 | CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 323 | goto err; | ||
| 324 | } | ||
| 325 | ts=(STACK_OF(CONF_VALUE) *)tv->value; | ||
| 326 | } | ||
| 327 | else | ||
| 328 | { | ||
| 329 | tv=sv; | ||
| 330 | ts=section_sk; | ||
| 331 | } | ||
| 332 | v->section=tv->section; | ||
| 333 | if (!sk_CONF_VALUE_push(ts,v)) | ||
| 334 | { | ||
| 335 | CONFerr(CONF_F_CONF_LOAD_BIO, | ||
| 336 | ERR_R_MALLOC_FAILURE); | ||
| 337 | goto err; | ||
| 338 | } | ||
| 339 | vv=(CONF_VALUE *)lh_insert(ret,v); | ||
| 340 | if (vv != NULL) | ||
| 341 | { | ||
| 342 | sk_CONF_VALUE_delete_ptr(ts,vv); | ||
| 343 | Free(vv->name); | ||
| 344 | Free(vv->value); | ||
| 345 | Free(vv); | ||
| 346 | } | ||
| 347 | v=NULL; | ||
| 348 | } | ||
| 349 | } | ||
| 350 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 351 | if (section != NULL) Free(section); | ||
| 352 | return(ret); | ||
| 353 | err: | ||
| 354 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 355 | if (section != NULL) Free(section); | ||
| 356 | if (line != NULL) *line=eline; | ||
| 357 | sprintf(btmp,"%ld",eline); | ||
| 358 | ERR_add_error_data(2,"line ",btmp); | ||
| 359 | if ((h != ret) && (ret != NULL)) CONF_free(ret); | ||
| 360 | if (v != NULL) | ||
| 361 | { | ||
| 362 | if (v->name != NULL) Free(v->name); | ||
| 363 | if (v->value != NULL) Free(v->value); | ||
| 364 | if (v != NULL) Free(v); | ||
| 365 | } | ||
| 366 | return(NULL); | ||
| 367 | } | ||
| 368 | |||
| 369 | char *CONF_get_string(LHASH *conf, char *section, char *name) | ||
| 370 | { | ||
| 371 | CONF_VALUE *v,vv; | ||
| 372 | char *p; | ||
| 373 | |||
| 374 | if (name == NULL) return(NULL); | ||
| 375 | if (conf != NULL) | ||
| 376 | { | ||
| 377 | if (section != NULL) | ||
| 378 | { | ||
| 379 | vv.name=name; | ||
| 380 | vv.section=section; | ||
| 381 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 382 | if (v != NULL) return(v->value); | ||
| 383 | if (strcmp(section,"ENV") == 0) | ||
| 384 | { | ||
| 385 | p=Getenv(name); | ||
| 386 | if (p != NULL) return(p); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | vv.section="default"; | ||
| 390 | vv.name=name; | ||
| 391 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 392 | if (v != NULL) | ||
| 393 | return(v->value); | ||
| 394 | else | ||
| 395 | return(NULL); | ||
| 396 | } | ||
| 397 | else | ||
| 398 | return(Getenv(name)); | ||
| 399 | } | ||
| 400 | |||
| 401 | static CONF_VALUE *get_section(LHASH *conf, char *section) | ||
| 402 | { | ||
| 403 | CONF_VALUE *v,vv; | ||
| 404 | |||
| 405 | if ((conf == NULL) || (section == NULL)) return(NULL); | ||
| 406 | vv.name=NULL; | ||
| 407 | vv.section=section; | ||
| 408 | v=(CONF_VALUE *)lh_retrieve(conf,&vv); | ||
| 409 | return(v); | ||
| 410 | } | ||
| 411 | |||
| 412 | STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf, char *section) | ||
| 413 | { | ||
| 414 | CONF_VALUE *v; | ||
| 415 | |||
| 416 | v=get_section(conf,section); | ||
| 417 | if (v != NULL) | ||
| 418 | return((STACK_OF(CONF_VALUE) *)v->value); | ||
| 419 | else | ||
| 420 | return(NULL); | ||
| 421 | } | ||
| 422 | |||
| 423 | long CONF_get_number(LHASH *conf, char *section, char *name) | ||
| 424 | { | ||
| 425 | char *str; | ||
| 426 | long ret=0; | ||
| 427 | |||
| 428 | str=CONF_get_string(conf,section,name); | ||
| 429 | if (str == NULL) return(0); | ||
| 430 | for (;;) | ||
| 431 | { | ||
| 432 | if (IS_NUMER(*str)) | ||
| 433 | ret=ret*10+(*str -'0'); | ||
| 434 | else | ||
| 435 | return(ret); | ||
| 436 | str++; | ||
| 437 | } | ||
| 438 | } | ||
| 439 | |||
| 440 | void CONF_free(LHASH *conf) | ||
| 441 | { | ||
| 442 | if (conf == NULL) return; | ||
| 443 | |||
| 444 | conf->down_load=0; /* evil thing to make sure the 'Free()' | ||
| 445 | * works as expected */ | ||
| 446 | lh_doall_arg(conf,(void (*)())value_free_hash,conf); | ||
| 447 | |||
| 448 | /* We now have only 'section' entries in the hash table. | ||
| 449 | * Due to problems with */ | ||
| 450 | |||
| 451 | lh_doall_arg(conf,(void (*)())value_free_stack,conf); | ||
| 452 | lh_free(conf); | ||
| 453 | } | ||
| 454 | |||
| 455 | static void value_free_hash(CONF_VALUE *a, LHASH *conf) | ||
| 456 | { | ||
| 457 | if (a->name != NULL) | ||
| 458 | { | ||
| 459 | a=(CONF_VALUE *)lh_delete(conf,a); | ||
| 460 | } | ||
| 461 | } | ||
| 462 | |||
| 463 | static void value_free_stack(CONF_VALUE *a, LHASH *conf) | ||
| 464 | { | ||
| 465 | CONF_VALUE *vv; | ||
| 466 | STACK *sk; | ||
| 467 | int i; | ||
| 468 | |||
| 469 | if (a->name != NULL) return; | ||
| 470 | |||
| 471 | sk=(STACK *)a->value; | ||
| 472 | for (i=sk_num(sk)-1; i>=0; i--) | ||
| 473 | { | ||
| 474 | vv=(CONF_VALUE *)sk_value(sk,i); | ||
| 475 | Free(vv->value); | ||
| 476 | Free(vv->name); | ||
| 477 | Free(vv); | ||
| 478 | } | ||
| 479 | if (sk != NULL) sk_free(sk); | ||
| 480 | Free(a->section); | ||
| 481 | Free(a); | ||
| 482 | } | ||
| 483 | |||
| 484 | static void clear_comments(char *p) | ||
| 485 | { | ||
| 486 | char *to; | ||
| 487 | |||
| 488 | to=p; | ||
| 489 | for (;;) | ||
| 490 | { | ||
| 491 | if (IS_COMMENT(*p)) | ||
| 492 | { | ||
| 493 | *p='\0'; | ||
| 494 | return; | ||
| 495 | } | ||
| 496 | if (IS_QUOTE(*p)) | ||
| 497 | { | ||
| 498 | p=scan_quote(p); | ||
| 499 | continue; | ||
| 500 | } | ||
| 501 | if (IS_ESC(*p)) | ||
| 502 | { | ||
| 503 | p=scan_esc(p); | ||
| 504 | continue; | ||
| 505 | } | ||
| 506 | if (IS_EOF(*p)) | ||
| 507 | return; | ||
| 508 | else | ||
| 509 | p++; | ||
| 510 | } | ||
| 511 | } | ||
| 512 | |||
| 513 | static int str_copy(LHASH *conf, char *section, char **pto, char *from) | ||
| 514 | { | ||
| 515 | int q,r,rr=0,to=0,len=0; | ||
| 516 | char *s,*e,*rp,*p,*rrp,*np,*cp,v; | ||
| 517 | BUF_MEM *buf; | ||
| 518 | |||
| 519 | if ((buf=BUF_MEM_new()) == NULL) return(0); | ||
| 520 | |||
| 521 | len=strlen(from)+1; | ||
| 522 | if (!BUF_MEM_grow(buf,len)) goto err; | ||
| 523 | |||
| 524 | for (;;) | ||
| 525 | { | ||
| 526 | if (IS_QUOTE(*from)) | ||
| 527 | { | ||
| 528 | q= *from; | ||
| 529 | from++; | ||
| 530 | while ((*from != '\0') && (*from != q)) | ||
| 531 | { | ||
| 532 | if (*from == '\\') | ||
| 533 | { | ||
| 534 | from++; | ||
| 535 | if (*from == '\0') break; | ||
| 536 | } | ||
| 537 | buf->data[to++]= *(from++); | ||
| 538 | } | ||
| 539 | } | ||
| 540 | else if (*from == '\\') | ||
| 541 | { | ||
| 542 | from++; | ||
| 543 | v= *(from++); | ||
| 544 | if (v == '\0') break; | ||
| 545 | else if (v == 'r') v='\r'; | ||
| 546 | else if (v == 'n') v='\n'; | ||
| 547 | else if (v == 'b') v='\b'; | ||
| 548 | else if (v == 't') v='\t'; | ||
| 549 | buf->data[to++]= v; | ||
| 550 | } | ||
| 551 | else if (*from == '\0') | ||
| 552 | break; | ||
| 553 | else if (*from == '$') | ||
| 554 | { | ||
| 555 | /* try to expand it */ | ||
| 556 | rrp=NULL; | ||
| 557 | s= &(from[1]); | ||
| 558 | if (*s == '{') | ||
| 559 | q='}'; | ||
| 560 | else if (*s == '(') | ||
| 561 | q=')'; | ||
| 562 | else q=0; | ||
| 563 | |||
| 564 | if (q) s++; | ||
| 565 | cp=section; | ||
| 566 | e=np=s; | ||
| 567 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 568 | e++; | ||
| 569 | if ((e[0] == ':') && (e[1] == ':')) | ||
| 570 | { | ||
| 571 | cp=np; | ||
| 572 | rrp=e; | ||
| 573 | rr= *e; | ||
| 574 | *rrp='\0'; | ||
| 575 | e+=2; | ||
| 576 | np=e; | ||
| 577 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 578 | e++; | ||
| 579 | } | ||
| 580 | r= *e; | ||
| 581 | *e='\0'; | ||
| 582 | rp=e; | ||
| 583 | if (q) | ||
| 584 | { | ||
| 585 | if (r != q) | ||
| 586 | { | ||
| 587 | CONFerr(CONF_F_STR_COPY,CONF_R_NO_CLOSE_BRACE); | ||
| 588 | goto err; | ||
| 589 | } | ||
| 590 | e++; | ||
| 591 | } | ||
| 592 | /* So at this point we have | ||
| 593 | * ns which is the start of the name string which is | ||
| 594 | * '\0' terminated. | ||
| 595 | * cs which is the start of the section string which is | ||
| 596 | * '\0' terminated. | ||
| 597 | * e is the 'next point after'. | ||
| 598 | * r and s are the chars replaced by the '\0' | ||
| 599 | * rp and sp is where 'r' and 's' came from. | ||
| 600 | */ | ||
| 601 | p=CONF_get_string(conf,cp,np); | ||
| 602 | if (rrp != NULL) *rrp=rr; | ||
| 603 | *rp=r; | ||
| 604 | if (p == NULL) | ||
| 605 | { | ||
| 606 | CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); | ||
| 607 | goto err; | ||
| 608 | } | ||
| 609 | BUF_MEM_grow(buf,(strlen(p)+len-(e-from))); | ||
| 610 | while (*p) | ||
| 611 | buf->data[to++]= *(p++); | ||
| 612 | from=e; | ||
| 613 | } | ||
| 614 | else | ||
| 615 | buf->data[to++]= *(from++); | ||
| 616 | } | ||
| 617 | buf->data[to]='\0'; | ||
| 618 | if (*pto != NULL) Free(*pto); | ||
| 619 | *pto=buf->data; | ||
| 620 | Free(buf); | ||
| 621 | return(1); | ||
| 622 | err: | ||
| 623 | if (buf != NULL) BUF_MEM_free(buf); | ||
| 624 | return(0); | ||
| 625 | } | ||
| 626 | |||
| 627 | static char *eat_ws(char *p) | ||
| 628 | { | ||
| 629 | while (IS_WS(*p) && (!IS_EOF(*p))) | ||
| 630 | p++; | ||
| 631 | return(p); | ||
| 632 | } | ||
| 633 | |||
| 634 | static char *eat_alpha_numeric(char *p) | ||
| 635 | { | ||
| 636 | for (;;) | ||
| 637 | { | ||
| 638 | if (IS_ESC(*p)) | ||
| 639 | { | ||
| 640 | p=scan_esc(p); | ||
| 641 | continue; | ||
| 642 | } | ||
| 643 | if (!IS_ALPHA_NUMERIC_PUNCT(*p)) | ||
| 644 | return(p); | ||
| 645 | p++; | ||
| 646 | } | ||
| 647 | } | ||
| 648 | |||
| 649 | static unsigned long hash(CONF_VALUE *v) | ||
| 650 | { | ||
| 651 | return((lh_strhash(v->section)<<2)^lh_strhash(v->name)); | ||
| 652 | } | ||
| 653 | |||
| 654 | static int cmp_conf(CONF_VALUE *a, CONF_VALUE *b) | ||
| 655 | { | ||
| 656 | int i; | ||
| 657 | |||
| 658 | if (a->section != b->section) | ||
| 659 | { | ||
| 660 | i=strcmp(a->section,b->section); | ||
| 661 | if (i) return(i); | ||
| 662 | } | ||
| 663 | |||
| 664 | if ((a->name != NULL) && (b->name != NULL)) | ||
| 665 | { | ||
| 666 | i=strcmp(a->name,b->name); | ||
| 667 | return(i); | ||
| 668 | } | ||
| 669 | else if (a->name == b->name) | ||
| 670 | return(0); | ||
| 671 | else | ||
| 672 | return((a->name == NULL)?-1:1); | ||
| 673 | } | ||
| 674 | |||
| 675 | static char *scan_quote(char *p) | ||
| 676 | { | ||
| 677 | int q= *p; | ||
| 678 | |||
| 679 | p++; | ||
| 680 | while (!(IS_EOF(*p)) && (*p != q)) | ||
| 681 | { | ||
| 682 | if (IS_ESC(*p)) | ||
| 683 | { | ||
| 684 | p++; | ||
| 685 | if (IS_EOF(*p)) return(p); | ||
| 686 | } | ||
| 687 | p++; | ||
| 688 | } | ||
| 689 | if (*p == q) p++; | ||
| 690 | return(p); | ||
| 691 | } | ||
| 692 | |||
| 693 | static CONF_VALUE *new_section(LHASH *conf, char *section) | ||
| 694 | { | ||
| 695 | STACK *sk=NULL; | ||
| 696 | int ok=0,i; | ||
| 697 | CONF_VALUE *v=NULL,*vv; | ||
| 698 | |||
| 699 | if ((sk=sk_new_null()) == NULL) | ||
| 700 | goto err; | ||
| 701 | if ((v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE))) == NULL) | ||
| 702 | goto err; | ||
| 703 | i=strlen(section)+1; | ||
| 704 | if ((v->section=(char *)Malloc(i)) == NULL) | ||
| 705 | goto err; | ||
| 706 | |||
| 707 | memcpy(v->section,section,i); | ||
| 708 | v->name=NULL; | ||
| 709 | v->value=(char *)sk; | ||
| 710 | |||
| 711 | vv=(CONF_VALUE *)lh_insert(conf,v); | ||
| 712 | if (vv != NULL) | ||
| 713 | { | ||
| 714 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
| 715 | fprintf(stderr,"internal fault\n"); | ||
| 716 | #endif | ||
| 717 | abort(); | ||
| 718 | } | ||
| 719 | ok=1; | ||
| 720 | err: | ||
| 721 | if (!ok) | ||
| 722 | { | ||
| 723 | if (sk != NULL) sk_free(sk); | ||
| 724 | if (v != NULL) Free(v); | ||
| 725 | v=NULL; | ||
| 726 | } | ||
| 727 | return(v); | ||
| 728 | } | ||
| 729 | |||
| 730 | IMPLEMENT_STACK_OF(CONF_VALUE) | ||
diff --git a/src/lib/libssl/src/crypto/des/supp.c b/src/lib/libssl/src/crypto/des/supp.c deleted file mode 100644 index 7afea886a9..0000000000 --- a/src/lib/libssl/src/crypto/des/supp.c +++ /dev/null | |||
| @@ -1,107 +0,0 @@ | |||
| 1 | /* $OpenBSD: supp.c,v 1.3 2000/03/02 00:29:51 todd Exp $ */ | ||
| 2 | /* crypto/des/supp.c */ | ||
| 3 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * This package is an SSL implementation written | ||
| 7 | * by Eric Young (eay@cryptsoft.com). | ||
| 8 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 9 | * | ||
| 10 | * This library is free for commercial and non-commercial use as long as | ||
| 11 | * the following conditions are aheared to. The following conditions | ||
| 12 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 13 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 14 | * included with this distribution is covered by the same copyright terms | ||
| 15 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 16 | * | ||
| 17 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 18 | * the code are not to be removed. | ||
| 19 | * If this package is used in a product, Eric Young should be given attribution | ||
| 20 | * as the author of the parts of the library used. | ||
| 21 | * This can be in the form of a textual message at program startup or | ||
| 22 | * in documentation (online or textual) provided with the package. | ||
| 23 | * | ||
| 24 | * Redistribution and use in source and binary forms, with or without | ||
| 25 | * modification, are permitted provided that the following conditions | ||
| 26 | * are met: | ||
| 27 | * 1. Redistributions of source code must retain the copyright | ||
| 28 | * notice, this list of conditions and the following disclaimer. | ||
| 29 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 30 | * notice, this list of conditions and the following disclaimer in the | ||
| 31 | * documentation and/or other materials provided with the distribution. | ||
| 32 | * 3. All advertising materials mentioning features or use of this software | ||
| 33 | * must display the following acknowledgement: | ||
| 34 | * "This product includes cryptographic software written by | ||
| 35 | * Eric Young (eay@cryptsoft.com)" | ||
| 36 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 37 | * being used are not cryptographic related :-). | ||
| 38 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 39 | * the apps directory (application code) you must include an acknowledgement: | ||
| 40 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 41 | * | ||
| 42 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 43 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 44 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 45 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 46 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 47 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 48 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 49 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 50 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 51 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 52 | * SUCH DAMAGE. | ||
| 53 | * | ||
| 54 | * The licence and distribution terms for any publically available version or | ||
| 55 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 56 | * copied and put under another distribution licence | ||
| 57 | * [including the GNU Public Licence.] | ||
| 58 | */ | ||
| 59 | |||
| 60 | /* | ||
| 61 | * Copyright (c) 1995 | ||
| 62 | * Mark Murray. All rights reserved. | ||
| 63 | * | ||
| 64 | * Redistribution and use in source and binary forms, with or without | ||
| 65 | * modification, are permitted provided that the following conditions | ||
| 66 | * are met: | ||
| 67 | * 1. Redistributions of source code must retain the above copyright | ||
| 68 | * notice, this list of conditions and the following disclaimer. | ||
| 69 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 70 | * notice, this list of conditions and the following disclaimer in the | ||
| 71 | * documentation and/or other materials provided with the distribution. | ||
| 72 | * 3. All advertising materials mentioning features or use of this software | ||
| 73 | * must display the following acknowledgement: | ||
| 74 | * This product includes software developed by Mark Murray | ||
| 75 | * 4. Neither the name of the author nor the names of any co-contributors | ||
| 76 | * may be used to endorse or promote products derived from this software | ||
| 77 | * without specific prior written permission. | ||
| 78 | * | ||
| 79 | * THIS SOFTWARE IS PROVIDED BY MARK MURRAY AND CONTRIBUTORS ``AS IS'' AND | ||
| 80 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 81 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 82 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 83 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 84 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 85 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 86 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 87 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 88 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 89 | * SUCH DAMAGE. | ||
| 90 | * | ||
| 91 | */ | ||
| 92 | |||
| 93 | #include <stdio.h> | ||
| 94 | #include "des_locl.h" | ||
| 95 | |||
| 96 | void des_cblock_print_file(const_des_cblock *cb, FILE *fp) | ||
| 97 | { | ||
| 98 | int i; | ||
| 99 | const unsigned int *p = (const unsigned int *)cb; | ||
| 100 | |||
| 101 | fprintf(fp, " 0x { "); | ||
| 102 | for (i = 0; i < 8; i++) { | ||
| 103 | fprintf(fp, "%x", p[i]); | ||
| 104 | if (i != 7) fprintf(fp, ", "); | ||
| 105 | } | ||
| 106 | fprintf(fp, " }"); | ||
| 107 | } | ||
diff --git a/src/lib/libssl/src/crypto/engine/engine_err.c b/src/lib/libssl/src/crypto/engine/engine_err.c deleted file mode 100644 index 0d7a31f6d5..0000000000 --- a/src/lib/libssl/src/crypto/engine/engine_err.c +++ /dev/null | |||
| @@ -1,183 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_err.c */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@OpenSSL.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | * ==================================================================== | ||
| 49 | * | ||
| 50 | * This product includes cryptographic software written by Eric Young | ||
| 51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 52 | * Hudson (tjh@cryptsoft.com). | ||
| 53 | * | ||
| 54 | */ | ||
| 55 | |||
| 56 | /* NOTE: this file was auto generated by the mkerr.pl script: any changes | ||
| 57 | * made to it will be overwritten when the script next updates this file, | ||
| 58 | * only reason strings will be preserved. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | #include <openssl/engine.h> | ||
| 64 | |||
| 65 | /* BEGIN ERROR CODES */ | ||
| 66 | #ifndef NO_ERR | ||
| 67 | static ERR_STRING_DATA ENGINE_str_functs[]= | ||
| 68 | { | ||
| 69 | {ERR_PACK(0,ENGINE_F_ATALLA_FINISH,0), "ATALLA_FINISH"}, | ||
| 70 | {ERR_PACK(0,ENGINE_F_ATALLA_INIT,0), "ATALLA_INIT"}, | ||
| 71 | {ERR_PACK(0,ENGINE_F_ATALLA_MOD_EXP,0), "ATALLA_MOD_EXP"}, | ||
| 72 | {ERR_PACK(0,ENGINE_F_ATALLA_RSA_MOD_EXP,0), "ATALLA_RSA_MOD_EXP"}, | ||
| 73 | {ERR_PACK(0,ENGINE_F_CSWIFT_DSA_SIGN,0), "CSWIFT_DSA_SIGN"}, | ||
| 74 | {ERR_PACK(0,ENGINE_F_CSWIFT_DSA_VERIFY,0), "CSWIFT_DSA_VERIFY"}, | ||
| 75 | {ERR_PACK(0,ENGINE_F_CSWIFT_FINISH,0), "CSWIFT_FINISH"}, | ||
| 76 | {ERR_PACK(0,ENGINE_F_CSWIFT_INIT,0), "CSWIFT_INIT"}, | ||
| 77 | {ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP,0), "CSWIFT_MOD_EXP"}, | ||
| 78 | {ERR_PACK(0,ENGINE_F_CSWIFT_MOD_EXP_CRT,0), "CSWIFT_MOD_EXP_CRT"}, | ||
| 79 | {ERR_PACK(0,ENGINE_F_CSWIFT_RSA_MOD_EXP,0), "CSWIFT_RSA_MOD_EXP"}, | ||
| 80 | {ERR_PACK(0,ENGINE_F_ENGINE_ADD,0), "ENGINE_add"}, | ||
| 81 | {ERR_PACK(0,ENGINE_F_ENGINE_BY_ID,0), "ENGINE_by_id"}, | ||
| 82 | {ERR_PACK(0,ENGINE_F_ENGINE_CTRL,0), "ENGINE_ctrl"}, | ||
| 83 | {ERR_PACK(0,ENGINE_F_ENGINE_FINISH,0), "ENGINE_finish"}, | ||
| 84 | {ERR_PACK(0,ENGINE_F_ENGINE_FREE,0), "ENGINE_free"}, | ||
| 85 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP,0), "ENGINE_get_BN_mod_exp"}, | ||
| 86 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT,0), "ENGINE_get_BN_mod_exp_crt"}, | ||
| 87 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_CTRL_FUNCTION,0), "ENGINE_get_ctrl_function"}, | ||
| 88 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_DH,0), "ENGINE_get_DH"}, | ||
| 89 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_DSA,0), "ENGINE_get_DSA"}, | ||
| 90 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_FINISH_FUNCTION,0), "ENGINE_get_finish_function"}, | ||
| 91 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_ID,0), "ENGINE_get_id"}, | ||
| 92 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_INIT_FUNCTION,0), "ENGINE_get_init_function"}, | ||
| 93 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_NAME,0), "ENGINE_get_name"}, | ||
| 94 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_NEXT,0), "ENGINE_get_next"}, | ||
| 95 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_PREV,0), "ENGINE_get_prev"}, | ||
| 96 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_RAND,0), "ENGINE_get_RAND"}, | ||
| 97 | {ERR_PACK(0,ENGINE_F_ENGINE_GET_RSA,0), "ENGINE_get_RSA"}, | ||
| 98 | {ERR_PACK(0,ENGINE_F_ENGINE_INIT,0), "ENGINE_init"}, | ||
| 99 | {ERR_PACK(0,ENGINE_F_ENGINE_LIST_ADD,0), "ENGINE_LIST_ADD"}, | ||
| 100 | {ERR_PACK(0,ENGINE_F_ENGINE_LIST_REMOVE,0), "ENGINE_LIST_REMOVE"}, | ||
| 101 | {ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PRIVATE_KEY,0), "ENGINE_load_private_key"}, | ||
| 102 | {ERR_PACK(0,ENGINE_F_ENGINE_LOAD_PUBLIC_KEY,0), "ENGINE_load_public_key"}, | ||
| 103 | {ERR_PACK(0,ENGINE_F_ENGINE_NEW,0), "ENGINE_new"}, | ||
| 104 | {ERR_PACK(0,ENGINE_F_ENGINE_REMOVE,0), "ENGINE_remove"}, | ||
| 105 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP,0), "ENGINE_set_BN_mod_exp"}, | ||
| 106 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT,0), "ENGINE_set_BN_mod_exp_crt"}, | ||
| 107 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_CTRL_FUNCTION,0), "ENGINE_set_ctrl_function"}, | ||
| 108 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DEFAULT_TYPE,0), "ENGINE_SET_DEFAULT_TYPE"}, | ||
| 109 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DH,0), "ENGINE_set_DH"}, | ||
| 110 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_DSA,0), "ENGINE_set_DSA"}, | ||
| 111 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_FINISH_FUNCTION,0), "ENGINE_set_finish_function"}, | ||
| 112 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_ID,0), "ENGINE_set_id"}, | ||
| 113 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_INIT_FUNCTION,0), "ENGINE_set_init_function"}, | ||
| 114 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_NAME,0), "ENGINE_set_name"}, | ||
| 115 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_RAND,0), "ENGINE_set_RAND"}, | ||
| 116 | {ERR_PACK(0,ENGINE_F_ENGINE_SET_RSA,0), "ENGINE_set_RSA"}, | ||
| 117 | {ERR_PACK(0,ENGINE_F_ENGINE_UNLOAD_KEY,0), "ENGINE_UNLOAD_KEY"}, | ||
| 118 | {ERR_PACK(0,ENGINE_F_HWCRHK_CTRL,0), "HWCRHK_CTRL"}, | ||
| 119 | {ERR_PACK(0,ENGINE_F_HWCRHK_FINISH,0), "HWCRHK_FINISH"}, | ||
| 120 | {ERR_PACK(0,ENGINE_F_HWCRHK_GET_PASS,0), "HWCRHK_GET_PASS"}, | ||
| 121 | {ERR_PACK(0,ENGINE_F_HWCRHK_INIT,0), "HWCRHK_INIT"}, | ||
| 122 | {ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PRIVKEY,0), "HWCRHK_LOAD_PRIVKEY"}, | ||
| 123 | {ERR_PACK(0,ENGINE_F_HWCRHK_LOAD_PUBKEY,0), "HWCRHK_LOAD_PUBKEY"}, | ||
| 124 | {ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP,0), "HWCRHK_MOD_EXP"}, | ||
| 125 | {ERR_PACK(0,ENGINE_F_HWCRHK_MOD_EXP_CRT,0), "HWCRHK_MOD_EXP_CRT"}, | ||
| 126 | {ERR_PACK(0,ENGINE_F_HWCRHK_RAND_BYTES,0), "HWCRHK_RAND_BYTES"}, | ||
| 127 | {ERR_PACK(0,ENGINE_F_HWCRHK_RSA_MOD_EXP,0), "HWCRHK_RSA_MOD_EXP"}, | ||
| 128 | {ERR_PACK(0,ENGINE_F_LOG_MESSAGE,0), "LOG_MESSAGE"}, | ||
| 129 | {0,NULL} | ||
| 130 | }; | ||
| 131 | |||
| 132 | static ERR_STRING_DATA ENGINE_str_reasons[]= | ||
| 133 | { | ||
| 134 | {ENGINE_R_ALREADY_LOADED ,"already loaded"}, | ||
| 135 | {ENGINE_R_BIO_WAS_FREED ,"bio was freed"}, | ||
| 136 | {ENGINE_R_BN_CTX_FULL ,"BN_CTX full"}, | ||
| 137 | {ENGINE_R_BN_EXPAND_FAIL ,"bn_expand fail"}, | ||
| 138 | {ENGINE_R_CHIL_ERROR ,"chil error"}, | ||
| 139 | {ENGINE_R_CONFLICTING_ENGINE_ID ,"conflicting engine id"}, | ||
| 140 | {ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED ,"ctrl command not implemented"}, | ||
| 141 | {ENGINE_R_DSO_FAILURE ,"DSO failure"}, | ||
| 142 | {ENGINE_R_ENGINE_IS_NOT_IN_LIST ,"engine is not in the list"}, | ||
| 143 | {ENGINE_R_FAILED_LOADING_PRIVATE_KEY ,"failed loading private key"}, | ||
| 144 | {ENGINE_R_FAILED_LOADING_PUBLIC_KEY ,"failed loading public key"}, | ||
| 145 | {ENGINE_R_FINISH_FAILED ,"finish failed"}, | ||
| 146 | {ENGINE_R_GET_HANDLE_FAILED ,"could not obtain hardware handle"}, | ||
| 147 | {ENGINE_R_ID_OR_NAME_MISSING ,"'id' or 'name' missing"}, | ||
| 148 | {ENGINE_R_INIT_FAILED ,"init failed"}, | ||
| 149 | {ENGINE_R_INTERNAL_LIST_ERROR ,"internal list error"}, | ||
| 150 | {ENGINE_R_MISSING_KEY_COMPONENTS ,"missing key components"}, | ||
| 151 | {ENGINE_R_NOT_INITIALISED ,"not initialised"}, | ||
| 152 | {ENGINE_R_NOT_LOADED ,"not loaded"}, | ||
| 153 | {ENGINE_R_NO_CALLBACK ,"no callback"}, | ||
| 154 | {ENGINE_R_NO_CONTROL_FUNCTION ,"no control function"}, | ||
| 155 | {ENGINE_R_NO_KEY ,"no key"}, | ||
| 156 | {ENGINE_R_NO_LOAD_FUNCTION ,"no load function"}, | ||
| 157 | {ENGINE_R_NO_REFERENCE ,"no reference"}, | ||
| 158 | {ENGINE_R_NO_SUCH_ENGINE ,"no such engine"}, | ||
| 159 | {ENGINE_R_NO_UNLOAD_FUNCTION ,"no unload function"}, | ||
| 160 | {ENGINE_R_PROVIDE_PARAMETERS ,"provide parameters"}, | ||
| 161 | {ENGINE_R_REQUEST_FAILED ,"request failed"}, | ||
| 162 | {ENGINE_R_REQUEST_FALLBACK ,"request fallback"}, | ||
| 163 | {ENGINE_R_SIZE_TOO_LARGE_OR_TOO_SMALL ,"size too large or too small"}, | ||
| 164 | {ENGINE_R_UNIT_FAILURE ,"unit failure"}, | ||
| 165 | {0,NULL} | ||
| 166 | }; | ||
| 167 | |||
| 168 | #endif | ||
| 169 | |||
| 170 | void ERR_load_ENGINE_strings(void) | ||
| 171 | { | ||
| 172 | static int init=1; | ||
| 173 | |||
| 174 | if (init) | ||
| 175 | { | ||
| 176 | init=0; | ||
| 177 | #ifndef NO_ERR | ||
| 178 | ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_functs); | ||
| 179 | ERR_load_strings(ERR_LIB_ENGINE,ENGINE_str_reasons); | ||
| 180 | #endif | ||
| 181 | |||
| 182 | } | ||
| 183 | } | ||
diff --git a/src/lib/libssl/src/crypto/engine/engine_int.h b/src/lib/libssl/src/crypto/engine/engine_int.h deleted file mode 100644 index 447fa2a320..0000000000 --- a/src/lib/libssl/src/crypto/engine/engine_int.h +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_int.h */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef HEADER_ENGINE_INT_H | ||
| 60 | #define HEADER_ENGINE_INT_H | ||
| 61 | |||
| 62 | #include <openssl/rsa.h> | ||
| 63 | #include <openssl/dsa.h> | ||
| 64 | #include <openssl/dh.h> | ||
| 65 | #include <openssl/rand.h> | ||
| 66 | #include <openssl/bn.h> | ||
| 67 | #include <openssl/evp.h> | ||
| 68 | |||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 73 | /* Bitwise OR-able values for the "flags" variable in ENGINE. */ | ||
| 74 | #define ENGINE_FLAGS_MALLOCED 0x0001 | ||
| 75 | |||
| 76 | #ifndef HEADER_ENGINE_H | ||
| 77 | /* Regrettably, we need to reproduce the "BN" function types here | ||
| 78 | * because there is no such "BIGNUM_METHOD" as there is with RSA, | ||
| 79 | * DSA, etc. We do this so that we don't have a case where engine.h | ||
| 80 | * and engine_int.h conflict with each other. */ | ||
| 81 | typedef int (*BN_MOD_EXP)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 82 | const BIGNUM *m, BN_CTX *ctx); | ||
| 83 | |||
| 84 | /* private key operation for RSA, provided seperately in case other | ||
| 85 | * RSA implementations wish to use it. */ | ||
| 86 | typedef int (*BN_MOD_EXP_CRT)(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 87 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 88 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 89 | |||
| 90 | /* Generic function pointer */ | ||
| 91 | typedef int (*ENGINE_GEN_FUNC_PTR)(); | ||
| 92 | /* Generic function pointer taking no arguments */ | ||
| 93 | typedef int (*ENGINE_GEN_INT_FUNC_PTR)(void); | ||
| 94 | /* Specific control function pointer */ | ||
| 95 | typedef int (*ENGINE_CTRL_FUNC_PTR)(int cmd, long i, void *p, void (*f)()); | ||
| 96 | |||
| 97 | #endif | ||
| 98 | |||
| 99 | /* This is a structure for storing implementations of various crypto | ||
| 100 | * algorithms and functions. */ | ||
| 101 | typedef struct engine_st | ||
| 102 | { | ||
| 103 | const char *id; | ||
| 104 | const char *name; | ||
| 105 | RSA_METHOD *rsa_meth; | ||
| 106 | DSA_METHOD *dsa_meth; | ||
| 107 | DH_METHOD *dh_meth; | ||
| 108 | RAND_METHOD *rand_meth; | ||
| 109 | BN_MOD_EXP bn_mod_exp; | ||
| 110 | BN_MOD_EXP_CRT bn_mod_exp_crt; | ||
| 111 | int (*init)(void); | ||
| 112 | int (*finish)(void); | ||
| 113 | int (*ctrl)(int cmd, long i, void *p, void (*f)()); | ||
| 114 | EVP_PKEY *(*load_privkey)(const char *key_id, const char *passphrase); | ||
| 115 | EVP_PKEY *(*load_pubkey)(const char *key_id, const char *passphrase); | ||
| 116 | int flags; | ||
| 117 | /* reference count on the structure itself */ | ||
| 118 | int struct_ref; | ||
| 119 | /* reference count on usability of the engine type. NB: This | ||
| 120 | * controls the loading and initialisation of any functionlity | ||
| 121 | * required by this engine, whereas the previous count is | ||
| 122 | * simply to cope with (de)allocation of this structure. Hence, | ||
| 123 | * running_ref <= struct_ref at all times. */ | ||
| 124 | int funct_ref; | ||
| 125 | /* Used to maintain the linked-list of engines. */ | ||
| 126 | struct engine_st *prev; | ||
| 127 | struct engine_st *next; | ||
| 128 | } ENGINE; | ||
| 129 | |||
| 130 | /* BUILT-IN ENGINES. (these functions are only ever called once and | ||
| 131 | * do not return references - they are purely for bootstrapping). */ | ||
| 132 | |||
| 133 | /* Returns a structure of software only methods (the default). */ | ||
| 134 | ENGINE *ENGINE_openssl(); | ||
| 135 | |||
| 136 | #ifndef NO_HW | ||
| 137 | |||
| 138 | #ifndef NO_HW_CSWIFT | ||
| 139 | /* Returns a structure of cswift methods ... NB: This can exist and be | ||
| 140 | * "used" even on non-cswift systems because the "init" will fail if the | ||
| 141 | * card/library are not found. */ | ||
| 142 | ENGINE *ENGINE_cswift(); | ||
| 143 | #endif /* !NO_HW_CSWIFT */ | ||
| 144 | |||
| 145 | #ifndef NO_HW_NCIPHER | ||
| 146 | ENGINE *ENGINE_ncipher(); | ||
| 147 | #endif /* !NO_HW_NCIPHER */ | ||
| 148 | |||
| 149 | #ifndef NO_HW_ATALLA | ||
| 150 | /* Returns a structure of atalla methods. */ | ||
| 151 | ENGINE *ENGINE_atalla(); | ||
| 152 | #endif /* !NO_HW_ATALLA */ | ||
| 153 | |||
| 154 | #endif /* !NO_HW */ | ||
| 155 | |||
| 156 | #ifdef __cplusplus | ||
| 157 | } | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #endif /* HEADER_ENGINE_INT_H */ | ||
diff --git a/src/lib/libssl/src/crypto/engine/engine_lib.c b/src/lib/libssl/src/crypto/engine/engine_lib.c deleted file mode 100644 index d6e9109f6e..0000000000 --- a/src/lib/libssl/src/crypto/engine/engine_lib.c +++ /dev/null | |||
| @@ -1,489 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_lib.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <openssl/crypto.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "engine_int.h" | ||
| 62 | #include <openssl/engine.h> | ||
| 63 | |||
| 64 | /* These pointers each have their own "functional reference" when they | ||
| 65 | * are non-NULL. Similarly, when they are retrieved by a call to | ||
| 66 | * ENGINE_get_default_[RSA|DSA|...] the returned pointer is also a | ||
| 67 | * reference and the caller is responsible for freeing that when they | ||
| 68 | * are finished with it (with a call to ENGINE_finish() *NOT* just | ||
| 69 | * ENGINE_free()!!!!!!). */ | ||
| 70 | static ENGINE *engine_def_rsa = NULL; | ||
| 71 | static ENGINE *engine_def_dsa = NULL; | ||
| 72 | static ENGINE *engine_def_dh = NULL; | ||
| 73 | static ENGINE *engine_def_rand = NULL; | ||
| 74 | static ENGINE *engine_def_bn_mod_exp = NULL; | ||
| 75 | static ENGINE *engine_def_bn_mod_exp_crt = NULL; | ||
| 76 | /* A static "once-only" flag used to control if/when the above were | ||
| 77 | * initialised to suitable start-up defaults. */ | ||
| 78 | static int engine_def_flag = 0; | ||
| 79 | |||
| 80 | /* This is used in certain static utility functions to save code | ||
| 81 | * repetition for per-algorithm functions. */ | ||
| 82 | typedef enum { | ||
| 83 | ENGINE_TYPE_RSA, | ||
| 84 | ENGINE_TYPE_DSA, | ||
| 85 | ENGINE_TYPE_DH, | ||
| 86 | ENGINE_TYPE_RAND, | ||
| 87 | ENGINE_TYPE_BN_MOD_EXP, | ||
| 88 | ENGINE_TYPE_BN_MOD_EXP_CRT | ||
| 89 | } ENGINE_TYPE; | ||
| 90 | |||
| 91 | static void engine_def_check_util(ENGINE **def, ENGINE *val) | ||
| 92 | { | ||
| 93 | *def = val; | ||
| 94 | val->struct_ref++; | ||
| 95 | val->funct_ref++; | ||
| 96 | } | ||
| 97 | |||
| 98 | /* In a slight break with convention - this static function must be | ||
| 99 | * called *outside* any locking of CRYPTO_LOCK_ENGINE. */ | ||
| 100 | static void engine_def_check(void) | ||
| 101 | { | ||
| 102 | ENGINE *e; | ||
| 103 | if(engine_def_flag) | ||
| 104 | return; | ||
| 105 | e = ENGINE_get_first(); | ||
| 106 | if(e == NULL) | ||
| 107 | /* The list is empty ... not much we can do! */ | ||
| 108 | return; | ||
| 109 | /* We have a structural reference, see if getting a functional | ||
| 110 | * reference is possible. This is done to cope with init errors | ||
| 111 | * in the engine - the following locked code does a bunch of | ||
| 112 | * manual "ENGINE_init"s which do *not* allow such an init | ||
| 113 | * error so this is worth doing. */ | ||
| 114 | if(ENGINE_init(e)) | ||
| 115 | { | ||
| 116 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 117 | /* Doing another check here prevents an obvious race | ||
| 118 | * condition because the whole function itself cannot | ||
| 119 | * be locked. */ | ||
| 120 | if(engine_def_flag) | ||
| 121 | goto skip_set_defaults; | ||
| 122 | /* OK, we got a functional reference, so we get one each | ||
| 123 | * for the defaults too. */ | ||
| 124 | engine_def_check_util(&engine_def_rsa, e); | ||
| 125 | engine_def_check_util(&engine_def_dsa, e); | ||
| 126 | engine_def_check_util(&engine_def_dh, e); | ||
| 127 | engine_def_check_util(&engine_def_rand, e); | ||
| 128 | engine_def_check_util(&engine_def_bn_mod_exp, e); | ||
| 129 | engine_def_check_util(&engine_def_bn_mod_exp_crt, e); | ||
| 130 | engine_def_flag = 1; | ||
| 131 | skip_set_defaults: | ||
| 132 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 133 | /* The "if" needs to be balanced out. */ | ||
| 134 | ENGINE_finish(e); | ||
| 135 | } | ||
| 136 | /* We need to balance out the fact we obtained a structural | ||
| 137 | * reference to begin with from ENGINE_get_first(). */ | ||
| 138 | ENGINE_free(e); | ||
| 139 | } | ||
| 140 | |||
| 141 | /* Initialise a engine type for use (or up its functional reference count | ||
| 142 | * if it's already in use). */ | ||
| 143 | int ENGINE_init(ENGINE *e) | ||
| 144 | { | ||
| 145 | int to_return = 1; | ||
| 146 | |||
| 147 | if(e == NULL) | ||
| 148 | { | ||
| 149 | ENGINEerr(ENGINE_F_ENGINE_INIT,ERR_R_PASSED_NULL_PARAMETER); | ||
| 150 | return 0; | ||
| 151 | } | ||
| 152 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 153 | if((e->funct_ref == 0) && e->init) | ||
| 154 | /* This is the first functional reference and the engine | ||
| 155 | * requires initialisation so we do it now. */ | ||
| 156 | to_return = e->init(); | ||
| 157 | if(to_return) | ||
| 158 | { | ||
| 159 | /* OK, we return a functional reference which is also a | ||
| 160 | * structural reference. */ | ||
| 161 | e->struct_ref++; | ||
| 162 | e->funct_ref++; | ||
| 163 | } | ||
| 164 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 165 | return to_return; | ||
| 166 | } | ||
| 167 | |||
| 168 | /* Free a functional reference to a engine type */ | ||
| 169 | int ENGINE_finish(ENGINE *e) | ||
| 170 | { | ||
| 171 | int to_return = 1; | ||
| 172 | |||
| 173 | if(e == NULL) | ||
| 174 | { | ||
| 175 | ENGINEerr(ENGINE_F_ENGINE_FINISH,ERR_R_PASSED_NULL_PARAMETER); | ||
| 176 | return 0; | ||
| 177 | } | ||
| 178 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 179 | if((e->funct_ref == 1) && e->finish) | ||
| 180 | #if 0 | ||
| 181 | /* This is the last functional reference and the engine | ||
| 182 | * requires cleanup so we do it now. */ | ||
| 183 | to_return = e->finish(); | ||
| 184 | if(to_return) | ||
| 185 | { | ||
| 186 | /* Cleanup the functional reference which is also a | ||
| 187 | * structural reference. */ | ||
| 188 | e->struct_ref--; | ||
| 189 | e->funct_ref--; | ||
| 190 | } | ||
| 191 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 192 | #else | ||
| 193 | /* I'm going to deliberately do a convoluted version of this | ||
| 194 | * piece of code because we don't want "finish" functions | ||
| 195 | * being called inside a locked block of code, if at all | ||
| 196 | * possible. I'd rather have this call take an extra couple | ||
| 197 | * of ticks than have throughput serialised on a externally- | ||
| 198 | * provided callback function that may conceivably never come | ||
| 199 | * back. :-( */ | ||
| 200 | { | ||
| 201 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 202 | /* CODE ALERT: This *IS* supposed to be "=" and NOT "==" :-) */ | ||
| 203 | if((to_return = e->finish())) | ||
| 204 | { | ||
| 205 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 206 | /* Cleanup the functional reference which is also a | ||
| 207 | * structural reference. */ | ||
| 208 | e->struct_ref--; | ||
| 209 | e->funct_ref--; | ||
| 210 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 211 | } | ||
| 212 | } | ||
| 213 | else | ||
| 214 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 215 | #endif | ||
| 216 | return to_return; | ||
| 217 | } | ||
| 218 | |||
| 219 | EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, | ||
| 220 | const char *passphrase) | ||
| 221 | { | ||
| 222 | EVP_PKEY *pkey; | ||
| 223 | |||
| 224 | if(e == NULL) | ||
| 225 | { | ||
| 226 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 227 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 228 | return 0; | ||
| 229 | } | ||
| 230 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 231 | if(e->funct_ref == 0) | ||
| 232 | { | ||
| 233 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 234 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 235 | ENGINE_R_NOT_INITIALISED); | ||
| 236 | return 0; | ||
| 237 | } | ||
| 238 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 239 | if (!e->load_privkey) | ||
| 240 | { | ||
| 241 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 242 | ENGINE_R_NO_LOAD_FUNCTION); | ||
| 243 | return 0; | ||
| 244 | } | ||
| 245 | pkey = e->load_privkey(key_id, passphrase); | ||
| 246 | if (!pkey) | ||
| 247 | { | ||
| 248 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PRIVATE_KEY, | ||
| 249 | ENGINE_R_FAILED_LOADING_PRIVATE_KEY); | ||
| 250 | return 0; | ||
| 251 | } | ||
| 252 | return pkey; | ||
| 253 | } | ||
| 254 | |||
| 255 | EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, | ||
| 256 | const char *passphrase) | ||
| 257 | { | ||
| 258 | EVP_PKEY *pkey; | ||
| 259 | |||
| 260 | if(e == NULL) | ||
| 261 | { | ||
| 262 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 263 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 264 | return 0; | ||
| 265 | } | ||
| 266 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 267 | if(e->funct_ref == 0) | ||
| 268 | { | ||
| 269 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 270 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 271 | ENGINE_R_NOT_INITIALISED); | ||
| 272 | return 0; | ||
| 273 | } | ||
| 274 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 275 | if (!e->load_pubkey) | ||
| 276 | { | ||
| 277 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 278 | ENGINE_R_NO_LOAD_FUNCTION); | ||
| 279 | return 0; | ||
| 280 | } | ||
| 281 | pkey = e->load_pubkey(key_id, passphrase); | ||
| 282 | if (!pkey) | ||
| 283 | { | ||
| 284 | ENGINEerr(ENGINE_F_ENGINE_LOAD_PUBLIC_KEY, | ||
| 285 | ENGINE_R_FAILED_LOADING_PUBLIC_KEY); | ||
| 286 | return 0; | ||
| 287 | } | ||
| 288 | return pkey; | ||
| 289 | } | ||
| 290 | |||
| 291 | int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)()) | ||
| 292 | { | ||
| 293 | if(e == NULL) | ||
| 294 | { | ||
| 295 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ERR_R_PASSED_NULL_PARAMETER); | ||
| 296 | return 0; | ||
| 297 | } | ||
| 298 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 299 | if(e->struct_ref == 0) | ||
| 300 | { | ||
| 301 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 302 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_REFERENCE); | ||
| 303 | return 0; | ||
| 304 | } | ||
| 305 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 306 | if (!e->ctrl) | ||
| 307 | { | ||
| 308 | ENGINEerr(ENGINE_F_ENGINE_CTRL,ENGINE_R_NO_CONTROL_FUNCTION); | ||
| 309 | return 0; | ||
| 310 | } | ||
| 311 | return e->ctrl(cmd, i, p, f); | ||
| 312 | } | ||
| 313 | |||
| 314 | static ENGINE *engine_get_default_type(ENGINE_TYPE t) | ||
| 315 | { | ||
| 316 | ENGINE *ret = NULL; | ||
| 317 | |||
| 318 | /* engine_def_check is lean and mean and won't replace any | ||
| 319 | * prior default engines ... so we must ensure that it is always | ||
| 320 | * the first function to get to touch the default values. */ | ||
| 321 | engine_def_check(); | ||
| 322 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 323 | switch(t) | ||
| 324 | { | ||
| 325 | case ENGINE_TYPE_RSA: | ||
| 326 | ret = engine_def_rsa; break; | ||
| 327 | case ENGINE_TYPE_DSA: | ||
| 328 | ret = engine_def_dsa; break; | ||
| 329 | case ENGINE_TYPE_DH: | ||
| 330 | ret = engine_def_dh; break; | ||
| 331 | case ENGINE_TYPE_RAND: | ||
| 332 | ret = engine_def_rand; break; | ||
| 333 | case ENGINE_TYPE_BN_MOD_EXP: | ||
| 334 | ret = engine_def_bn_mod_exp; break; | ||
| 335 | case ENGINE_TYPE_BN_MOD_EXP_CRT: | ||
| 336 | ret = engine_def_bn_mod_exp_crt; break; | ||
| 337 | } | ||
| 338 | /* Unforunately we can't do this work outside the lock with a | ||
| 339 | * call to ENGINE_init() because that would leave a race | ||
| 340 | * condition open. */ | ||
| 341 | if(ret) | ||
| 342 | { | ||
| 343 | ret->struct_ref++; | ||
| 344 | ret->funct_ref++; | ||
| 345 | } | ||
| 346 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 347 | return ret; | ||
| 348 | } | ||
| 349 | |||
| 350 | ENGINE *ENGINE_get_default_RSA(void) | ||
| 351 | { | ||
| 352 | return engine_get_default_type(ENGINE_TYPE_RSA); | ||
| 353 | } | ||
| 354 | |||
| 355 | ENGINE *ENGINE_get_default_DSA(void) | ||
| 356 | { | ||
| 357 | return engine_get_default_type(ENGINE_TYPE_DSA); | ||
| 358 | } | ||
| 359 | |||
| 360 | ENGINE *ENGINE_get_default_DH(void) | ||
| 361 | { | ||
| 362 | return engine_get_default_type(ENGINE_TYPE_DH); | ||
| 363 | } | ||
| 364 | |||
| 365 | ENGINE *ENGINE_get_default_RAND(void) | ||
| 366 | { | ||
| 367 | return engine_get_default_type(ENGINE_TYPE_RAND); | ||
| 368 | } | ||
| 369 | |||
| 370 | ENGINE *ENGINE_get_default_BN_mod_exp(void) | ||
| 371 | { | ||
| 372 | return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP); | ||
| 373 | } | ||
| 374 | |||
| 375 | ENGINE *ENGINE_get_default_BN_mod_exp_crt(void) | ||
| 376 | { | ||
| 377 | return engine_get_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT); | ||
| 378 | } | ||
| 379 | |||
| 380 | static int engine_set_default_type(ENGINE_TYPE t, ENGINE *e) | ||
| 381 | { | ||
| 382 | ENGINE *old = NULL; | ||
| 383 | |||
| 384 | if(e == NULL) | ||
| 385 | { | ||
| 386 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 387 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 388 | return 0; | ||
| 389 | } | ||
| 390 | /* engine_def_check is lean and mean and won't replace any | ||
| 391 | * prior default engines ... so we must ensure that it is always | ||
| 392 | * the first function to get to touch the default values. */ | ||
| 393 | engine_def_check(); | ||
| 394 | /* Attempt to get a functional reference (we need one anyway, but | ||
| 395 | * also, 'e' may be just a structural reference being passed in so | ||
| 396 | * this call may actually be the first). */ | ||
| 397 | if(!ENGINE_init(e)) | ||
| 398 | { | ||
| 399 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 400 | ENGINE_R_INIT_FAILED); | ||
| 401 | return 0; | ||
| 402 | } | ||
| 403 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 404 | switch(t) | ||
| 405 | { | ||
| 406 | case ENGINE_TYPE_RSA: | ||
| 407 | old = engine_def_rsa; | ||
| 408 | engine_def_rsa = e; break; | ||
| 409 | case ENGINE_TYPE_DSA: | ||
| 410 | old = engine_def_dsa; | ||
| 411 | engine_def_dsa = e; break; | ||
| 412 | case ENGINE_TYPE_DH: | ||
| 413 | old = engine_def_dh; | ||
| 414 | engine_def_dh = e; break; | ||
| 415 | case ENGINE_TYPE_RAND: | ||
| 416 | old = engine_def_rand; | ||
| 417 | engine_def_rand = e; break; | ||
| 418 | case ENGINE_TYPE_BN_MOD_EXP: | ||
| 419 | old = engine_def_bn_mod_exp; | ||
| 420 | engine_def_bn_mod_exp = e; break; | ||
| 421 | case ENGINE_TYPE_BN_MOD_EXP_CRT: | ||
| 422 | old = engine_def_bn_mod_exp_crt; | ||
| 423 | engine_def_bn_mod_exp_crt = e; break; | ||
| 424 | } | ||
| 425 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 426 | /* If we've replaced a previous value, then we need to remove the | ||
| 427 | * functional reference we had. */ | ||
| 428 | if(old && !ENGINE_finish(old)) | ||
| 429 | { | ||
| 430 | ENGINEerr(ENGINE_F_ENGINE_SET_DEFAULT_TYPE, | ||
| 431 | ENGINE_R_FINISH_FAILED); | ||
| 432 | return 0; | ||
| 433 | } | ||
| 434 | return 1; | ||
| 435 | } | ||
| 436 | |||
| 437 | int ENGINE_set_default_RSA(ENGINE *e) | ||
| 438 | { | ||
| 439 | return engine_set_default_type(ENGINE_TYPE_RSA, e); | ||
| 440 | } | ||
| 441 | |||
| 442 | int ENGINE_set_default_DSA(ENGINE *e) | ||
| 443 | { | ||
| 444 | return engine_set_default_type(ENGINE_TYPE_DSA, e); | ||
| 445 | } | ||
| 446 | |||
| 447 | int ENGINE_set_default_DH(ENGINE *e) | ||
| 448 | { | ||
| 449 | return engine_set_default_type(ENGINE_TYPE_DH, e); | ||
| 450 | } | ||
| 451 | |||
| 452 | int ENGINE_set_default_RAND(ENGINE *e) | ||
| 453 | { | ||
| 454 | return engine_set_default_type(ENGINE_TYPE_RAND, e); | ||
| 455 | } | ||
| 456 | |||
| 457 | int ENGINE_set_default_BN_mod_exp(ENGINE *e) | ||
| 458 | { | ||
| 459 | return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP, e); | ||
| 460 | } | ||
| 461 | |||
| 462 | int ENGINE_set_default_BN_mod_exp_crt(ENGINE *e) | ||
| 463 | { | ||
| 464 | return engine_set_default_type(ENGINE_TYPE_BN_MOD_EXP_CRT, e); | ||
| 465 | } | ||
| 466 | |||
| 467 | int ENGINE_set_default(ENGINE *e, unsigned int flags) | ||
| 468 | { | ||
| 469 | if((flags & ENGINE_METHOD_RSA) && e->rsa_meth && | ||
| 470 | !ENGINE_set_default_RSA(e)) | ||
| 471 | return 0; | ||
| 472 | if((flags & ENGINE_METHOD_DSA) && e->dsa_meth && | ||
| 473 | !ENGINE_set_default_DSA(e)) | ||
| 474 | return 0; | ||
| 475 | if((flags & ENGINE_METHOD_DH) && e->dh_meth && | ||
| 476 | !ENGINE_set_default_DH(e)) | ||
| 477 | return 0; | ||
| 478 | if((flags & ENGINE_METHOD_RAND) && e->rand_meth && | ||
| 479 | !ENGINE_set_default_RAND(e)) | ||
| 480 | return 0; | ||
| 481 | if((flags & ENGINE_METHOD_BN_MOD_EXP) && e->bn_mod_exp && | ||
| 482 | !ENGINE_set_default_BN_mod_exp(e)) | ||
| 483 | return 0; | ||
| 484 | if((flags & ENGINE_METHOD_BN_MOD_EXP_CRT) && e->bn_mod_exp_crt && | ||
| 485 | !ENGINE_set_default_BN_mod_exp_crt(e)) | ||
| 486 | return 0; | ||
| 487 | return 1; | ||
| 488 | } | ||
| 489 | |||
diff --git a/src/lib/libssl/src/crypto/engine/engine_list.c b/src/lib/libssl/src/crypto/engine/engine_list.c deleted file mode 100644 index d764c60661..0000000000 --- a/src/lib/libssl/src/crypto/engine/engine_list.c +++ /dev/null | |||
| @@ -1,675 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_list.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <openssl/crypto.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "engine_int.h" | ||
| 62 | #include <openssl/engine.h> | ||
| 63 | |||
| 64 | /* The linked-list of pointers to engine types. engine_list_head | ||
| 65 | * incorporates an implicit structural reference but engine_list_tail | ||
| 66 | * does not - the latter is a computational niceity and only points | ||
| 67 | * to something that is already pointed to by its predecessor in the | ||
| 68 | * list (or engine_list_head itself). In the same way, the use of the | ||
| 69 | * "prev" pointer in each ENGINE is to save excessive list iteration, | ||
| 70 | * it doesn't correspond to an extra structural reference. Hence, | ||
| 71 | * engine_list_head, and each non-null "next" pointer account for | ||
| 72 | * the list itself assuming exactly 1 structural reference on each | ||
| 73 | * list member. */ | ||
| 74 | static ENGINE *engine_list_head = NULL; | ||
| 75 | static ENGINE *engine_list_tail = NULL; | ||
| 76 | /* A boolean switch, used to ensure we only initialise once. This | ||
| 77 | * is needed because the engine list may genuinely become empty during | ||
| 78 | * use (so we can't use engine_list_head as an indicator for example. */ | ||
| 79 | static int engine_list_flag = 0; | ||
| 80 | |||
| 81 | /* These static functions starting with a lower case "engine_" always | ||
| 82 | * take place when CRYPTO_LOCK_ENGINE has been locked up. */ | ||
| 83 | static int engine_list_add(ENGINE *e) | ||
| 84 | { | ||
| 85 | int conflict = 0; | ||
| 86 | ENGINE *iterator = NULL; | ||
| 87 | |||
| 88 | if(e == NULL) | ||
| 89 | { | ||
| 90 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 91 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 92 | return 0; | ||
| 93 | } | ||
| 94 | iterator = engine_list_head; | ||
| 95 | while(iterator && !conflict) | ||
| 96 | { | ||
| 97 | conflict = (strcmp(iterator->id, e->id) == 0); | ||
| 98 | iterator = iterator->next; | ||
| 99 | } | ||
| 100 | if(conflict) | ||
| 101 | { | ||
| 102 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 103 | ENGINE_R_CONFLICTING_ENGINE_ID); | ||
| 104 | return 0; | ||
| 105 | } | ||
| 106 | if(engine_list_head == NULL) | ||
| 107 | { | ||
| 108 | /* We are adding to an empty list. */ | ||
| 109 | if(engine_list_tail) | ||
| 110 | { | ||
| 111 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 112 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 113 | return 0; | ||
| 114 | } | ||
| 115 | engine_list_head = e; | ||
| 116 | e->prev = NULL; | ||
| 117 | } | ||
| 118 | else | ||
| 119 | { | ||
| 120 | /* We are adding to the tail of an existing list. */ | ||
| 121 | if((engine_list_tail == NULL) || | ||
| 122 | (engine_list_tail->next != NULL)) | ||
| 123 | { | ||
| 124 | ENGINEerr(ENGINE_F_ENGINE_LIST_ADD, | ||
| 125 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 126 | return 0; | ||
| 127 | } | ||
| 128 | engine_list_tail->next = e; | ||
| 129 | e->prev = engine_list_tail; | ||
| 130 | } | ||
| 131 | /* Having the engine in the list assumes a structural | ||
| 132 | * reference. */ | ||
| 133 | e->struct_ref++; | ||
| 134 | /* However it came to be, e is the last item in the list. */ | ||
| 135 | engine_list_tail = e; | ||
| 136 | e->next = NULL; | ||
| 137 | return 1; | ||
| 138 | } | ||
| 139 | |||
| 140 | static int engine_list_remove(ENGINE *e) | ||
| 141 | { | ||
| 142 | ENGINE *iterator; | ||
| 143 | |||
| 144 | if(e == NULL) | ||
| 145 | { | ||
| 146 | ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE, | ||
| 147 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | /* We need to check that e is in our linked list! */ | ||
| 151 | iterator = engine_list_head; | ||
| 152 | while(iterator && (iterator != e)) | ||
| 153 | iterator = iterator->next; | ||
| 154 | if(iterator == NULL) | ||
| 155 | { | ||
| 156 | ENGINEerr(ENGINE_F_ENGINE_LIST_REMOVE, | ||
| 157 | ENGINE_R_ENGINE_IS_NOT_IN_LIST); | ||
| 158 | return 0; | ||
| 159 | } | ||
| 160 | /* un-link e from the chain. */ | ||
| 161 | if(e->next) | ||
| 162 | e->next->prev = e->prev; | ||
| 163 | if(e->prev) | ||
| 164 | e->prev->next = e->next; | ||
| 165 | /* Correct our head/tail if necessary. */ | ||
| 166 | if(engine_list_head == e) | ||
| 167 | engine_list_head = e->next; | ||
| 168 | if(engine_list_tail == e) | ||
| 169 | engine_list_tail = e->prev; | ||
| 170 | /* remove our structural reference. */ | ||
| 171 | e->struct_ref--; | ||
| 172 | return 1; | ||
| 173 | } | ||
| 174 | |||
| 175 | /* This check always takes place with CRYPTO_LOCK_ENGINE locked up | ||
| 176 | * so we're synchronised, but we can't call anything that tries to | ||
| 177 | * lock it again! :-) NB: For convenience (and code-clarity) we | ||
| 178 | * don't output errors for failures of the engine_list_add function | ||
| 179 | * as it will generate errors itself. */ | ||
| 180 | static int engine_internal_check(void) | ||
| 181 | { | ||
| 182 | if(engine_list_flag) | ||
| 183 | return 1; | ||
| 184 | /* This is our first time up, we need to populate the list | ||
| 185 | * with our statically compiled-in engines. */ | ||
| 186 | if(!engine_list_add(ENGINE_openssl())) | ||
| 187 | return 0; | ||
| 188 | #ifndef NO_HW | ||
| 189 | #ifndef NO_HW_CSWIFT | ||
| 190 | if(!engine_list_add(ENGINE_cswift())) | ||
| 191 | return 0; | ||
| 192 | #endif /* !NO_HW_CSWIFT */ | ||
| 193 | #ifndef NO_HW_NCIPHER | ||
| 194 | if(!engine_list_add(ENGINE_ncipher())) | ||
| 195 | return 0; | ||
| 196 | #endif /* !NO_HW_NCIPHER */ | ||
| 197 | #ifndef NO_HW_ATALLA | ||
| 198 | if(!engine_list_add(ENGINE_atalla())) | ||
| 199 | return 0; | ||
| 200 | #endif /* !NO_HW_ATALLA */ | ||
| 201 | #endif /* !NO_HW */ | ||
| 202 | engine_list_flag = 1; | ||
| 203 | return 1; | ||
| 204 | } | ||
| 205 | |||
| 206 | /* Get the first/last "ENGINE" type available. */ | ||
| 207 | ENGINE *ENGINE_get_first(void) | ||
| 208 | { | ||
| 209 | ENGINE *ret = NULL; | ||
| 210 | |||
| 211 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 212 | if(engine_internal_check()) | ||
| 213 | { | ||
| 214 | ret = engine_list_head; | ||
| 215 | if(ret) | ||
| 216 | ret->struct_ref++; | ||
| 217 | } | ||
| 218 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 219 | return ret; | ||
| 220 | } | ||
| 221 | ENGINE *ENGINE_get_last(void) | ||
| 222 | { | ||
| 223 | ENGINE *ret = NULL; | ||
| 224 | |||
| 225 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 226 | if(engine_internal_check()) | ||
| 227 | { | ||
| 228 | ret = engine_list_tail; | ||
| 229 | if(ret) | ||
| 230 | ret->struct_ref++; | ||
| 231 | } | ||
| 232 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 233 | return ret; | ||
| 234 | } | ||
| 235 | |||
| 236 | /* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ | ||
| 237 | ENGINE *ENGINE_get_next(ENGINE *e) | ||
| 238 | { | ||
| 239 | ENGINE *ret = NULL; | ||
| 240 | if(e == NULL) | ||
| 241 | { | ||
| 242 | ENGINEerr(ENGINE_F_ENGINE_GET_NEXT, | ||
| 243 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 244 | return 0; | ||
| 245 | } | ||
| 246 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 247 | ret = e->next; | ||
| 248 | e->struct_ref--; | ||
| 249 | if(ret) | ||
| 250 | ret->struct_ref++; | ||
| 251 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 252 | return ret; | ||
| 253 | } | ||
| 254 | ENGINE *ENGINE_get_prev(ENGINE *e) | ||
| 255 | { | ||
| 256 | ENGINE *ret = NULL; | ||
| 257 | if(e == NULL) | ||
| 258 | { | ||
| 259 | ENGINEerr(ENGINE_F_ENGINE_GET_PREV, | ||
| 260 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 261 | return 0; | ||
| 262 | } | ||
| 263 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 264 | ret = e->prev; | ||
| 265 | e->struct_ref--; | ||
| 266 | if(ret) | ||
| 267 | ret->struct_ref++; | ||
| 268 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 269 | return ret; | ||
| 270 | } | ||
| 271 | |||
| 272 | /* Add another "ENGINE" type into the list. */ | ||
| 273 | int ENGINE_add(ENGINE *e) | ||
| 274 | { | ||
| 275 | int to_return = 1; | ||
| 276 | if(e == NULL) | ||
| 277 | { | ||
| 278 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 279 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 280 | return 0; | ||
| 281 | } | ||
| 282 | if((e->id == NULL) || (e->name == NULL)) | ||
| 283 | { | ||
| 284 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 285 | ENGINE_R_ID_OR_NAME_MISSING); | ||
| 286 | } | ||
| 287 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 288 | if(!engine_internal_check() || !engine_list_add(e)) | ||
| 289 | { | ||
| 290 | ENGINEerr(ENGINE_F_ENGINE_ADD, | ||
| 291 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 292 | to_return = 0; | ||
| 293 | } | ||
| 294 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 295 | return to_return; | ||
| 296 | } | ||
| 297 | |||
| 298 | /* Remove an existing "ENGINE" type from the array. */ | ||
| 299 | int ENGINE_remove(ENGINE *e) | ||
| 300 | { | ||
| 301 | int to_return = 1; | ||
| 302 | if(e == NULL) | ||
| 303 | { | ||
| 304 | ENGINEerr(ENGINE_F_ENGINE_REMOVE, | ||
| 305 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 306 | return 0; | ||
| 307 | } | ||
| 308 | CRYPTO_w_lock(CRYPTO_LOCK_ENGINE); | ||
| 309 | if(!engine_internal_check() || !engine_list_remove(e)) | ||
| 310 | { | ||
| 311 | ENGINEerr(ENGINE_F_ENGINE_REMOVE, | ||
| 312 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 313 | to_return = 0; | ||
| 314 | } | ||
| 315 | CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE); | ||
| 316 | return to_return; | ||
| 317 | } | ||
| 318 | |||
| 319 | ENGINE *ENGINE_by_id(const char *id) | ||
| 320 | { | ||
| 321 | ENGINE *iterator = NULL; | ||
| 322 | if(id == NULL) | ||
| 323 | { | ||
| 324 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 325 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 326 | return NULL; | ||
| 327 | } | ||
| 328 | CRYPTO_r_lock(CRYPTO_LOCK_ENGINE); | ||
| 329 | if(!engine_internal_check()) | ||
| 330 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 331 | ENGINE_R_INTERNAL_LIST_ERROR); | ||
| 332 | else | ||
| 333 | { | ||
| 334 | iterator = engine_list_head; | ||
| 335 | while(iterator && (strcmp(id, iterator->id) != 0)) | ||
| 336 | iterator = iterator->next; | ||
| 337 | if(iterator) | ||
| 338 | /* We need to return a structural reference */ | ||
| 339 | iterator->struct_ref++; | ||
| 340 | } | ||
| 341 | CRYPTO_r_unlock(CRYPTO_LOCK_ENGINE); | ||
| 342 | if(iterator == NULL) | ||
| 343 | ENGINEerr(ENGINE_F_ENGINE_BY_ID, | ||
| 344 | ENGINE_R_NO_SUCH_ENGINE); | ||
| 345 | return iterator; | ||
| 346 | } | ||
| 347 | |||
| 348 | /* As per the comments in engine.h, it is generally better all round | ||
| 349 | * if the ENGINE structure is allocated within this framework. */ | ||
| 350 | #if 0 | ||
| 351 | int ENGINE_get_struct_size(void) | ||
| 352 | { | ||
| 353 | return sizeof(ENGINE); | ||
| 354 | } | ||
| 355 | |||
| 356 | ENGINE *ENGINE_new(ENGINE *e) | ||
| 357 | { | ||
| 358 | ENGINE *ret; | ||
| 359 | |||
| 360 | if(e == NULL) | ||
| 361 | { | ||
| 362 | ret = (ENGINE *)(OPENSSL_malloc(sizeof(ENGINE)); | ||
| 363 | if(ret == NULL) | ||
| 364 | { | ||
| 365 | ENGINEerr(ENGINE_F_ENGINE_NEW, | ||
| 366 | ERR_R_MALLOC_FAILURE); | ||
| 367 | return NULL; | ||
| 368 | } | ||
| 369 | } | ||
| 370 | else | ||
| 371 | ret = e; | ||
| 372 | memset(ret, 0, sizeof(ENGINE)); | ||
| 373 | if(e) | ||
| 374 | ret->flags = ENGINE_FLAGS_MALLOCED; | ||
| 375 | ret->struct_ref = 1; | ||
| 376 | return ret; | ||
| 377 | } | ||
| 378 | #else | ||
| 379 | ENGINE *ENGINE_new(void) | ||
| 380 | { | ||
| 381 | ENGINE *ret; | ||
| 382 | |||
| 383 | ret = (ENGINE *)OPENSSL_malloc(sizeof(ENGINE)); | ||
| 384 | if(ret == NULL) | ||
| 385 | { | ||
| 386 | ENGINEerr(ENGINE_F_ENGINE_NEW, ERR_R_MALLOC_FAILURE); | ||
| 387 | return NULL; | ||
| 388 | } | ||
| 389 | memset(ret, 0, sizeof(ENGINE)); | ||
| 390 | ret->flags = ENGINE_FLAGS_MALLOCED; | ||
| 391 | ret->struct_ref = 1; | ||
| 392 | return ret; | ||
| 393 | } | ||
| 394 | #endif | ||
| 395 | |||
| 396 | int ENGINE_free(ENGINE *e) | ||
| 397 | { | ||
| 398 | int i; | ||
| 399 | |||
| 400 | if(e == NULL) | ||
| 401 | { | ||
| 402 | ENGINEerr(ENGINE_F_ENGINE_FREE, | ||
| 403 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 404 | return 0; | ||
| 405 | } | ||
| 406 | i = CRYPTO_add(&e->struct_ref,-1,CRYPTO_LOCK_ENGINE); | ||
| 407 | #ifdef REF_PRINT | ||
| 408 | REF_PRINT("ENGINE",e); | ||
| 409 | #endif | ||
| 410 | if (i > 0) return 1; | ||
| 411 | #ifdef REF_CHECK | ||
| 412 | if (i < 0) | ||
| 413 | { | ||
| 414 | fprintf(stderr,"ENGINE_free, bad reference count\n"); | ||
| 415 | abort(); | ||
| 416 | } | ||
| 417 | #endif | ||
| 418 | if(e->flags & ENGINE_FLAGS_MALLOCED) | ||
| 419 | OPENSSL_free(e); | ||
| 420 | return 1; | ||
| 421 | } | ||
| 422 | |||
| 423 | int ENGINE_set_id(ENGINE *e, const char *id) | ||
| 424 | { | ||
| 425 | if((e == NULL) || (id == NULL)) | ||
| 426 | { | ||
| 427 | ENGINEerr(ENGINE_F_ENGINE_SET_ID, | ||
| 428 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 429 | return 0; | ||
| 430 | } | ||
| 431 | e->id = id; | ||
| 432 | return 1; | ||
| 433 | } | ||
| 434 | |||
| 435 | int ENGINE_set_name(ENGINE *e, const char *name) | ||
| 436 | { | ||
| 437 | if((e == NULL) || (name == NULL)) | ||
| 438 | { | ||
| 439 | ENGINEerr(ENGINE_F_ENGINE_SET_NAME, | ||
| 440 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 441 | return 0; | ||
| 442 | } | ||
| 443 | e->name = name; | ||
| 444 | return 1; | ||
| 445 | } | ||
| 446 | |||
| 447 | int ENGINE_set_RSA(ENGINE *e, RSA_METHOD *rsa_meth) | ||
| 448 | { | ||
| 449 | if((e == NULL) || (rsa_meth == NULL)) | ||
| 450 | { | ||
| 451 | ENGINEerr(ENGINE_F_ENGINE_SET_RSA, | ||
| 452 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 453 | return 0; | ||
| 454 | } | ||
| 455 | e->rsa_meth = rsa_meth; | ||
| 456 | return 1; | ||
| 457 | } | ||
| 458 | |||
| 459 | int ENGINE_set_DSA(ENGINE *e, DSA_METHOD *dsa_meth) | ||
| 460 | { | ||
| 461 | if((e == NULL) || (dsa_meth == NULL)) | ||
| 462 | { | ||
| 463 | ENGINEerr(ENGINE_F_ENGINE_SET_DSA, | ||
| 464 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 465 | return 0; | ||
| 466 | } | ||
| 467 | e->dsa_meth = dsa_meth; | ||
| 468 | return 1; | ||
| 469 | } | ||
| 470 | |||
| 471 | int ENGINE_set_DH(ENGINE *e, DH_METHOD *dh_meth) | ||
| 472 | { | ||
| 473 | if((e == NULL) || (dh_meth == NULL)) | ||
| 474 | { | ||
| 475 | ENGINEerr(ENGINE_F_ENGINE_SET_DH, | ||
| 476 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 477 | return 0; | ||
| 478 | } | ||
| 479 | e->dh_meth = dh_meth; | ||
| 480 | return 1; | ||
| 481 | } | ||
| 482 | |||
| 483 | int ENGINE_set_RAND(ENGINE *e, RAND_METHOD *rand_meth) | ||
| 484 | { | ||
| 485 | if((e == NULL) || (rand_meth == NULL)) | ||
| 486 | { | ||
| 487 | ENGINEerr(ENGINE_F_ENGINE_SET_RAND, | ||
| 488 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 489 | return 0; | ||
| 490 | } | ||
| 491 | e->rand_meth = rand_meth; | ||
| 492 | return 1; | ||
| 493 | } | ||
| 494 | |||
| 495 | int ENGINE_set_BN_mod_exp(ENGINE *e, BN_MOD_EXP bn_mod_exp) | ||
| 496 | { | ||
| 497 | if((e == NULL) || (bn_mod_exp == NULL)) | ||
| 498 | { | ||
| 499 | ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP, | ||
| 500 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 501 | return 0; | ||
| 502 | } | ||
| 503 | e->bn_mod_exp = bn_mod_exp; | ||
| 504 | return 1; | ||
| 505 | } | ||
| 506 | |||
| 507 | int ENGINE_set_BN_mod_exp_crt(ENGINE *e, BN_MOD_EXP_CRT bn_mod_exp_crt) | ||
| 508 | { | ||
| 509 | if((e == NULL) || (bn_mod_exp_crt == NULL)) | ||
| 510 | { | ||
| 511 | ENGINEerr(ENGINE_F_ENGINE_SET_BN_MOD_EXP_CRT, | ||
| 512 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 513 | return 0; | ||
| 514 | } | ||
| 515 | e->bn_mod_exp_crt = bn_mod_exp_crt; | ||
| 516 | return 1; | ||
| 517 | } | ||
| 518 | |||
| 519 | int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f) | ||
| 520 | { | ||
| 521 | if((e == NULL) || (init_f == NULL)) | ||
| 522 | { | ||
| 523 | ENGINEerr(ENGINE_F_ENGINE_SET_INIT_FUNCTION, | ||
| 524 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 525 | return 0; | ||
| 526 | } | ||
| 527 | e->init = init_f; | ||
| 528 | return 1; | ||
| 529 | } | ||
| 530 | |||
| 531 | int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f) | ||
| 532 | { | ||
| 533 | if((e == NULL) || (finish_f == NULL)) | ||
| 534 | { | ||
| 535 | ENGINEerr(ENGINE_F_ENGINE_SET_FINISH_FUNCTION, | ||
| 536 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 537 | return 0; | ||
| 538 | } | ||
| 539 | e->finish = finish_f; | ||
| 540 | return 1; | ||
| 541 | } | ||
| 542 | |||
| 543 | int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f) | ||
| 544 | { | ||
| 545 | if((e == NULL) || (ctrl_f == NULL)) | ||
| 546 | { | ||
| 547 | ENGINEerr(ENGINE_F_ENGINE_SET_CTRL_FUNCTION, | ||
| 548 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 549 | return 0; | ||
| 550 | } | ||
| 551 | e->ctrl = ctrl_f; | ||
| 552 | return 1; | ||
| 553 | } | ||
| 554 | |||
| 555 | const char *ENGINE_get_id(ENGINE *e) | ||
| 556 | { | ||
| 557 | if(e == NULL) | ||
| 558 | { | ||
| 559 | ENGINEerr(ENGINE_F_ENGINE_GET_ID, | ||
| 560 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 561 | return 0; | ||
| 562 | } | ||
| 563 | return e->id; | ||
| 564 | } | ||
| 565 | |||
| 566 | const char *ENGINE_get_name(ENGINE *e) | ||
| 567 | { | ||
| 568 | if(e == NULL) | ||
| 569 | { | ||
| 570 | ENGINEerr(ENGINE_F_ENGINE_GET_NAME, | ||
| 571 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 572 | return 0; | ||
| 573 | } | ||
| 574 | return e->name; | ||
| 575 | } | ||
| 576 | |||
| 577 | RSA_METHOD *ENGINE_get_RSA(ENGINE *e) | ||
| 578 | { | ||
| 579 | if(e == NULL) | ||
| 580 | { | ||
| 581 | ENGINEerr(ENGINE_F_ENGINE_GET_RSA, | ||
| 582 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 583 | return NULL; | ||
| 584 | } | ||
| 585 | return e->rsa_meth; | ||
| 586 | } | ||
| 587 | |||
| 588 | DSA_METHOD *ENGINE_get_DSA(ENGINE *e) | ||
| 589 | { | ||
| 590 | if(e == NULL) | ||
| 591 | { | ||
| 592 | ENGINEerr(ENGINE_F_ENGINE_GET_DSA, | ||
| 593 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 594 | return NULL; | ||
| 595 | } | ||
| 596 | return e->dsa_meth; | ||
| 597 | } | ||
| 598 | |||
| 599 | DH_METHOD *ENGINE_get_DH(ENGINE *e) | ||
| 600 | { | ||
| 601 | if(e == NULL) | ||
| 602 | { | ||
| 603 | ENGINEerr(ENGINE_F_ENGINE_GET_DH, | ||
| 604 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 605 | return NULL; | ||
| 606 | } | ||
| 607 | return e->dh_meth; | ||
| 608 | } | ||
| 609 | |||
| 610 | RAND_METHOD *ENGINE_get_RAND(ENGINE *e) | ||
| 611 | { | ||
| 612 | if(e == NULL) | ||
| 613 | { | ||
| 614 | ENGINEerr(ENGINE_F_ENGINE_GET_RAND, | ||
| 615 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 616 | return NULL; | ||
| 617 | } | ||
| 618 | return e->rand_meth; | ||
| 619 | } | ||
| 620 | |||
| 621 | BN_MOD_EXP ENGINE_get_BN_mod_exp(ENGINE *e) | ||
| 622 | { | ||
| 623 | if(e == NULL) | ||
| 624 | { | ||
| 625 | ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP, | ||
| 626 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 627 | return NULL; | ||
| 628 | } | ||
| 629 | return e->bn_mod_exp; | ||
| 630 | } | ||
| 631 | |||
| 632 | BN_MOD_EXP_CRT ENGINE_get_BN_mod_exp_crt(ENGINE *e) | ||
| 633 | { | ||
| 634 | if(e == NULL) | ||
| 635 | { | ||
| 636 | ENGINEerr(ENGINE_F_ENGINE_GET_BN_MOD_EXP_CRT, | ||
| 637 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 638 | return NULL; | ||
| 639 | } | ||
| 640 | return e->bn_mod_exp_crt; | ||
| 641 | } | ||
| 642 | |||
| 643 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(ENGINE *e) | ||
| 644 | { | ||
| 645 | if(e == NULL) | ||
| 646 | { | ||
| 647 | ENGINEerr(ENGINE_F_ENGINE_GET_INIT_FUNCTION, | ||
| 648 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 649 | return NULL; | ||
| 650 | } | ||
| 651 | return e->init; | ||
| 652 | } | ||
| 653 | |||
| 654 | ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(ENGINE *e) | ||
| 655 | { | ||
| 656 | if(e == NULL) | ||
| 657 | { | ||
| 658 | ENGINEerr(ENGINE_F_ENGINE_GET_FINISH_FUNCTION, | ||
| 659 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 660 | return NULL; | ||
| 661 | } | ||
| 662 | return e->finish; | ||
| 663 | } | ||
| 664 | |||
| 665 | ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(ENGINE *e) | ||
| 666 | { | ||
| 667 | if(e == NULL) | ||
| 668 | { | ||
| 669 | ENGINEerr(ENGINE_F_ENGINE_GET_CTRL_FUNCTION, | ||
| 670 | ERR_R_PASSED_NULL_PARAMETER); | ||
| 671 | return NULL; | ||
| 672 | } | ||
| 673 | return e->ctrl; | ||
| 674 | } | ||
| 675 | |||
diff --git a/src/lib/libssl/src/crypto/engine/engine_openssl.c b/src/lib/libssl/src/crypto/engine/engine_openssl.c deleted file mode 100644 index 9636f51168..0000000000 --- a/src/lib/libssl/src/crypto/engine/engine_openssl.c +++ /dev/null | |||
| @@ -1,174 +0,0 @@ | |||
| 1 | /* crypto/engine/engine_openssl.c */ | ||
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | ||
| 3 | * project 2000. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | |||
| 60 | #include <stdio.h> | ||
| 61 | #include <openssl/crypto.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "engine_int.h" | ||
| 64 | #include <openssl/engine.h> | ||
| 65 | #include <openssl/dso.h> | ||
| 66 | #include <openssl/rsa.h> | ||
| 67 | #include <openssl/dsa.h> | ||
| 68 | #include <openssl/dh.h> | ||
| 69 | #include <openssl/rand.h> | ||
| 70 | #include <openssl/bn.h> | ||
| 71 | |||
| 72 | /* This is the only function we need to implement as OpenSSL | ||
| 73 | * doesn't have a native CRT mod_exp. Perhaps this should be | ||
| 74 | * BN_mod_exp_crt and moved into crypto/bn/ ?? ... dunno. */ | ||
| 75 | static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 76 | const BIGNUM *q, const BIGNUM *dmp1, const BIGNUM *dmq1, | ||
| 77 | const BIGNUM *iqmp, BN_CTX *ctx); | ||
| 78 | |||
| 79 | /* The ENGINE structure that can be pointed to. */ | ||
| 80 | static ENGINE engine_openssl = | ||
| 81 | { | ||
| 82 | "openssl", | ||
| 83 | "Software default engine support", | ||
| 84 | NULL, | ||
| 85 | NULL, | ||
| 86 | NULL, /* these methods are "stolen" in ENGINE_openssl() */ | ||
| 87 | NULL, | ||
| 88 | NULL, | ||
| 89 | openssl_mod_exp_crt, | ||
| 90 | NULL, /* no init() */ | ||
| 91 | NULL, /* no finish() */ | ||
| 92 | NULL, /* no ctrl() */ | ||
| 93 | NULL, /* no load_privkey() */ | ||
| 94 | NULL, /* no load_pubkey() */ | ||
| 95 | 0, /* no flags */ | ||
| 96 | 0, 0, /* no references. */ | ||
| 97 | NULL, NULL /* unlinked */ | ||
| 98 | }; | ||
| 99 | |||
| 100 | /* As this is only ever called once, there's no need for locking | ||
| 101 | * (indeed - the lock will already be held by our caller!!!) */ | ||
| 102 | ENGINE *ENGINE_openssl() | ||
| 103 | { | ||
| 104 | /* We need to populate our structure with the software pointers | ||
| 105 | * that we want to steal. */ | ||
| 106 | engine_openssl.rsa_meth = RSA_get_default_openssl_method(); | ||
| 107 | engine_openssl.dsa_meth = DSA_get_default_openssl_method(); | ||
| 108 | engine_openssl.dh_meth = DH_get_default_openssl_method(); | ||
| 109 | engine_openssl.rand_meth = RAND_SSLeay(); | ||
| 110 | engine_openssl.bn_mod_exp = BN_mod_exp; | ||
| 111 | return &engine_openssl; | ||
| 112 | } | ||
| 113 | |||
| 114 | /* Chinese Remainder Theorem, taken and adapted from rsa_eay.c */ | ||
| 115 | static int openssl_mod_exp_crt(BIGNUM *r, BIGNUM *a, const BIGNUM *p, | ||
| 116 | const BIGNUM *q, const BIGNUM *dmp1, | ||
| 117 | const BIGNUM *dmq1, const BIGNUM *iqmp, BN_CTX *ctx) | ||
| 118 | { | ||
| 119 | BIGNUM r1,m1; | ||
| 120 | int ret=0; | ||
| 121 | BN_CTX *bn_ctx; | ||
| 122 | BIGNUM *temp_bn = NULL; | ||
| 123 | |||
| 124 | if (ctx) | ||
| 125 | bn_ctx = ctx; | ||
| 126 | else | ||
| 127 | if ((bn_ctx=BN_CTX_new()) == NULL) goto err; | ||
| 128 | BN_init(&m1); | ||
| 129 | BN_init(&r1); | ||
| 130 | /* BN_mul() cannot accept const BIGNUMs so I use the BN_CTX | ||
| 131 | * to duplicate what I need. <sigh> */ | ||
| 132 | if ((temp_bn = BN_CTX_get(bn_ctx)) == NULL) goto err; | ||
| 133 | if (!BN_copy(temp_bn, iqmp)) goto err; | ||
| 134 | |||
| 135 | if (!BN_mod(&r1, a, q, bn_ctx)) goto err; | ||
| 136 | if (!engine_openssl.bn_mod_exp(&m1, &r1, dmq1, q, bn_ctx)) | ||
| 137 | goto err; | ||
| 138 | |||
| 139 | if (!BN_mod(&r1, a, p, bn_ctx)) goto err; | ||
| 140 | if (!engine_openssl.bn_mod_exp(r, &r1, dmp1, p, bn_ctx)) | ||
| 141 | goto err; | ||
| 142 | |||
| 143 | if (!BN_sub(r, r, &m1)) goto err; | ||
| 144 | /* This will help stop the size of r0 increasing, which does | ||
| 145 | * affect the multiply if it optimised for a power of 2 size */ | ||
| 146 | if (r->neg) | ||
| 147 | if (!BN_add(r, r, p)) goto err; | ||
| 148 | |||
| 149 | if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err; | ||
| 150 | if (!BN_mod(r, &r1, p, bn_ctx)) goto err; | ||
| 151 | /* If p < q it is occasionally possible for the correction of | ||
| 152 | * adding 'p' if r is negative above to leave the result still | ||
| 153 | * negative. This can break the private key operations: the following | ||
| 154 | * second correction should *always* correct this rare occurrence. | ||
| 155 | * This will *never* happen with OpenSSL generated keys because | ||
| 156 | * they ensure p > q [steve] | ||
| 157 | */ | ||
| 158 | if (r->neg) | ||
| 159 | if (!BN_add(r, r, p)) goto err; | ||
| 160 | /* Again, BN_mul() will need non-const values. */ | ||
| 161 | if (!BN_copy(temp_bn, q)) goto err; | ||
| 162 | if (!BN_mul(&r1, r, temp_bn, bn_ctx)) goto err; | ||
| 163 | if (!BN_add(r, &r1, &m1)) goto err; | ||
| 164 | |||
| 165 | ret=1; | ||
| 166 | err: | ||
| 167 | BN_clear_free(&m1); | ||
| 168 | BN_clear_free(&r1); | ||
| 169 | if (temp_bn) | ||
| 170 | bn_ctx->tos--; | ||
| 171 | if (!ctx) | ||
| 172 | BN_CTX_free(bn_ctx); | ||
| 173 | return(ret); | ||
| 174 | } | ||
diff --git a/src/lib/libssl/src/crypto/objects/obj_dat.h.src b/src/lib/libssl/src/crypto/objects/obj_dat.h.src deleted file mode 100644 index f0d824141c..0000000000 --- a/src/lib/libssl/src/crypto/objects/obj_dat.h.src +++ /dev/null | |||
| @@ -1,2208 +0,0 @@ | |||
| 1 | /* lib/obj/obj_dat.h */ | ||
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | /* THIS FILE IS GENERATED FROM Objects.h by obj_dat.pl via the | ||
| 60 | * following command: | ||
| 61 | * perl obj_dat.pl objects.h obj_dat.h | ||
| 62 | */ | ||
| 63 | |||
| 64 | #define NUM_NID 393 | ||
| 65 | #define NUM_SN 392 | ||
| 66 | #define NUM_LN 392 | ||
| 67 | #define NUM_OBJ 366 | ||
| 68 | |||
| 69 | static unsigned char lvalues[2896]={ | ||
| 70 | 0x00, /* [ 0] OBJ_undef */ | ||
| 71 | 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ | ||
| 72 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ | ||
| 73 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x02, /* [ 14] OBJ_md2 */ | ||
| 74 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x05, /* [ 22] OBJ_md5 */ | ||
| 75 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04, /* [ 30] OBJ_rc4 */ | ||
| 76 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,/* [ 38] OBJ_rsaEncryption */ | ||
| 77 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,/* [ 47] OBJ_md2WithRSAEncryption */ | ||
| 78 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x04,/* [ 56] OBJ_md5WithRSAEncryption */ | ||
| 79 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x01,/* [ 65] OBJ_pbeWithMD2AndDES_CBC */ | ||
| 80 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x03,/* [ 74] OBJ_pbeWithMD5AndDES_CBC */ | ||
| 81 | 0x55, /* [ 83] OBJ_X500 */ | ||
| 82 | 0x55,0x04, /* [ 84] OBJ_X509 */ | ||
| 83 | 0x55,0x04,0x03, /* [ 86] OBJ_commonName */ | ||
| 84 | 0x55,0x04,0x06, /* [ 89] OBJ_countryName */ | ||
| 85 | 0x55,0x04,0x07, /* [ 92] OBJ_localityName */ | ||
| 86 | 0x55,0x04,0x08, /* [ 95] OBJ_stateOrProvinceName */ | ||
| 87 | 0x55,0x04,0x0A, /* [ 98] OBJ_organizationName */ | ||
| 88 | 0x55,0x04,0x0B, /* [101] OBJ_organizationalUnitName */ | ||
| 89 | 0x55,0x08,0x01,0x01, /* [104] OBJ_rsa */ | ||
| 90 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07, /* [108] OBJ_pkcs7 */ | ||
| 91 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x01,/* [116] OBJ_pkcs7_data */ | ||
| 92 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x02,/* [125] OBJ_pkcs7_signed */ | ||
| 93 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x03,/* [134] OBJ_pkcs7_enveloped */ | ||
| 94 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x04,/* [143] OBJ_pkcs7_signedAndEnveloped */ | ||
| 95 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x05,/* [152] OBJ_pkcs7_digest */ | ||
| 96 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x07,0x06,/* [161] OBJ_pkcs7_encrypted */ | ||
| 97 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03, /* [170] OBJ_pkcs3 */ | ||
| 98 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x03,0x01,/* [178] OBJ_dhKeyAgreement */ | ||
| 99 | 0x2B,0x0E,0x03,0x02,0x06, /* [187] OBJ_des_ecb */ | ||
| 100 | 0x2B,0x0E,0x03,0x02,0x09, /* [192] OBJ_des_cfb64 */ | ||
| 101 | 0x2B,0x0E,0x03,0x02,0x07, /* [197] OBJ_des_cbc */ | ||
| 102 | 0x2B,0x0E,0x03,0x02,0x11, /* [202] OBJ_des_ede */ | ||
| 103 | 0x2B,0x06,0x01,0x04,0x01,0x81,0x3C,0x07,0x01,0x01,0x02,/* [207] OBJ_idea_cbc */ | ||
| 104 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x02, /* [218] OBJ_rc2_cbc */ | ||
| 105 | 0x2B,0x0E,0x03,0x02,0x12, /* [226] OBJ_sha */ | ||
| 106 | 0x2B,0x0E,0x03,0x02,0x0F, /* [231] OBJ_shaWithRSAEncryption */ | ||
| 107 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x07, /* [236] OBJ_des_ede3_cbc */ | ||
| 108 | 0x2B,0x0E,0x03,0x02,0x08, /* [244] OBJ_des_ofb64 */ | ||
| 109 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09, /* [249] OBJ_pkcs9 */ | ||
| 110 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x01,/* [257] OBJ_pkcs9_emailAddress */ | ||
| 111 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x02,/* [266] OBJ_pkcs9_unstructuredName */ | ||
| 112 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x03,/* [275] OBJ_pkcs9_contentType */ | ||
| 113 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x04,/* [284] OBJ_pkcs9_messageDigest */ | ||
| 114 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x05,/* [293] OBJ_pkcs9_signingTime */ | ||
| 115 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x06,/* [302] OBJ_pkcs9_countersignature */ | ||
| 116 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x07,/* [311] OBJ_pkcs9_challengePassword */ | ||
| 117 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x08,/* [320] OBJ_pkcs9_unstructuredAddress */ | ||
| 118 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x09,/* [329] OBJ_pkcs9_extCertAttributes */ | ||
| 119 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42, /* [338] OBJ_netscape */ | ||
| 120 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01, /* [345] OBJ_netscape_cert_extension */ | ||
| 121 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02, /* [353] OBJ_netscape_data_type */ | ||
| 122 | 0x2B,0x0E,0x03,0x02,0x1A, /* [361] OBJ_sha1 */ | ||
| 123 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,/* [366] OBJ_sha1WithRSAEncryption */ | ||
| 124 | 0x2B,0x0E,0x03,0x02,0x0D, /* [375] OBJ_dsaWithSHA */ | ||
| 125 | 0x2B,0x0E,0x03,0x02,0x0C, /* [380] OBJ_dsa_2 */ | ||
| 126 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0B,/* [385] OBJ_pbeWithSHA1AndRC2_CBC */ | ||
| 127 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0C,/* [394] OBJ_id_pbkdf2 */ | ||
| 128 | 0x2B,0x0E,0x03,0x02,0x1B, /* [403] OBJ_dsaWithSHA1_2 */ | ||
| 129 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x01,/* [408] OBJ_netscape_cert_type */ | ||
| 130 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x02,/* [417] OBJ_netscape_base_url */ | ||
| 131 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x03,/* [426] OBJ_netscape_revocation_url */ | ||
| 132 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x04,/* [435] OBJ_netscape_ca_revocation_url */ | ||
| 133 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x07,/* [444] OBJ_netscape_renewal_url */ | ||
| 134 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x08,/* [453] OBJ_netscape_ca_policy_url */ | ||
| 135 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0C,/* [462] OBJ_netscape_ssl_server_name */ | ||
| 136 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x01,0x0D,/* [471] OBJ_netscape_comment */ | ||
| 137 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x02,0x05,/* [480] OBJ_netscape_cert_sequence */ | ||
| 138 | 0x55,0x1D, /* [489] OBJ_id_ce */ | ||
| 139 | 0x55,0x1D,0x0E, /* [491] OBJ_subject_key_identifier */ | ||
| 140 | 0x55,0x1D,0x0F, /* [494] OBJ_key_usage */ | ||
| 141 | 0x55,0x1D,0x10, /* [497] OBJ_private_key_usage_period */ | ||
| 142 | 0x55,0x1D,0x11, /* [500] OBJ_subject_alt_name */ | ||
| 143 | 0x55,0x1D,0x12, /* [503] OBJ_issuer_alt_name */ | ||
| 144 | 0x55,0x1D,0x13, /* [506] OBJ_basic_constraints */ | ||
| 145 | 0x55,0x1D,0x14, /* [509] OBJ_crl_number */ | ||
| 146 | 0x55,0x1D,0x20, /* [512] OBJ_certificate_policies */ | ||
| 147 | 0x55,0x1D,0x23, /* [515] OBJ_authority_key_identifier */ | ||
| 148 | 0x2B,0x06,0x01,0x04,0x01,0x97,0x55,0x01,0x02,/* [518] OBJ_bf_cbc */ | ||
| 149 | 0x55,0x08,0x03,0x65, /* [527] OBJ_mdc2 */ | ||
| 150 | 0x55,0x08,0x03,0x64, /* [531] OBJ_mdc2WithRSA */ | ||
| 151 | 0x55,0x04,0x2A, /* [535] OBJ_givenName */ | ||
| 152 | 0x55,0x04,0x04, /* [538] OBJ_surname */ | ||
| 153 | 0x55,0x04,0x2B, /* [541] OBJ_initials */ | ||
| 154 | 0x55,0x04,0x2D, /* [544] OBJ_uniqueIdentifier */ | ||
| 155 | 0x55,0x1D,0x1F, /* [547] OBJ_crl_distribution_points */ | ||
| 156 | 0x2B,0x0E,0x03,0x02,0x03, /* [550] OBJ_md5WithRSA */ | ||
| 157 | 0x55,0x04,0x05, /* [555] OBJ_serialNumber */ | ||
| 158 | 0x55,0x04,0x0C, /* [558] OBJ_title */ | ||
| 159 | 0x55,0x04,0x0D, /* [561] OBJ_description */ | ||
| 160 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0A,/* [564] OBJ_cast5_cbc */ | ||
| 161 | 0x2A,0x86,0x48,0x86,0xF6,0x7D,0x07,0x42,0x0C,/* [573] OBJ_pbeWithMD5AndCast5_CBC */ | ||
| 162 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x03, /* [582] OBJ_dsaWithSHA1 */ | ||
| 163 | 0x2B,0x0E,0x03,0x02,0x1D, /* [589] OBJ_sha1WithRSA */ | ||
| 164 | 0x2A,0x86,0x48,0xCE,0x38,0x04,0x01, /* [594] OBJ_dsa */ | ||
| 165 | 0x2B,0x24,0x03,0x02,0x01, /* [601] OBJ_ripemd160 */ | ||
| 166 | 0x2B,0x24,0x03,0x03,0x01,0x02, /* [606] OBJ_ripemd160WithRSA */ | ||
| 167 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x08, /* [612] OBJ_rc5_cbc */ | ||
| 168 | 0x29,0x01,0x01,0x85,0x1A,0x01, /* [620] OBJ_rle_compression */ | ||
| 169 | 0x29,0x01,0x01,0x85,0x1A,0x02, /* [626] OBJ_zlib_compression */ | ||
| 170 | 0x55,0x1D,0x25, /* [632] OBJ_ext_key_usage */ | ||
| 171 | 0x2B,0x06,0x01,0x05,0x05,0x07, /* [635] OBJ_id_pkix */ | ||
| 172 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03, /* [641] OBJ_id_kp */ | ||
| 173 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x01, /* [648] OBJ_server_auth */ | ||
| 174 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x02, /* [656] OBJ_client_auth */ | ||
| 175 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x03, /* [664] OBJ_code_sign */ | ||
| 176 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x04, /* [672] OBJ_email_protect */ | ||
| 177 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x08, /* [680] OBJ_time_stamp */ | ||
| 178 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x15,/* [688] OBJ_ms_code_ind */ | ||
| 179 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x16,/* [698] OBJ_ms_code_com */ | ||
| 180 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x01,/* [708] OBJ_ms_ctl_sign */ | ||
| 181 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x03,/* [718] OBJ_ms_sgc */ | ||
| 182 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x04,/* [728] OBJ_ms_efs */ | ||
| 183 | 0x60,0x86,0x48,0x01,0x86,0xF8,0x42,0x04,0x01,/* [738] OBJ_ns_sgc */ | ||
| 184 | 0x55,0x1D,0x1B, /* [747] OBJ_delta_crl */ | ||
| 185 | 0x55,0x1D,0x15, /* [750] OBJ_crl_reason */ | ||
| 186 | 0x55,0x1D,0x18, /* [753] OBJ_invalidity_date */ | ||
| 187 | 0x2B,0x65,0x01,0x04,0x01, /* [756] OBJ_sxnet */ | ||
| 188 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x01,/* [761] OBJ_pbe_WithSHA1And128BitRC4 */ | ||
| 189 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x02,/* [771] OBJ_pbe_WithSHA1And40BitRC4 */ | ||
| 190 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x03,/* [781] OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC */ | ||
| 191 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x04,/* [791] OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC */ | ||
| 192 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x05,/* [801] OBJ_pbe_WithSHA1And128BitRC2_CBC */ | ||
| 193 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x01,0x06,/* [811] OBJ_pbe_WithSHA1And40BitRC2_CBC */ | ||
| 194 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x01,/* [821] OBJ_keyBag */ | ||
| 195 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x02,/* [832] OBJ_pkcs8ShroudedKeyBag */ | ||
| 196 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x03,/* [843] OBJ_certBag */ | ||
| 197 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x04,/* [854] OBJ_crlBag */ | ||
| 198 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x05,/* [865] OBJ_secretBag */ | ||
| 199 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x0C,0x0A,0x01,0x06,/* [876] OBJ_safeContentsBag */ | ||
| 200 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x14,/* [887] OBJ_friendlyName */ | ||
| 201 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x15,/* [896] OBJ_localKeyID */ | ||
| 202 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x01,/* [905] OBJ_x509Certificate */ | ||
| 203 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x16,0x02,/* [915] OBJ_sdsiCertificate */ | ||
| 204 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x17,0x01,/* [925] OBJ_x509Crl */ | ||
| 205 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0D,/* [935] OBJ_pbes2 */ | ||
| 206 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0E,/* [944] OBJ_pbmac1 */ | ||
| 207 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x07, /* [953] OBJ_hmacWithSHA1 */ | ||
| 208 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01, /* [961] OBJ_id_qt_cps */ | ||
| 209 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x02, /* [969] OBJ_id_qt_unotice */ | ||
| 210 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0F,/* [977] OBJ_SMIMECapabilities */ | ||
| 211 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x04,/* [986] OBJ_pbeWithMD2AndRC2_CBC */ | ||
| 212 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x06,/* [995] OBJ_pbeWithMD5AndRC2_CBC */ | ||
| 213 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05,0x0A,/* [1004] OBJ_pbeWithSHA1AndDES_CBC */ | ||
| 214 | 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x02,0x01,0x0E,/* [1013] OBJ_ms_ext_req */ | ||
| 215 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0E,/* [1023] OBJ_ext_req */ | ||
| 216 | 0x55,0x04,0x29, /* [1032] OBJ_name */ | ||
| 217 | 0x55,0x04,0x2E, /* [1035] OBJ_dnQualifier */ | ||
| 218 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01, /* [1038] OBJ_id_pe */ | ||
| 219 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30, /* [1045] OBJ_id_ad */ | ||
| 220 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01, /* [1052] OBJ_info_access */ | ||
| 221 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01, /* [1060] OBJ_ad_OCSP */ | ||
| 222 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x02, /* [1068] OBJ_ad_ca_issuers */ | ||
| 223 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x09, /* [1076] OBJ_OCSP_sign */ | ||
| 224 | 0x28, /* [1084] OBJ_iso */ | ||
| 225 | 0x2A, /* [1085] OBJ_member_body */ | ||
| 226 | 0x2A,0x86,0x48, /* [1086] OBJ_ISO_US */ | ||
| 227 | 0x2A,0x86,0x48,0xCE,0x38, /* [1089] OBJ_X9_57 */ | ||
| 228 | 0x2A,0x86,0x48,0xCE,0x38,0x04, /* [1094] OBJ_X9cm */ | ||
| 229 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01, /* [1100] OBJ_pkcs1 */ | ||
| 230 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x05, /* [1108] OBJ_pkcs5 */ | ||
| 231 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,/* [1116] OBJ_SMIME */ | ||
| 232 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,/* [1125] OBJ_id_smime_mod */ | ||
| 233 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,/* [1135] OBJ_id_smime_ct */ | ||
| 234 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,/* [1145] OBJ_id_smime_aa */ | ||
| 235 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,/* [1155] OBJ_id_smime_alg */ | ||
| 236 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,/* [1165] OBJ_id_smime_cd */ | ||
| 237 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,/* [1175] OBJ_id_smime_spq */ | ||
| 238 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,/* [1185] OBJ_id_smime_cti */ | ||
| 239 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x01,/* [1195] OBJ_id_smime_mod_cms */ | ||
| 240 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x02,/* [1206] OBJ_id_smime_mod_ess */ | ||
| 241 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x03,/* [1217] OBJ_id_smime_mod_oid */ | ||
| 242 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x04,/* [1228] OBJ_id_smime_mod_msg_v3 */ | ||
| 243 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x05,/* [1239] OBJ_id_smime_mod_ets_eSignature_88 */ | ||
| 244 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x06,/* [1250] OBJ_id_smime_mod_ets_eSignature_97 */ | ||
| 245 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x07,/* [1261] OBJ_id_smime_mod_ets_eSigPolicy_88 */ | ||
| 246 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x00,0x08,/* [1272] OBJ_id_smime_mod_ets_eSigPolicy_97 */ | ||
| 247 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x01,/* [1283] OBJ_id_smime_ct_receipt */ | ||
| 248 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x02,/* [1294] OBJ_id_smime_ct_authData */ | ||
| 249 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x03,/* [1305] OBJ_id_smime_ct_publishCert */ | ||
| 250 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x04,/* [1316] OBJ_id_smime_ct_TSTInfo */ | ||
| 251 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x05,/* [1327] OBJ_id_smime_ct_TDTInfo */ | ||
| 252 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x06,/* [1338] OBJ_id_smime_ct_contentInfo */ | ||
| 253 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x07,/* [1349] OBJ_id_smime_ct_DVCSRequestData */ | ||
| 254 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x01,0x08,/* [1360] OBJ_id_smime_ct_DVCSResponseData */ | ||
| 255 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x01,/* [1371] OBJ_id_smime_aa_receiptRequest */ | ||
| 256 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x02,/* [1382] OBJ_id_smime_aa_securityLabel */ | ||
| 257 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x03,/* [1393] OBJ_id_smime_aa_mlExpandHistory */ | ||
| 258 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x04,/* [1404] OBJ_id_smime_aa_contentHint */ | ||
| 259 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x05,/* [1415] OBJ_id_smime_aa_msgSigDigest */ | ||
| 260 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x06,/* [1426] OBJ_id_smime_aa_encapContentType */ | ||
| 261 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x07,/* [1437] OBJ_id_smime_aa_contentIdentifier */ | ||
| 262 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x08,/* [1448] OBJ_id_smime_aa_macValue */ | ||
| 263 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x09,/* [1459] OBJ_id_smime_aa_equivalentLabels */ | ||
| 264 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0A,/* [1470] OBJ_id_smime_aa_contentReference */ | ||
| 265 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0B,/* [1481] OBJ_id_smime_aa_encrypKeyPref */ | ||
| 266 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0C,/* [1492] OBJ_id_smime_aa_signingCertificate */ | ||
| 267 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0D,/* [1503] OBJ_id_smime_aa_smimeEncryptCerts */ | ||
| 268 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0E,/* [1514] OBJ_id_smime_aa_timeStampToken */ | ||
| 269 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x0F,/* [1525] OBJ_id_smime_aa_ets_sigPolicyId */ | ||
| 270 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x10,/* [1536] OBJ_id_smime_aa_ets_commitmentType */ | ||
| 271 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x11,/* [1547] OBJ_id_smime_aa_ets_signerLocation */ | ||
| 272 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x12,/* [1558] OBJ_id_smime_aa_ets_signerAttr */ | ||
| 273 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x13,/* [1569] OBJ_id_smime_aa_ets_otherSigCert */ | ||
| 274 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x14,/* [1580] OBJ_id_smime_aa_ets_contentTimestamp */ | ||
| 275 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x15,/* [1591] OBJ_id_smime_aa_ets_CertificateRefs */ | ||
| 276 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x16,/* [1602] OBJ_id_smime_aa_ets_RevocationRefs */ | ||
| 277 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x17,/* [1613] OBJ_id_smime_aa_ets_certValues */ | ||
| 278 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x18,/* [1624] OBJ_id_smime_aa_ets_revocationValues */ | ||
| 279 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x19,/* [1635] OBJ_id_smime_aa_ets_escTimeStamp */ | ||
| 280 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1A,/* [1646] OBJ_id_smime_aa_ets_certCRLTimestamp */ | ||
| 281 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1B,/* [1657] OBJ_id_smime_aa_ets_archiveTimeStamp */ | ||
| 282 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1C,/* [1668] OBJ_id_smime_aa_signatureType */ | ||
| 283 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x02,0x1D,/* [1679] OBJ_id_smime_aa_dvcs_dvc */ | ||
| 284 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x01,/* [1690] OBJ_id_smime_alg_ESDHwith3DES */ | ||
| 285 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x02,/* [1701] OBJ_id_smime_alg_ESDHwithRC2 */ | ||
| 286 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x03,/* [1712] OBJ_id_smime_alg_3DESwrap */ | ||
| 287 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x04,/* [1723] OBJ_id_smime_alg_RC2wrap */ | ||
| 288 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x05,/* [1734] OBJ_id_smime_alg_ESDH */ | ||
| 289 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x06,/* [1745] OBJ_id_smime_alg_CMS3DESwrap */ | ||
| 290 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x07,/* [1756] OBJ_id_smime_alg_CMSRC2wrap */ | ||
| 291 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x04,0x01,/* [1767] OBJ_id_smime_cd_ldap */ | ||
| 292 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x01,/* [1778] OBJ_id_smime_spq_ets_sqt_uri */ | ||
| 293 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x05,0x02,/* [1789] OBJ_id_smime_spq_ets_sqt_unotice */ | ||
| 294 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x01,/* [1800] OBJ_id_smime_cti_ets_proofOfOrigin */ | ||
| 295 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x02,/* [1811] OBJ_id_smime_cti_ets_proofOfReceipt */ | ||
| 296 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x03,/* [1822] OBJ_id_smime_cti_ets_proofOfDelivery */ | ||
| 297 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x04,/* [1833] OBJ_id_smime_cti_ets_proofOfSender */ | ||
| 298 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x05,/* [1844] OBJ_id_smime_cti_ets_proofOfApproval */ | ||
| 299 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x06,0x06,/* [1855] OBJ_id_smime_cti_ets_proofOfCreation */ | ||
| 300 | 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x02,0x04, /* [1866] OBJ_md4 */ | ||
| 301 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00, /* [1874] OBJ_id_pkix_mod */ | ||
| 302 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02, /* [1881] OBJ_id_qt */ | ||
| 303 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04, /* [1888] OBJ_id_it */ | ||
| 304 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05, /* [1895] OBJ_id_pkip */ | ||
| 305 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06, /* [1902] OBJ_id_alg */ | ||
| 306 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07, /* [1909] OBJ_id_cmc */ | ||
| 307 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08, /* [1916] OBJ_id_on */ | ||
| 308 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09, /* [1923] OBJ_id_pda */ | ||
| 309 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A, /* [1930] OBJ_id_aca */ | ||
| 310 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B, /* [1937] OBJ_id_qcs */ | ||
| 311 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C, /* [1944] OBJ_id_cct */ | ||
| 312 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x01, /* [1951] OBJ_id_pkix1_explicit_88 */ | ||
| 313 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x02, /* [1959] OBJ_id_pkix1_implicit_88 */ | ||
| 314 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x03, /* [1967] OBJ_id_pkix1_explicit_93 */ | ||
| 315 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x04, /* [1975] OBJ_id_pkix1_implicit_93 */ | ||
| 316 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x05, /* [1983] OBJ_id_mod_crmf */ | ||
| 317 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x06, /* [1991] OBJ_id_mod_cmc */ | ||
| 318 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x07, /* [1999] OBJ_id_mod_kea_profile_88 */ | ||
| 319 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x08, /* [2007] OBJ_id_mod_kea_profile_93 */ | ||
| 320 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x09, /* [2015] OBJ_id_mod_cmp */ | ||
| 321 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0A, /* [2023] OBJ_id_mod_qualified_cert_88 */ | ||
| 322 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0B, /* [2031] OBJ_id_mod_qualified_cert_93 */ | ||
| 323 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0C, /* [2039] OBJ_id_mod_attribute_cert */ | ||
| 324 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0D, /* [2047] OBJ_id_mod_timestamp_protocol */ | ||
| 325 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0E, /* [2055] OBJ_id_mod_ocsp */ | ||
| 326 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x0F, /* [2063] OBJ_id_mod_dvcs */ | ||
| 327 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x00,0x10, /* [2071] OBJ_id_mod_cmp2000 */ | ||
| 328 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x02, /* [2079] OBJ_biometricInfo */ | ||
| 329 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x03, /* [2087] OBJ_qcStatements */ | ||
| 330 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x04, /* [2095] OBJ_ac_auditEntity */ | ||
| 331 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x05, /* [2103] OBJ_ac_targeting */ | ||
| 332 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x06, /* [2111] OBJ_aaControls */ | ||
| 333 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x07, /* [2119] OBJ_sbqp_ipAddrBlock */ | ||
| 334 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x08, /* [2127] OBJ_sbqp_autonomousSysNum */ | ||
| 335 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x09, /* [2135] OBJ_sbqp_routerIdentifier */ | ||
| 336 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x03, /* [2143] OBJ_textNotice */ | ||
| 337 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x05, /* [2151] OBJ_ipsecEndSystem */ | ||
| 338 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x06, /* [2159] OBJ_ipsecTunnel */ | ||
| 339 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x07, /* [2167] OBJ_ipsecUser */ | ||
| 340 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x0A, /* [2175] OBJ_dvcs */ | ||
| 341 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x01, /* [2183] OBJ_id_it_caProtEncCert */ | ||
| 342 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x02, /* [2191] OBJ_id_it_signKeyPairTypes */ | ||
| 343 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x03, /* [2199] OBJ_id_it_encKeyPairTypes */ | ||
| 344 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x04, /* [2207] OBJ_id_it_preferredSymmAlg */ | ||
| 345 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x05, /* [2215] OBJ_id_it_caKeyUpdateInfo */ | ||
| 346 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x06, /* [2223] OBJ_id_it_currentCRL */ | ||
| 347 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x07, /* [2231] OBJ_id_it_unsupportedOIDs */ | ||
| 348 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x08, /* [2239] OBJ_id_it_subscriptionRequest */ | ||
| 349 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x09, /* [2247] OBJ_id_it_subscriptionResponse */ | ||
| 350 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0A, /* [2255] OBJ_id_it_keyPairParamReq */ | ||
| 351 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0B, /* [2263] OBJ_id_it_keyPairParamRep */ | ||
| 352 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0C, /* [2271] OBJ_id_it_revPassphrase */ | ||
| 353 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0D, /* [2279] OBJ_id_it_implicitConfirm */ | ||
| 354 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0E, /* [2287] OBJ_id_it_confirmWaitTime */ | ||
| 355 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x04,0x0F, /* [2295] OBJ_id_it_origPKIMessage */ | ||
| 356 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01, /* [2303] OBJ_id_regCtrl */ | ||
| 357 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02, /* [2311] OBJ_id_regInfo */ | ||
| 358 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x01,/* [2319] OBJ_id_regCtrl_regToken */ | ||
| 359 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x02,/* [2328] OBJ_id_regCtrl_authenticator */ | ||
| 360 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x03,/* [2337] OBJ_id_regCtrl_pkiPublicationInfo */ | ||
| 361 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x04,/* [2346] OBJ_id_regCtrl_pkiArchiveOptions */ | ||
| 362 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x05,/* [2355] OBJ_id_regCtrl_oldCertID */ | ||
| 363 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x01,0x06,/* [2364] OBJ_id_regCtrl_protocolEncrKey */ | ||
| 364 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x01,/* [2373] OBJ_id_regInfo_utf8Pairs */ | ||
| 365 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x05,0x02,0x02,/* [2382] OBJ_id_regInfo_certReq */ | ||
| 366 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x01, /* [2391] OBJ_id_alg_des40 */ | ||
| 367 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x02, /* [2399] OBJ_id_alg_noSignature */ | ||
| 368 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x03, /* [2407] OBJ_id_alg_dh_sig_hmac_sha1 */ | ||
| 369 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x06,0x04, /* [2415] OBJ_id_alg_dh_pop */ | ||
| 370 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x01, /* [2423] OBJ_id_cmc_statusInfo */ | ||
| 371 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x02, /* [2431] OBJ_id_cmc_identification */ | ||
| 372 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x03, /* [2439] OBJ_id_cmc_identityProof */ | ||
| 373 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x04, /* [2447] OBJ_id_cmc_dataReturn */ | ||
| 374 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x05, /* [2455] OBJ_id_cmc_transactionId */ | ||
| 375 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x06, /* [2463] OBJ_id_cmc_senderNonce */ | ||
| 376 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x07, /* [2471] OBJ_id_cmc_recipientNonce */ | ||
| 377 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x08, /* [2479] OBJ_id_cmc_addExtensions */ | ||
| 378 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x09, /* [2487] OBJ_id_cmc_encryptedPOP */ | ||
| 379 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0A, /* [2495] OBJ_id_cmc_decryptedPOP */ | ||
| 380 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0B, /* [2503] OBJ_id_cmc_lraPOPWitness */ | ||
| 381 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x0F, /* [2511] OBJ_id_cmc_getCert */ | ||
| 382 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x10, /* [2519] OBJ_id_cmc_getCRL */ | ||
| 383 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x11, /* [2527] OBJ_id_cmc_revokeRequest */ | ||
| 384 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x12, /* [2535] OBJ_id_cmc_regInfo */ | ||
| 385 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x13, /* [2543] OBJ_id_cmc_responseInfo */ | ||
| 386 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x15, /* [2551] OBJ_id_cmc_queryPending */ | ||
| 387 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x16, /* [2559] OBJ_id_cmc_popLinkRandom */ | ||
| 388 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x17, /* [2567] OBJ_id_cmc_popLinkWitness */ | ||
| 389 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x07,0x18, /* [2575] OBJ_id_cmc_confirmCertAcceptance */ | ||
| 390 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x08,0x01, /* [2583] OBJ_id_on_personalData */ | ||
| 391 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x01, /* [2591] OBJ_id_pda_dateOfBirth */ | ||
| 392 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x02, /* [2599] OBJ_id_pda_placeOfBirth */ | ||
| 393 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x03, /* [2607] OBJ_id_pda_pseudonym */ | ||
| 394 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x04, /* [2615] OBJ_id_pda_gender */ | ||
| 395 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x05, /* [2623] OBJ_id_pda_countryOfCitizenship */ | ||
| 396 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x09,0x06, /* [2631] OBJ_id_pda_countryOfResidence */ | ||
| 397 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x01, /* [2639] OBJ_id_aca_authenticationInfo */ | ||
| 398 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x02, /* [2647] OBJ_id_aca_accessIdentity */ | ||
| 399 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x03, /* [2655] OBJ_id_aca_chargingIdentity */ | ||
| 400 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x04, /* [2663] OBJ_id_aca_group */ | ||
| 401 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0A,0x05, /* [2671] OBJ_id_aca_role */ | ||
| 402 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0B,0x01, /* [2679] OBJ_id_qcs_pkixQCSyntax_v1 */ | ||
| 403 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x01, /* [2687] OBJ_id_cct_crs */ | ||
| 404 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x02, /* [2695] OBJ_id_cct_PKIData */ | ||
| 405 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x0C,0x03, /* [2703] OBJ_id_cct_PKIResponse */ | ||
| 406 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x03, /* [2711] OBJ_ad_timeStamping */ | ||
| 407 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x04, /* [2719] OBJ_ad_dvcs */ | ||
| 408 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x01,/* [2727] OBJ_id_pkix_OCSP_basic */ | ||
| 409 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x02,/* [2736] OBJ_id_pkix_OCSP_Nonce */ | ||
| 410 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x03,/* [2745] OBJ_id_pkix_OCSP_CrlID */ | ||
| 411 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x04,/* [2754] OBJ_id_pkix_OCSP_acceptableResponses */ | ||
| 412 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x05,/* [2763] OBJ_id_pkix_OCSP_noCheck */ | ||
| 413 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x06,/* [2772] OBJ_id_pkix_OCSP_archiveCutoff */ | ||
| 414 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x07,/* [2781] OBJ_id_pkix_OCSP_serviceLocator */ | ||
| 415 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x08,/* [2790] OBJ_id_pkix_OCSP_extendedStatus */ | ||
| 416 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x09,/* [2799] OBJ_id_pkix_OCSP_valid */ | ||
| 417 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0A,/* [2808] OBJ_id_pkix_OCSP_path */ | ||
| 418 | 0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x0B,/* [2817] OBJ_id_pkix_OCSP_trustRoot */ | ||
| 419 | 0x2B,0x0E,0x03,0x02, /* [2826] OBJ_algorithm */ | ||
| 420 | 0x2B,0x0E,0x03,0x02,0x0B, /* [2830] OBJ_rsaSignature */ | ||
| 421 | 0x55,0x08, /* [2835] OBJ_X500algorithms */ | ||
| 422 | 0x2B, /* [2837] OBJ_org */ | ||
| 423 | 0x2B,0x06, /* [2838] OBJ_dod */ | ||
| 424 | 0x2B,0x06,0x01, /* [2840] OBJ_iana */ | ||
| 425 | 0x2B,0x06,0x01,0x01, /* [2843] OBJ_Directory */ | ||
| 426 | 0x2B,0x06,0x01,0x02, /* [2847] OBJ_Management */ | ||
| 427 | 0x2B,0x06,0x01,0x03, /* [2851] OBJ_Experimental */ | ||
| 428 | 0x2B,0x06,0x01,0x04, /* [2855] OBJ_Private */ | ||
| 429 | 0x2B,0x06,0x01,0x05, /* [2859] OBJ_Security */ | ||
| 430 | 0x2B,0x06,0x01,0x06, /* [2863] OBJ_SNMPv2 */ | ||
| 431 | 0x2B,0x06,0x01,0x07, /* [2867] OBJ_Mail */ | ||
| 432 | 0x01, /* [2871] OBJ_Enterprises */ | ||
| 433 | 0xBA,0x82,0x58, /* [2872] OBJ_dcObject */ | ||
| 434 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,/* [2875] OBJ_domainComponent */ | ||
| 435 | 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x04,0x0D,/* [2885] OBJ_Domain */ | ||
| 436 | }; | ||
| 437 | |||
| 438 | static ASN1_OBJECT nid_objs[NUM_NID]={ | ||
| 439 | {"UNDEF","undefined",NID_undef,1,&(lvalues[0]),0}, | ||
| 440 | {"rsadsi","RSA Data Security, Inc.",NID_rsadsi,6,&(lvalues[1]),0}, | ||
| 441 | {"pkcs","RSA Data Security, Inc. PKCS",NID_pkcs,7,&(lvalues[7]),0}, | ||
| 442 | {"MD2","md2",NID_md2,8,&(lvalues[14]),0}, | ||
| 443 | {"MD5","md5",NID_md5,8,&(lvalues[22]),0}, | ||
| 444 | {"RC4","rc4",NID_rc4,8,&(lvalues[30]),0}, | ||
| 445 | {"rsaEncryption","rsaEncryption",NID_rsaEncryption,9,&(lvalues[38]),0}, | ||
| 446 | {"RSA-MD2","md2WithRSAEncryption",NID_md2WithRSAEncryption,9, | ||
| 447 | &(lvalues[47]),0}, | ||
| 448 | {"RSA-MD5","md5WithRSAEncryption",NID_md5WithRSAEncryption,9, | ||
| 449 | &(lvalues[56]),0}, | ||
| 450 | {"PBE-MD2-DES","pbeWithMD2AndDES-CBC",NID_pbeWithMD2AndDES_CBC,9, | ||
| 451 | &(lvalues[65]),0}, | ||
| 452 | {"PBE-MD5-DES","pbeWithMD5AndDES-CBC",NID_pbeWithMD5AndDES_CBC,9, | ||
| 453 | &(lvalues[74]),0}, | ||
| 454 | {"X500","directory services (X.500)",NID_X500,1,&(lvalues[83]),0}, | ||
| 455 | {"X509","X509",NID_X509,2,&(lvalues[84]),0}, | ||
| 456 | {"CN","commonName",NID_commonName,3,&(lvalues[86]),0}, | ||
| 457 | {"C","countryName",NID_countryName,3,&(lvalues[89]),0}, | ||
| 458 | {"L","localityName",NID_localityName,3,&(lvalues[92]),0}, | ||
| 459 | {"ST","stateOrProvinceName",NID_stateOrProvinceName,3,&(lvalues[95]),0}, | ||
| 460 | {"O","organizationName",NID_organizationName,3,&(lvalues[98]),0}, | ||
| 461 | {"OU","organizationalUnitName",NID_organizationalUnitName,3, | ||
| 462 | &(lvalues[101]),0}, | ||
| 463 | {"RSA","rsa",NID_rsa,4,&(lvalues[104]),0}, | ||
| 464 | {"pkcs7","pkcs7",NID_pkcs7,8,&(lvalues[108]),0}, | ||
| 465 | {"pkcs7-data","pkcs7-data",NID_pkcs7_data,9,&(lvalues[116]),0}, | ||
| 466 | {"pkcs7-signedData","pkcs7-signedData",NID_pkcs7_signed,9, | ||
| 467 | &(lvalues[125]),0}, | ||
| 468 | {"pkcs7-envelopedData","pkcs7-envelopedData",NID_pkcs7_enveloped,9, | ||
| 469 | &(lvalues[134]),0}, | ||
| 470 | {"pkcs7-signedAndEnvelopedData","pkcs7-signedAndEnvelopedData", | ||
| 471 | NID_pkcs7_signedAndEnveloped,9,&(lvalues[143]),0}, | ||
| 472 | {"pkcs7-digestData","pkcs7-digestData",NID_pkcs7_digest,9, | ||
| 473 | &(lvalues[152]),0}, | ||
| 474 | {"pkcs7-encryptedData","pkcs7-encryptedData",NID_pkcs7_encrypted,9, | ||
| 475 | &(lvalues[161]),0}, | ||
| 476 | {"pkcs3","pkcs3",NID_pkcs3,8,&(lvalues[170]),0}, | ||
| 477 | {"dhKeyAgreement","dhKeyAgreement",NID_dhKeyAgreement,9, | ||
| 478 | &(lvalues[178]),0}, | ||
| 479 | {"DES-ECB","des-ecb",NID_des_ecb,5,&(lvalues[187]),0}, | ||
| 480 | {"DES-CFB","des-cfb",NID_des_cfb64,5,&(lvalues[192]),0}, | ||
| 481 | {"DES-CBC","des-cbc",NID_des_cbc,5,&(lvalues[197]),0}, | ||
| 482 | {"DES-EDE","des-ede",NID_des_ede,5,&(lvalues[202]),0}, | ||
| 483 | {"DES-EDE3","des-ede3",NID_des_ede3,0,NULL}, | ||
| 484 | {"IDEA-CBC","idea-cbc",NID_idea_cbc,11,&(lvalues[207]),0}, | ||
| 485 | {"IDEA-CFB","idea-cfb",NID_idea_cfb64,0,NULL}, | ||
| 486 | {"IDEA-ECB","idea-ecb",NID_idea_ecb,0,NULL}, | ||
| 487 | {"RC2-CBC","rc2-cbc",NID_rc2_cbc,8,&(lvalues[218]),0}, | ||
| 488 | {"RC2-ECB","rc2-ecb",NID_rc2_ecb,0,NULL}, | ||
| 489 | {"RC2-CFB","rc2-cfb",NID_rc2_cfb64,0,NULL}, | ||
| 490 | {"RC2-OFB","rc2-ofb",NID_rc2_ofb64,0,NULL}, | ||
| 491 | {"SHA","sha",NID_sha,5,&(lvalues[226]),0}, | ||
| 492 | {"RSA-SHA","shaWithRSAEncryption",NID_shaWithRSAEncryption,5, | ||
| 493 | &(lvalues[231]),0}, | ||
| 494 | {"DES-EDE-CBC","des-ede-cbc",NID_des_ede_cbc,0,NULL}, | ||
| 495 | {"DES-EDE3-CBC","des-ede3-cbc",NID_des_ede3_cbc,8,&(lvalues[236]),0}, | ||
| 496 | {"DES-OFB","des-ofb",NID_des_ofb64,5,&(lvalues[244]),0}, | ||
| 497 | {"IDEA-OFB","idea-ofb",NID_idea_ofb64,0,NULL}, | ||
| 498 | {"pkcs9","pkcs9",NID_pkcs9,8,&(lvalues[249]),0}, | ||
| 499 | {"Email","emailAddress",NID_pkcs9_emailAddress,9,&(lvalues[257]),0}, | ||
| 500 | {"unstructuredName","unstructuredName",NID_pkcs9_unstructuredName,9, | ||
| 501 | &(lvalues[266]),0}, | ||
| 502 | {"contentType","contentType",NID_pkcs9_contentType,9,&(lvalues[275]),0}, | ||
| 503 | {"messageDigest","messageDigest",NID_pkcs9_messageDigest,9, | ||
| 504 | &(lvalues[284]),0}, | ||
| 505 | {"signingTime","signingTime",NID_pkcs9_signingTime,9,&(lvalues[293]),0}, | ||
| 506 | {"countersignature","countersignature",NID_pkcs9_countersignature,9, | ||
| 507 | &(lvalues[302]),0}, | ||
| 508 | {"challengePassword","challengePassword",NID_pkcs9_challengePassword, | ||
| 509 | 9,&(lvalues[311]),0}, | ||
| 510 | {"unstructuredAddress","unstructuredAddress", | ||
| 511 | NID_pkcs9_unstructuredAddress,9,&(lvalues[320]),0}, | ||
| 512 | {"extendedCertificateAttributes","extendedCertificateAttributes", | ||
| 513 | NID_pkcs9_extCertAttributes,9,&(lvalues[329]),0}, | ||
| 514 | {"Netscape","Netscape Communications Corp.",NID_netscape,7, | ||
| 515 | &(lvalues[338]),0}, | ||
| 516 | {"nsCertExt","Netscape Certificate Extension", | ||
| 517 | NID_netscape_cert_extension,8,&(lvalues[345]),0}, | ||
| 518 | {"nsDataType","Netscape Data Type",NID_netscape_data_type,8, | ||
| 519 | &(lvalues[353]),0}, | ||
| 520 | {"DES-EDE-CFB","des-ede-cfb",NID_des_ede_cfb64,0,NULL}, | ||
| 521 | {"DES-EDE3-CFB","des-ede3-cfb",NID_des_ede3_cfb64,0,NULL}, | ||
| 522 | {"DES-EDE-OFB","des-ede-ofb",NID_des_ede_ofb64,0,NULL}, | ||
| 523 | {"DES-EDE3-OFB","des-ede3-ofb",NID_des_ede3_ofb64,0,NULL}, | ||
| 524 | {"SHA1","sha1",NID_sha1,5,&(lvalues[361]),0}, | ||
| 525 | {"RSA-SHA1","sha1WithRSAEncryption",NID_sha1WithRSAEncryption,9, | ||
| 526 | &(lvalues[366]),0}, | ||
| 527 | {"DSA-SHA","dsaWithSHA",NID_dsaWithSHA,5,&(lvalues[375]),0}, | ||
| 528 | {"DSA-old","dsaEncryption-old",NID_dsa_2,5,&(lvalues[380]),0}, | ||
| 529 | {"PBE-SHA1-RC2-64","pbeWithSHA1AndRC2-CBC",NID_pbeWithSHA1AndRC2_CBC, | ||
| 530 | 9,&(lvalues[385]),0}, | ||
| 531 | {"PBKDF2","PBKDF2",NID_id_pbkdf2,9,&(lvalues[394]),0}, | ||
| 532 | {"DSA-SHA1-old","dsaWithSHA1-old",NID_dsaWithSHA1_2,5,&(lvalues[403]),0}, | ||
| 533 | {"nsCertType","Netscape Cert Type",NID_netscape_cert_type,9, | ||
| 534 | &(lvalues[408]),0}, | ||
| 535 | {"nsBaseUrl","Netscape Base Url",NID_netscape_base_url,9, | ||
| 536 | &(lvalues[417]),0}, | ||
| 537 | {"nsRevocationUrl","Netscape Revocation Url", | ||
| 538 | NID_netscape_revocation_url,9,&(lvalues[426]),0}, | ||
| 539 | {"nsCaRevocationUrl","Netscape CA Revocation Url", | ||
| 540 | NID_netscape_ca_revocation_url,9,&(lvalues[435]),0}, | ||
| 541 | {"nsRenewalUrl","Netscape Renewal Url",NID_netscape_renewal_url,9, | ||
| 542 | &(lvalues[444]),0}, | ||
| 543 | {"nsCaPolicyUrl","Netscape CA Policy Url",NID_netscape_ca_policy_url, | ||
| 544 | 9,&(lvalues[453]),0}, | ||
| 545 | {"nsSslServerName","Netscape SSL Server Name", | ||
| 546 | NID_netscape_ssl_server_name,9,&(lvalues[462]),0}, | ||
| 547 | {"nsComment","Netscape Comment",NID_netscape_comment,9,&(lvalues[471]),0}, | ||
| 548 | {"nsCertSequence","Netscape Certificate Sequence", | ||
| 549 | NID_netscape_cert_sequence,9,&(lvalues[480]),0}, | ||
| 550 | {"DESX-CBC","desx-cbc",NID_desx_cbc,0,NULL}, | ||
| 551 | {"id-ce","id-ce",NID_id_ce,2,&(lvalues[489]),0}, | ||
| 552 | {"subjectKeyIdentifier","X509v3 Subject Key Identifier", | ||
| 553 | NID_subject_key_identifier,3,&(lvalues[491]),0}, | ||
| 554 | {"keyUsage","X509v3 Key Usage",NID_key_usage,3,&(lvalues[494]),0}, | ||
| 555 | {"privateKeyUsagePeriod","X509v3 Private Key Usage Period", | ||
| 556 | NID_private_key_usage_period,3,&(lvalues[497]),0}, | ||
| 557 | {"subjectAltName","X509v3 Subject Alternative Name", | ||
| 558 | NID_subject_alt_name,3,&(lvalues[500]),0}, | ||
| 559 | {"issuerAltName","X509v3 Issuer Alternative Name",NID_issuer_alt_name, | ||
| 560 | 3,&(lvalues[503]),0}, | ||
| 561 | {"basicConstraints","X509v3 Basic Constraints",NID_basic_constraints, | ||
| 562 | 3,&(lvalues[506]),0}, | ||
| 563 | {"crlNumber","X509v3 CRL Number",NID_crl_number,3,&(lvalues[509]),0}, | ||
| 564 | {"certificatePolicies","X509v3 Certificate Policies", | ||
| 565 | NID_certificate_policies,3,&(lvalues[512]),0}, | ||
| 566 | {"authorityKeyIdentifier","X509v3 Authority Key Identifier", | ||
| 567 | NID_authority_key_identifier,3,&(lvalues[515]),0}, | ||
| 568 | {"BF-CBC","bf-cbc",NID_bf_cbc,9,&(lvalues[518]),0}, | ||
| 569 | {"BF-ECB","bf-ecb",NID_bf_ecb,0,NULL}, | ||
| 570 | {"BF-CFB","bf-cfb",NID_bf_cfb64,0,NULL}, | ||
| 571 | {"BF-OFB","bf-ofb",NID_bf_ofb64,0,NULL}, | ||
| 572 | {"MDC2","mdc2",NID_mdc2,4,&(lvalues[527]),0}, | ||
| 573 | {"RSA-MDC2","mdc2WithRSA",NID_mdc2WithRSA,4,&(lvalues[531]),0}, | ||
| 574 | {"RC4-40","rc4-40",NID_rc4_40,0,NULL}, | ||
| 575 | {"RC2-40-CBC","rc2-40-cbc",NID_rc2_40_cbc,0,NULL}, | ||
| 576 | {"G","givenName",NID_givenName,3,&(lvalues[535]),0}, | ||
| 577 | {"S","surname",NID_surname,3,&(lvalues[538]),0}, | ||
| 578 | {"I","initials",NID_initials,3,&(lvalues[541]),0}, | ||
| 579 | {"UID","uniqueIdentifier",NID_uniqueIdentifier,3,&(lvalues[544]),0}, | ||
| 580 | {"crlDistributionPoints","X509v3 CRL Distribution Points", | ||
| 581 | NID_crl_distribution_points,3,&(lvalues[547]),0}, | ||
| 582 | {"RSA-NP-MD5","md5WithRSA",NID_md5WithRSA,5,&(lvalues[550]),0}, | ||
| 583 | {"SN","serialNumber",NID_serialNumber,3,&(lvalues[555]),0}, | ||
| 584 | {"T","title",NID_title,3,&(lvalues[558]),0}, | ||
| 585 | {"D","description",NID_description,3,&(lvalues[561]),0}, | ||
| 586 | {"CAST5-CBC","cast5-cbc",NID_cast5_cbc,9,&(lvalues[564]),0}, | ||
| 587 | {"CAST5-ECB","cast5-ecb",NID_cast5_ecb,0,NULL}, | ||
| 588 | {"CAST5-CFB","cast5-cfb",NID_cast5_cfb64,0,NULL}, | ||
| 589 | {"CAST5-OFB","cast5-ofb",NID_cast5_ofb64,0,NULL}, | ||
| 590 | {"pbeWithMD5AndCast5CBC","pbeWithMD5AndCast5CBC", | ||
| 591 | NID_pbeWithMD5AndCast5_CBC,9,&(lvalues[573]),0}, | ||
| 592 | {"DSA-SHA1","dsaWithSHA1",NID_dsaWithSHA1,7,&(lvalues[582]),0}, | ||
| 593 | {"MD5-SHA1","md5-sha1",NID_md5_sha1,0,NULL}, | ||
| 594 | {"RSA-SHA1-2","sha1WithRSA",NID_sha1WithRSA,5,&(lvalues[589]),0}, | ||
| 595 | {"DSA","dsaEncryption",NID_dsa,7,&(lvalues[594]),0}, | ||
| 596 | {"RIPEMD160","ripemd160",NID_ripemd160,5,&(lvalues[601]),0}, | ||
| 597 | {NULL,NULL,NID_undef,0,NULL}, | ||
| 598 | {"RSA-RIPEMD160","ripemd160WithRSA",NID_ripemd160WithRSA,6, | ||
| 599 | &(lvalues[606]),0}, | ||
| 600 | {"RC5-CBC","rc5-cbc",NID_rc5_cbc,8,&(lvalues[612]),0}, | ||
| 601 | {"RC5-ECB","rc5-ecb",NID_rc5_ecb,0,NULL}, | ||
| 602 | {"RC5-CFB","rc5-cfb",NID_rc5_cfb64,0,NULL}, | ||
| 603 | {"RC5-OFB","rc5-ofb",NID_rc5_ofb64,0,NULL}, | ||
| 604 | {"RLE","run length compression",NID_rle_compression,6,&(lvalues[620]),0}, | ||
| 605 | {"ZLIB","zlib compression",NID_zlib_compression,6,&(lvalues[626]),0}, | ||
| 606 | {"extendedKeyUsage","X509v3 Extended Key Usage",NID_ext_key_usage,3, | ||
| 607 | &(lvalues[632]),0}, | ||
| 608 | {"PKIX","PKIX",NID_id_pkix,6,&(lvalues[635]),0}, | ||
| 609 | {"id-kp","id-kp",NID_id_kp,7,&(lvalues[641]),0}, | ||
| 610 | {"serverAuth","TLS Web Server Authentication",NID_server_auth,8, | ||
| 611 | &(lvalues[648]),0}, | ||
| 612 | {"clientAuth","TLS Web Client Authentication",NID_client_auth,8, | ||
| 613 | &(lvalues[656]),0}, | ||
| 614 | {"codeSigning","Code Signing",NID_code_sign,8,&(lvalues[664]),0}, | ||
| 615 | {"emailProtection","E-mail Protection",NID_email_protect,8, | ||
| 616 | &(lvalues[672]),0}, | ||
| 617 | {"timeStamping","Time Stamping",NID_time_stamp,8,&(lvalues[680]),0}, | ||
| 618 | {"msCodeInd","Microsoft Individual Code Signing",NID_ms_code_ind,10, | ||
| 619 | &(lvalues[688]),0}, | ||
| 620 | {"msCodeCom","Microsoft Commercial Code Signing",NID_ms_code_com,10, | ||
| 621 | &(lvalues[698]),0}, | ||
| 622 | {"msCTLSign","Microsoft Trust List Signing",NID_ms_ctl_sign,10, | ||
| 623 | &(lvalues[708]),0}, | ||
| 624 | {"msSGC","Microsoft Server Gated Crypto",NID_ms_sgc,10,&(lvalues[718]),0}, | ||
| 625 | {"msEFS","Microsoft Encrypted File System",NID_ms_efs,10, | ||
| 626 | &(lvalues[728]),0}, | ||
| 627 | {"nsSGC","Netscape Server Gated Crypto",NID_ns_sgc,9,&(lvalues[738]),0}, | ||
| 628 | {"deltaCRL","X509v3 Delta CRL Indicator",NID_delta_crl,3, | ||
| 629 | &(lvalues[747]),0}, | ||
| 630 | {"CRLReason","X509v3 CRL Reason Code",NID_crl_reason,3,&(lvalues[750]),0}, | ||
| 631 | {"invalidityDate","Invalidity Date",NID_invalidity_date,3, | ||
| 632 | &(lvalues[753]),0}, | ||
| 633 | {"SXNetID","Strong Extranet ID",NID_sxnet,5,&(lvalues[756]),0}, | ||
| 634 | {"PBE-SHA1-RC4-128","pbeWithSHA1And128BitRC4", | ||
| 635 | NID_pbe_WithSHA1And128BitRC4,10,&(lvalues[761]),0}, | ||
| 636 | {"PBE-SHA1-RC4-40","pbeWithSHA1And40BitRC4", | ||
| 637 | NID_pbe_WithSHA1And40BitRC4,10,&(lvalues[771]),0}, | ||
| 638 | {"PBE-SHA1-3DES","pbeWithSHA1And3-KeyTripleDES-CBC", | ||
| 639 | NID_pbe_WithSHA1And3_Key_TripleDES_CBC,10,&(lvalues[781]),0}, | ||
| 640 | {"PBE-SHA1-2DES","pbeWithSHA1And2-KeyTripleDES-CBC", | ||
| 641 | NID_pbe_WithSHA1And2_Key_TripleDES_CBC,10,&(lvalues[791]),0}, | ||
| 642 | {"PBE-SHA1-RC2-128","pbeWithSHA1And128BitRC2-CBC", | ||
| 643 | NID_pbe_WithSHA1And128BitRC2_CBC,10,&(lvalues[801]),0}, | ||
| 644 | {"PBE-SHA1-RC2-40","pbeWithSHA1And40BitRC2-CBC", | ||
| 645 | NID_pbe_WithSHA1And40BitRC2_CBC,10,&(lvalues[811]),0}, | ||
| 646 | {"keyBag","keyBag",NID_keyBag,11,&(lvalues[821]),0}, | ||
| 647 | {"pkcs8ShroudedKeyBag","pkcs8ShroudedKeyBag",NID_pkcs8ShroudedKeyBag, | ||
| 648 | 11,&(lvalues[832]),0}, | ||
| 649 | {"certBag","certBag",NID_certBag,11,&(lvalues[843]),0}, | ||
| 650 | {"crlBag","crlBag",NID_crlBag,11,&(lvalues[854]),0}, | ||
| 651 | {"secretBag","secretBag",NID_secretBag,11,&(lvalues[865]),0}, | ||
| 652 | {"safeContentsBag","safeContentsBag",NID_safeContentsBag,11, | ||
| 653 | &(lvalues[876]),0}, | ||
| 654 | {"friendlyName","friendlyName",NID_friendlyName,9,&(lvalues[887]),0}, | ||
| 655 | {"localKeyID","localKeyID",NID_localKeyID,9,&(lvalues[896]),0}, | ||
| 656 | {"x509Certificate","x509Certificate",NID_x509Certificate,10, | ||
| 657 | &(lvalues[905]),0}, | ||
| 658 | {"sdsiCertificate","sdsiCertificate",NID_sdsiCertificate,10, | ||
| 659 | &(lvalues[915]),0}, | ||
| 660 | {"x509Crl","x509Crl",NID_x509Crl,10,&(lvalues[925]),0}, | ||
| 661 | {"PBES2","PBES2",NID_pbes2,9,&(lvalues[935]),0}, | ||
| 662 | {"PBMAC1","PBMAC1",NID_pbmac1,9,&(lvalues[944]),0}, | ||
| 663 | {"hmacWithSHA1","hmacWithSHA1",NID_hmacWithSHA1,8,&(lvalues[953]),0}, | ||
| 664 | {"id-qt-cps","Policy Qualifier CPS",NID_id_qt_cps,8,&(lvalues[961]),0}, | ||
| 665 | {"id-qt-unotice","Policy Qualifier User Notice",NID_id_qt_unotice,8, | ||
| 666 | &(lvalues[969]),0}, | ||
| 667 | {"RC2-64-CBC","rc2-64-cbc",NID_rc2_64_cbc,0,NULL}, | ||
| 668 | {"SMIME-CAPS","S/MIME Capabilities",NID_SMIMECapabilities,9, | ||
| 669 | &(lvalues[977]),0}, | ||
| 670 | {"PBE-MD2-RC2-64","pbeWithMD2AndRC2-CBC",NID_pbeWithMD2AndRC2_CBC,9, | ||
| 671 | &(lvalues[986]),0}, | ||
| 672 | {"PBE-MD5-RC2-64","pbeWithMD5AndRC2-CBC",NID_pbeWithMD5AndRC2_CBC,9, | ||
| 673 | &(lvalues[995]),0}, | ||
| 674 | {"PBE-SHA1-DES","pbeWithSHA1AndDES-CBC",NID_pbeWithSHA1AndDES_CBC,9, | ||
| 675 | &(lvalues[1004]),0}, | ||
| 676 | {"msExtReq","Microsoft Extension Request",NID_ms_ext_req,10, | ||
| 677 | &(lvalues[1013]),0}, | ||
| 678 | {"extReq","Extension Request",NID_ext_req,9,&(lvalues[1023]),0}, | ||
| 679 | {"name","name",NID_name,3,&(lvalues[1032]),0}, | ||
| 680 | {"dnQualifier","dnQualifier",NID_dnQualifier,3,&(lvalues[1035]),0}, | ||
| 681 | {"id-pe","id-pe",NID_id_pe,7,&(lvalues[1038]),0}, | ||
| 682 | {"id-ad","id-ad",NID_id_ad,7,&(lvalues[1045]),0}, | ||
| 683 | {"authorityInfoAccess","Authority Information Access",NID_info_access, | ||
| 684 | 8,&(lvalues[1052]),0}, | ||
| 685 | {"OCSP","OCSP",NID_ad_OCSP,8,&(lvalues[1060]),0}, | ||
| 686 | {"caIssuers","CA Issuers",NID_ad_ca_issuers,8,&(lvalues[1068]),0}, | ||
| 687 | {"OCSPSigning","OCSP Signing",NID_OCSP_sign,8,&(lvalues[1076]),0}, | ||
| 688 | {"ISO","iso",NID_iso,1,&(lvalues[1084]),0}, | ||
| 689 | {"member-body","ISO Member Body",NID_member_body,1,&(lvalues[1085]),0}, | ||
| 690 | {"ISO-US","ISO US Member Body",NID_ISO_US,3,&(lvalues[1086]),0}, | ||
| 691 | {"X9-57","X9.57",NID_X9_57,5,&(lvalues[1089]),0}, | ||
| 692 | {"X9cm","X9.57 CM ?",NID_X9cm,6,&(lvalues[1094]),0}, | ||
| 693 | {"pkcs1","pkcs1",NID_pkcs1,8,&(lvalues[1100]),0}, | ||
| 694 | {"pkcs5","pkcs5",NID_pkcs5,8,&(lvalues[1108]),0}, | ||
| 695 | {"SMIME","S/MIME",NID_SMIME,9,&(lvalues[1116]),0}, | ||
| 696 | {"id-smime-mod","id-smime-mod",NID_id_smime_mod,10,&(lvalues[1125]),0}, | ||
| 697 | {"id-smime-ct","id-smime-ct",NID_id_smime_ct,10,&(lvalues[1135]),0}, | ||
| 698 | {"id-smime-aa","id-smime-aa",NID_id_smime_aa,10,&(lvalues[1145]),0}, | ||
| 699 | {"id-smime-alg","id-smime-alg",NID_id_smime_alg,10,&(lvalues[1155]),0}, | ||
| 700 | {"id-smime-cd","id-smime-cd",NID_id_smime_cd,10,&(lvalues[1165]),0}, | ||
| 701 | {"id-smime-spq","id-smime-spq",NID_id_smime_spq,10,&(lvalues[1175]),0}, | ||
| 702 | {"id-smime-cti","id-smime-cti",NID_id_smime_cti,10,&(lvalues[1185]),0}, | ||
| 703 | {"id-smime-mod-cms","id-smime-mod-cms",NID_id_smime_mod_cms,11, | ||
| 704 | &(lvalues[1195]),0}, | ||
| 705 | {"id-smime-mod-ess","id-smime-mod-ess",NID_id_smime_mod_ess,11, | ||
| 706 | &(lvalues[1206]),0}, | ||
| 707 | {"id-smime-mod-oid","id-smime-mod-oid",NID_id_smime_mod_oid,11, | ||
| 708 | &(lvalues[1217]),0}, | ||
| 709 | {"id-smime-mod-msg-v3","id-smime-mod-msg-v3",NID_id_smime_mod_msg_v3, | ||
| 710 | 11,&(lvalues[1228]),0}, | ||
| 711 | {"id-smime-mod-ets-eSignature-88","id-smime-mod-ets-eSignature-88", | ||
| 712 | NID_id_smime_mod_ets_eSignature_88,11,&(lvalues[1239]),0}, | ||
| 713 | {"id-smime-mod-ets-eSignature-97","id-smime-mod-ets-eSignature-97", | ||
| 714 | NID_id_smime_mod_ets_eSignature_97,11,&(lvalues[1250]),0}, | ||
| 715 | {"id-smime-mod-ets-eSigPolicy-88","id-smime-mod-ets-eSigPolicy-88", | ||
| 716 | NID_id_smime_mod_ets_eSigPolicy_88,11,&(lvalues[1261]),0}, | ||
| 717 | {"id-smime-mod-ets-eSigPolicy-97","id-smime-mod-ets-eSigPolicy-97", | ||
| 718 | NID_id_smime_mod_ets_eSigPolicy_97,11,&(lvalues[1272]),0}, | ||
| 719 | {"id-smime-ct-receipt","id-smime-ct-receipt",NID_id_smime_ct_receipt, | ||
| 720 | 11,&(lvalues[1283]),0}, | ||
| 721 | {"id-smime-ct-authData","id-smime-ct-authData", | ||
| 722 | NID_id_smime_ct_authData,11,&(lvalues[1294]),0}, | ||
| 723 | {"id-smime-ct-publishCert","id-smime-ct-publishCert", | ||
| 724 | NID_id_smime_ct_publishCert,11,&(lvalues[1305]),0}, | ||
| 725 | {"id-smime-ct-TSTInfo","id-smime-ct-TSTInfo",NID_id_smime_ct_TSTInfo, | ||
| 726 | 11,&(lvalues[1316]),0}, | ||
| 727 | {"id-smime-ct-TDTInfo","id-smime-ct-TDTInfo",NID_id_smime_ct_TDTInfo, | ||
| 728 | 11,&(lvalues[1327]),0}, | ||
| 729 | {"id-smime-ct-contentInfo","id-smime-ct-contentInfo", | ||
| 730 | NID_id_smime_ct_contentInfo,11,&(lvalues[1338]),0}, | ||
| 731 | {"id-smime-ct-DVCSRequestData","id-smime-ct-DVCSRequestData", | ||
| 732 | NID_id_smime_ct_DVCSRequestData,11,&(lvalues[1349]),0}, | ||
| 733 | {"id-smime-ct-DVCSResponseData","id-smime-ct-DVCSResponseData", | ||
| 734 | NID_id_smime_ct_DVCSResponseData,11,&(lvalues[1360]),0}, | ||
| 735 | {"id-smime-aa-receiptRequest","id-smime-aa-receiptRequest", | ||
| 736 | NID_id_smime_aa_receiptRequest,11,&(lvalues[1371]),0}, | ||
| 737 | {"id-smime-aa-securityLabel","id-smime-aa-securityLabel", | ||
| 738 | NID_id_smime_aa_securityLabel,11,&(lvalues[1382]),0}, | ||
| 739 | {"id-smime-aa-mlExpandHistory","id-smime-aa-mlExpandHistory", | ||
| 740 | NID_id_smime_aa_mlExpandHistory,11,&(lvalues[1393]),0}, | ||
| 741 | {"id-smime-aa-contentHint","id-smime-aa-contentHint", | ||
| 742 | NID_id_smime_aa_contentHint,11,&(lvalues[1404]),0}, | ||
| 743 | {"id-smime-aa-msgSigDigest","id-smime-aa-msgSigDigest", | ||
| 744 | NID_id_smime_aa_msgSigDigest,11,&(lvalues[1415]),0}, | ||
| 745 | {"id-smime-aa-encapContentType","id-smime-aa-encapContentType", | ||
| 746 | NID_id_smime_aa_encapContentType,11,&(lvalues[1426]),0}, | ||
| 747 | {"id-smime-aa-contentIdentifier","id-smime-aa-contentIdentifier", | ||
| 748 | NID_id_smime_aa_contentIdentifier,11,&(lvalues[1437]),0}, | ||
| 749 | {"id-smime-aa-macValue","id-smime-aa-macValue", | ||
| 750 | NID_id_smime_aa_macValue,11,&(lvalues[1448]),0}, | ||
| 751 | {"id-smime-aa-equivalentLabels","id-smime-aa-equivalentLabels", | ||
| 752 | NID_id_smime_aa_equivalentLabels,11,&(lvalues[1459]),0}, | ||
| 753 | {"id-smime-aa-contentReference","id-smime-aa-contentReference", | ||
| 754 | NID_id_smime_aa_contentReference,11,&(lvalues[1470]),0}, | ||
| 755 | {"id-smime-aa-encrypKeyPref","id-smime-aa-encrypKeyPref", | ||
| 756 | NID_id_smime_aa_encrypKeyPref,11,&(lvalues[1481]),0}, | ||
| 757 | {"id-smime-aa-signingCertificate","id-smime-aa-signingCertificate", | ||
| 758 | NID_id_smime_aa_signingCertificate,11,&(lvalues[1492]),0}, | ||
| 759 | {"id-smime-aa-smimeEncryptCerts","id-smime-aa-smimeEncryptCerts", | ||
| 760 | NID_id_smime_aa_smimeEncryptCerts,11,&(lvalues[1503]),0}, | ||
| 761 | {"id-smime-aa-timeStampToken","id-smime-aa-timeStampToken", | ||
| 762 | NID_id_smime_aa_timeStampToken,11,&(lvalues[1514]),0}, | ||
| 763 | {"id-smime-aa-ets-sigPolicyId","id-smime-aa-ets-sigPolicyId", | ||
| 764 | NID_id_smime_aa_ets_sigPolicyId,11,&(lvalues[1525]),0}, | ||
| 765 | {"id-smime-aa-ets-commitmentType","id-smime-aa-ets-commitmentType", | ||
| 766 | NID_id_smime_aa_ets_commitmentType,11,&(lvalues[1536]),0}, | ||
| 767 | {"id-smime-aa-ets-signerLocation","id-smime-aa-ets-signerLocation", | ||
| 768 | NID_id_smime_aa_ets_signerLocation,11,&(lvalues[1547]),0}, | ||
| 769 | {"id-smime-aa-ets-signerAttr","id-smime-aa-ets-signerAttr", | ||
| 770 | NID_id_smime_aa_ets_signerAttr,11,&(lvalues[1558]),0}, | ||
| 771 | {"id-smime-aa-ets-otherSigCert","id-smime-aa-ets-otherSigCert", | ||
| 772 | NID_id_smime_aa_ets_otherSigCert,11,&(lvalues[1569]),0}, | ||
| 773 | {"id-smime-aa-ets-contentTimestamp", | ||
| 774 | "id-smime-aa-ets-contentTimestamp", | ||
| 775 | NID_id_smime_aa_ets_contentTimestamp,11,&(lvalues[1580]),0}, | ||
| 776 | {"id-smime-aa-ets-CertificateRefs","id-smime-aa-ets-CertificateRefs", | ||
| 777 | NID_id_smime_aa_ets_CertificateRefs,11,&(lvalues[1591]),0}, | ||
| 778 | {"id-smime-aa-ets-RevocationRefs","id-smime-aa-ets-RevocationRefs", | ||
| 779 | NID_id_smime_aa_ets_RevocationRefs,11,&(lvalues[1602]),0}, | ||
| 780 | {"id-smime-aa-ets-certValues","id-smime-aa-ets-certValues", | ||
| 781 | NID_id_smime_aa_ets_certValues,11,&(lvalues[1613]),0}, | ||
| 782 | {"id-smime-aa-ets-revocationValues", | ||
| 783 | "id-smime-aa-ets-revocationValues", | ||
| 784 | NID_id_smime_aa_ets_revocationValues,11,&(lvalues[1624]),0}, | ||
| 785 | {"id-smime-aa-ets-escTimeStamp","id-smime-aa-ets-escTimeStamp", | ||
| 786 | NID_id_smime_aa_ets_escTimeStamp,11,&(lvalues[1635]),0}, | ||
| 787 | {"id-smime-aa-ets-certCRLTimestamp", | ||
| 788 | "id-smime-aa-ets-certCRLTimestamp", | ||
| 789 | NID_id_smime_aa_ets_certCRLTimestamp,11,&(lvalues[1646]),0}, | ||
| 790 | {"id-smime-aa-ets-archiveTimeStamp", | ||
| 791 | "id-smime-aa-ets-archiveTimeStamp", | ||
| 792 | NID_id_smime_aa_ets_archiveTimeStamp,11,&(lvalues[1657]),0}, | ||
| 793 | {"id-smime-aa-signatureType","id-smime-aa-signatureType", | ||
| 794 | NID_id_smime_aa_signatureType,11,&(lvalues[1668]),0}, | ||
| 795 | {"id-smime-aa-dvcs-dvc","id-smime-aa-dvcs-dvc", | ||
| 796 | NID_id_smime_aa_dvcs_dvc,11,&(lvalues[1679]),0}, | ||
| 797 | {"id-smime-alg-ESDHwith3DES","id-smime-alg-ESDHwith3DES", | ||
| 798 | NID_id_smime_alg_ESDHwith3DES,11,&(lvalues[1690]),0}, | ||
| 799 | {"id-smime-alg-ESDHwithRC2","id-smime-alg-ESDHwithRC2", | ||
| 800 | NID_id_smime_alg_ESDHwithRC2,11,&(lvalues[1701]),0}, | ||
| 801 | {"id-smime-alg-3DESwrap","id-smime-alg-3DESwrap", | ||
| 802 | NID_id_smime_alg_3DESwrap,11,&(lvalues[1712]),0}, | ||
| 803 | {"id-smime-alg-RC2wrap","id-smime-alg-RC2wrap", | ||
| 804 | NID_id_smime_alg_RC2wrap,11,&(lvalues[1723]),0}, | ||
| 805 | {"id-smime-alg-ESDH","id-smime-alg-ESDH",NID_id_smime_alg_ESDH,11, | ||
| 806 | &(lvalues[1734]),0}, | ||
| 807 | {"id-smime-alg-CMS3DESwrap","id-smime-alg-CMS3DESwrap", | ||
| 808 | NID_id_smime_alg_CMS3DESwrap,11,&(lvalues[1745]),0}, | ||
| 809 | {"id-smime-alg-CMSRC2wrap","id-smime-alg-CMSRC2wrap", | ||
| 810 | NID_id_smime_alg_CMSRC2wrap,11,&(lvalues[1756]),0}, | ||
| 811 | {"id-smime-cd-ldap","id-smime-cd-ldap",NID_id_smime_cd_ldap,11, | ||
| 812 | &(lvalues[1767]),0}, | ||
| 813 | {"id-smime-spq-ets-sqt-uri","id-smime-spq-ets-sqt-uri", | ||
| 814 | NID_id_smime_spq_ets_sqt_uri,11,&(lvalues[1778]),0}, | ||
| 815 | {"id-smime-spq-ets-sqt-unotice","id-smime-spq-ets-sqt-unotice", | ||
| 816 | NID_id_smime_spq_ets_sqt_unotice,11,&(lvalues[1789]),0}, | ||
| 817 | {"id-smime-cti-ets-proofOfOrigin","id-smime-cti-ets-proofOfOrigin", | ||
| 818 | NID_id_smime_cti_ets_proofOfOrigin,11,&(lvalues[1800]),0}, | ||
| 819 | {"id-smime-cti-ets-proofOfReceipt","id-smime-cti-ets-proofOfReceipt", | ||
| 820 | NID_id_smime_cti_ets_proofOfReceipt,11,&(lvalues[1811]),0}, | ||
| 821 | {"id-smime-cti-ets-proofOfDelivery", | ||
| 822 | "id-smime-cti-ets-proofOfDelivery", | ||
| 823 | NID_id_smime_cti_ets_proofOfDelivery,11,&(lvalues[1822]),0}, | ||
| 824 | {"id-smime-cti-ets-proofOfSender","id-smime-cti-ets-proofOfSender", | ||
| 825 | NID_id_smime_cti_ets_proofOfSender,11,&(lvalues[1833]),0}, | ||
| 826 | {"id-smime-cti-ets-proofOfApproval", | ||
| 827 | "id-smime-cti-ets-proofOfApproval", | ||
| 828 | NID_id_smime_cti_ets_proofOfApproval,11,&(lvalues[1844]),0}, | ||
| 829 | {"id-smime-cti-ets-proofOfCreation", | ||
| 830 | "id-smime-cti-ets-proofOfCreation", | ||
| 831 | NID_id_smime_cti_ets_proofOfCreation,11,&(lvalues[1855]),0}, | ||
| 832 | {"MD4","md4",NID_md4,8,&(lvalues[1866]),0}, | ||
| 833 | {"id-pkix-mod","id-pkix-mod",NID_id_pkix_mod,7,&(lvalues[1874]),0}, | ||
| 834 | {"id-qt","id-qt",NID_id_qt,7,&(lvalues[1881]),0}, | ||
| 835 | {"id-it","id-it",NID_id_it,7,&(lvalues[1888]),0}, | ||
| 836 | {"id-pkip","id-pkip",NID_id_pkip,7,&(lvalues[1895]),0}, | ||
| 837 | {"id-alg","id-alg",NID_id_alg,7,&(lvalues[1902]),0}, | ||
| 838 | {"id-cmc","id-cmc",NID_id_cmc,7,&(lvalues[1909]),0}, | ||
| 839 | {"id-on","id-on",NID_id_on,7,&(lvalues[1916]),0}, | ||
| 840 | {"id-pda","id-pda",NID_id_pda,7,&(lvalues[1923]),0}, | ||
| 841 | {"id-aca","id-aca",NID_id_aca,7,&(lvalues[1930]),0}, | ||
| 842 | {"id-qcs","id-qcs",NID_id_qcs,7,&(lvalues[1937]),0}, | ||
| 843 | {"id-cct","id-cct",NID_id_cct,7,&(lvalues[1944]),0}, | ||
| 844 | {"id-pkix1-explicit-88","id-pkix1-explicit-88", | ||
| 845 | NID_id_pkix1_explicit_88,8,&(lvalues[1951]),0}, | ||
| 846 | {"id-pkix1-implicit-88","id-pkix1-implicit-88", | ||
| 847 | NID_id_pkix1_implicit_88,8,&(lvalues[1959]),0}, | ||
| 848 | {"id-pkix1-explicit-93","id-pkix1-explicit-93", | ||
| 849 | NID_id_pkix1_explicit_93,8,&(lvalues[1967]),0}, | ||
| 850 | {"id-pkix1-implicit-93","id-pkix1-implicit-93", | ||
| 851 | NID_id_pkix1_implicit_93,8,&(lvalues[1975]),0}, | ||
| 852 | {"id-mod-crmf","id-mod-crmf",NID_id_mod_crmf,8,&(lvalues[1983]),0}, | ||
| 853 | {"id-mod-cmc","id-mod-cmc",NID_id_mod_cmc,8,&(lvalues[1991]),0}, | ||
| 854 | {"id-mod-kea-profile-88","id-mod-kea-profile-88", | ||
| 855 | NID_id_mod_kea_profile_88,8,&(lvalues[1999]),0}, | ||
| 856 | {"id-mod-kea-profile-93","id-mod-kea-profile-93", | ||
| 857 | NID_id_mod_kea_profile_93,8,&(lvalues[2007]),0}, | ||
| 858 | {"id-mod-cmp","id-mod-cmp",NID_id_mod_cmp,8,&(lvalues[2015]),0}, | ||
| 859 | {"id-mod-qualified-cert-88","id-mod-qualified-cert-88", | ||
| 860 | NID_id_mod_qualified_cert_88,8,&(lvalues[2023]),0}, | ||
| 861 | {"id-mod-qualified-cert-93","id-mod-qualified-cert-93", | ||
| 862 | NID_id_mod_qualified_cert_93,8,&(lvalues[2031]),0}, | ||
| 863 | {"id-mod-attribute-cert","id-mod-attribute-cert", | ||
| 864 | NID_id_mod_attribute_cert,8,&(lvalues[2039]),0}, | ||
| 865 | {"id-mod-timestamp-protocol","id-mod-timestamp-protocol", | ||
| 866 | NID_id_mod_timestamp_protocol,8,&(lvalues[2047]),0}, | ||
| 867 | {"id-mod-ocsp","id-mod-ocsp",NID_id_mod_ocsp,8,&(lvalues[2055]),0}, | ||
| 868 | {"id-mod-dvcs","id-mod-dvcs",NID_id_mod_dvcs,8,&(lvalues[2063]),0}, | ||
| 869 | {"id-mod-cmp2000","id-mod-cmp2000",NID_id_mod_cmp2000,8, | ||
| 870 | &(lvalues[2071]),0}, | ||
| 871 | {"biometricInfo","Biometric Info",NID_biometricInfo,8,&(lvalues[2079]),0}, | ||
| 872 | {"qcStatements","qcStatements",NID_qcStatements,8,&(lvalues[2087]),0}, | ||
| 873 | {"ac-auditEntity","ac-auditEntity",NID_ac_auditEntity,8, | ||
| 874 | &(lvalues[2095]),0}, | ||
| 875 | {"ac-targeting","ac-targeting",NID_ac_targeting,8,&(lvalues[2103]),0}, | ||
| 876 | {"aaControls","aaControls",NID_aaControls,8,&(lvalues[2111]),0}, | ||
| 877 | {"sbqp-ipAddrBlock","sbqp-ipAddrBlock",NID_sbqp_ipAddrBlock,8, | ||
| 878 | &(lvalues[2119]),0}, | ||
| 879 | {"sbqp-autonomousSysNum","sbqp-autonomousSysNum", | ||
| 880 | NID_sbqp_autonomousSysNum,8,&(lvalues[2127]),0}, | ||
| 881 | {"sbqp-routerIdentifier","sbqp-routerIdentifier", | ||
| 882 | NID_sbqp_routerIdentifier,8,&(lvalues[2135]),0}, | ||
| 883 | {"textNotice","textNotice",NID_textNotice,8,&(lvalues[2143]),0}, | ||
| 884 | {"ipsecEndSystem","IPSec End System",NID_ipsecEndSystem,8, | ||
| 885 | &(lvalues[2151]),0}, | ||
| 886 | {"ipsecTunnel","IPSec Tunnel",NID_ipsecTunnel,8,&(lvalues[2159]),0}, | ||
| 887 | {"ipsecUser","IPSec User",NID_ipsecUser,8,&(lvalues[2167]),0}, | ||
| 888 | {"DVCS","dvcs",NID_dvcs,8,&(lvalues[2175]),0}, | ||
| 889 | {"id-it-caProtEncCert","id-it-caProtEncCert",NID_id_it_caProtEncCert, | ||
| 890 | 8,&(lvalues[2183]),0}, | ||
| 891 | {"id-it-signKeyPairTypes","id-it-signKeyPairTypes", | ||
| 892 | NID_id_it_signKeyPairTypes,8,&(lvalues[2191]),0}, | ||
| 893 | {"id-it-encKeyPairTypes","id-it-encKeyPairTypes", | ||
| 894 | NID_id_it_encKeyPairTypes,8,&(lvalues[2199]),0}, | ||
| 895 | {"id-it-preferredSymmAlg","id-it-preferredSymmAlg", | ||
| 896 | NID_id_it_preferredSymmAlg,8,&(lvalues[2207]),0}, | ||
| 897 | {"id-it-caKeyUpdateInfo","id-it-caKeyUpdateInfo", | ||
| 898 | NID_id_it_caKeyUpdateInfo,8,&(lvalues[2215]),0}, | ||
| 899 | {"id-it-currentCRL","id-it-currentCRL",NID_id_it_currentCRL,8, | ||
| 900 | &(lvalues[2223]),0}, | ||
| 901 | {"id-it-unsupportedOIDs","id-it-unsupportedOIDs", | ||
| 902 | NID_id_it_unsupportedOIDs,8,&(lvalues[2231]),0}, | ||
| 903 | {"id-it-subscriptionRequest","id-it-subscriptionRequest", | ||
| 904 | NID_id_it_subscriptionRequest,8,&(lvalues[2239]),0}, | ||
| 905 | {"id-it-subscriptionResponse","id-it-subscriptionResponse", | ||
| 906 | NID_id_it_subscriptionResponse,8,&(lvalues[2247]),0}, | ||
| 907 | {"id-it-keyPairParamReq","id-it-keyPairParamReq", | ||
| 908 | NID_id_it_keyPairParamReq,8,&(lvalues[2255]),0}, | ||
| 909 | {"id-it-keyPairParamRep","id-it-keyPairParamRep", | ||
| 910 | NID_id_it_keyPairParamRep,8,&(lvalues[2263]),0}, | ||
| 911 | {"id-it-revPassphrase","id-it-revPassphrase",NID_id_it_revPassphrase, | ||
| 912 | 8,&(lvalues[2271]),0}, | ||
| 913 | {"id-it-implicitConfirm","id-it-implicitConfirm", | ||
| 914 | NID_id_it_implicitConfirm,8,&(lvalues[2279]),0}, | ||
| 915 | {"id-it-confirmWaitTime","id-it-confirmWaitTime", | ||
| 916 | NID_id_it_confirmWaitTime,8,&(lvalues[2287]),0}, | ||
| 917 | {"id-it-origPKIMessage","id-it-origPKIMessage", | ||
| 918 | NID_id_it_origPKIMessage,8,&(lvalues[2295]),0}, | ||
| 919 | {"id-regCtrl","id-regCtrl",NID_id_regCtrl,8,&(lvalues[2303]),0}, | ||
| 920 | {"id-regInfo","id-regInfo",NID_id_regInfo,8,&(lvalues[2311]),0}, | ||
| 921 | {"id-regCtrl-regToken","id-regCtrl-regToken",NID_id_regCtrl_regToken, | ||
| 922 | 9,&(lvalues[2319]),0}, | ||
| 923 | {"id-regCtrl-authenticator","id-regCtrl-authenticator", | ||
| 924 | NID_id_regCtrl_authenticator,9,&(lvalues[2328]),0}, | ||
| 925 | {"id-regCtrl-pkiPublicationInfo","id-regCtrl-pkiPublicationInfo", | ||
| 926 | NID_id_regCtrl_pkiPublicationInfo,9,&(lvalues[2337]),0}, | ||
| 927 | {"id-regCtrl-pkiArchiveOptions","id-regCtrl-pkiArchiveOptions", | ||
| 928 | NID_id_regCtrl_pkiArchiveOptions,9,&(lvalues[2346]),0}, | ||
| 929 | {"id-regCtrl-oldCertID","id-regCtrl-oldCertID", | ||
| 930 | NID_id_regCtrl_oldCertID,9,&(lvalues[2355]),0}, | ||
| 931 | {"id-regCtrl-protocolEncrKey","id-regCtrl-protocolEncrKey", | ||
| 932 | NID_id_regCtrl_protocolEncrKey,9,&(lvalues[2364]),0}, | ||
| 933 | {"id-regInfo-utf8Pairs","id-regInfo-utf8Pairs", | ||
| 934 | NID_id_regInfo_utf8Pairs,9,&(lvalues[2373]),0}, | ||
| 935 | {"id-regInfo-certReq","id-regInfo-certReq",NID_id_regInfo_certReq,9, | ||
| 936 | &(lvalues[2382]),0}, | ||
| 937 | {"id-alg-des40","id-alg-des40",NID_id_alg_des40,8,&(lvalues[2391]),0}, | ||
| 938 | {"id-alg-noSignature","id-alg-noSignature",NID_id_alg_noSignature,8, | ||
| 939 | &(lvalues[2399]),0}, | ||
| 940 | {"id-alg-dh-sig-hmac-sha1","id-alg-dh-sig-hmac-sha1", | ||
| 941 | NID_id_alg_dh_sig_hmac_sha1,8,&(lvalues[2407]),0}, | ||
| 942 | {"id-alg-dh-pop","id-alg-dh-pop",NID_id_alg_dh_pop,8,&(lvalues[2415]),0}, | ||
| 943 | {"id-cmc-statusInfo","id-cmc-statusInfo",NID_id_cmc_statusInfo,8, | ||
| 944 | &(lvalues[2423]),0}, | ||
| 945 | {"id-cmc-identification","id-cmc-identification", | ||
| 946 | NID_id_cmc_identification,8,&(lvalues[2431]),0}, | ||
| 947 | {"id-cmc-identityProof","id-cmc-identityProof", | ||
| 948 | NID_id_cmc_identityProof,8,&(lvalues[2439]),0}, | ||
| 949 | {"id-cmc-dataReturn","id-cmc-dataReturn",NID_id_cmc_dataReturn,8, | ||
| 950 | &(lvalues[2447]),0}, | ||
| 951 | {"id-cmc-transactionId","id-cmc-transactionId", | ||
| 952 | NID_id_cmc_transactionId,8,&(lvalues[2455]),0}, | ||
| 953 | {"id-cmc-senderNonce","id-cmc-senderNonce",NID_id_cmc_senderNonce,8, | ||
| 954 | &(lvalues[2463]),0}, | ||
| 955 | {"id-cmc-recipientNonce","id-cmc-recipientNonce", | ||
| 956 | NID_id_cmc_recipientNonce,8,&(lvalues[2471]),0}, | ||
| 957 | {"id-cmc-addExtensions","id-cmc-addExtensions", | ||
| 958 | NID_id_cmc_addExtensions,8,&(lvalues[2479]),0}, | ||
| 959 | {"id-cmc-encryptedPOP","id-cmc-encryptedPOP",NID_id_cmc_encryptedPOP, | ||
| 960 | 8,&(lvalues[2487]),0}, | ||
| 961 | {"id-cmc-decryptedPOP","id-cmc-decryptedPOP",NID_id_cmc_decryptedPOP, | ||
| 962 | 8,&(lvalues[2495]),0}, | ||
| 963 | {"id-cmc-lraPOPWitness","id-cmc-lraPOPWitness", | ||
| 964 | NID_id_cmc_lraPOPWitness,8,&(lvalues[2503]),0}, | ||
| 965 | {"id-cmc-getCert","id-cmc-getCert",NID_id_cmc_getCert,8, | ||
| 966 | &(lvalues[2511]),0}, | ||
| 967 | {"id-cmc-getCRL","id-cmc-getCRL",NID_id_cmc_getCRL,8,&(lvalues[2519]),0}, | ||
| 968 | {"id-cmc-revokeRequest","id-cmc-revokeRequest", | ||
| 969 | NID_id_cmc_revokeRequest,8,&(lvalues[2527]),0}, | ||
| 970 | {"id-cmc-regInfo","id-cmc-regInfo",NID_id_cmc_regInfo,8, | ||
| 971 | &(lvalues[2535]),0}, | ||
| 972 | {"id-cmc-responseInfo","id-cmc-responseInfo",NID_id_cmc_responseInfo, | ||
| 973 | 8,&(lvalues[2543]),0}, | ||
| 974 | {"id-cmc-queryPending","id-cmc-queryPending",NID_id_cmc_queryPending, | ||
| 975 | 8,&(lvalues[2551]),0}, | ||
| 976 | {"id-cmc-popLinkRandom","id-cmc-popLinkRandom", | ||
| 977 | NID_id_cmc_popLinkRandom,8,&(lvalues[2559]),0}, | ||
| 978 | {"id-cmc-popLinkWitness","id-cmc-popLinkWitness", | ||
| 979 | NID_id_cmc_popLinkWitness,8,&(lvalues[2567]),0}, | ||
| 980 | {"id-cmc-confirmCertAcceptance","id-cmc-confirmCertAcceptance", | ||
| 981 | NID_id_cmc_confirmCertAcceptance,8,&(lvalues[2575]),0}, | ||
| 982 | {"id-on-personalData","id-on-personalData",NID_id_on_personalData,8, | ||
| 983 | &(lvalues[2583]),0}, | ||
| 984 | {"id-pda-dateOfBirth","id-pda-dateOfBirth",NID_id_pda_dateOfBirth,8, | ||
| 985 | &(lvalues[2591]),0}, | ||
| 986 | {"id-pda-placeOfBirth","id-pda-placeOfBirth",NID_id_pda_placeOfBirth, | ||
| 987 | 8,&(lvalues[2599]),0}, | ||
| 988 | {"id-pda-pseudonym","id-pda-pseudonym",NID_id_pda_pseudonym,8, | ||
| 989 | &(lvalues[2607]),0}, | ||
| 990 | {"id-pda-gender","id-pda-gender",NID_id_pda_gender,8,&(lvalues[2615]),0}, | ||
| 991 | {"id-pda-countryOfCitizenship","id-pda-countryOfCitizenship", | ||
| 992 | NID_id_pda_countryOfCitizenship,8,&(lvalues[2623]),0}, | ||
| 993 | {"id-pda-countryOfResidence","id-pda-countryOfResidence", | ||
| 994 | NID_id_pda_countryOfResidence,8,&(lvalues[2631]),0}, | ||
| 995 | {"id-aca-authenticationInfo","id-aca-authenticationInfo", | ||
| 996 | NID_id_aca_authenticationInfo,8,&(lvalues[2639]),0}, | ||
| 997 | {"id-aca-accessIdentity","id-aca-accessIdentity", | ||
| 998 | NID_id_aca_accessIdentity,8,&(lvalues[2647]),0}, | ||
| 999 | {"id-aca-chargingIdentity","id-aca-chargingIdentity", | ||
| 1000 | NID_id_aca_chargingIdentity,8,&(lvalues[2655]),0}, | ||
| 1001 | {"id-aca-group","id-aca-group",NID_id_aca_group,8,&(lvalues[2663]),0}, | ||
| 1002 | {"id-aca-role","id-aca-role",NID_id_aca_role,8,&(lvalues[2671]),0}, | ||
| 1003 | {"id-qcs-pkixQCSyntax-v1","id-qcs-pkixQCSyntax-v1", | ||
| 1004 | NID_id_qcs_pkixQCSyntax_v1,8,&(lvalues[2679]),0}, | ||
| 1005 | {"id-cct-crs","id-cct-crs",NID_id_cct_crs,8,&(lvalues[2687]),0}, | ||
| 1006 | {"id-cct-PKIData","id-cct-PKIData",NID_id_cct_PKIData,8, | ||
| 1007 | &(lvalues[2695]),0}, | ||
| 1008 | {"id-cct-PKIResponse","id-cct-PKIResponse",NID_id_cct_PKIResponse,8, | ||
| 1009 | &(lvalues[2703]),0}, | ||
| 1010 | {"ad_timestamping","AD Time Stamping",NID_ad_timeStamping,8, | ||
| 1011 | &(lvalues[2711]),0}, | ||
| 1012 | {"AD_DVCS","ad dvcs",NID_ad_dvcs,8,&(lvalues[2719]),0}, | ||
| 1013 | {"basicOCSPResponse","Basic OCSP Response",NID_id_pkix_OCSP_basic,9, | ||
| 1014 | &(lvalues[2727]),0}, | ||
| 1015 | {"Nonce","OCSP Nonce",NID_id_pkix_OCSP_Nonce,9,&(lvalues[2736]),0}, | ||
| 1016 | {"CrlID","OCSP CRL ID",NID_id_pkix_OCSP_CrlID,9,&(lvalues[2745]),0}, | ||
| 1017 | {"acceptableResponses","Acceptable OCSP Responses", | ||
| 1018 | NID_id_pkix_OCSP_acceptableResponses,9,&(lvalues[2754]),0}, | ||
| 1019 | {"noCheck","noCheck",NID_id_pkix_OCSP_noCheck,9,&(lvalues[2763]),0}, | ||
| 1020 | {"archiveCutoff","OCSP Archive Cutoff",NID_id_pkix_OCSP_archiveCutoff, | ||
| 1021 | 9,&(lvalues[2772]),0}, | ||
| 1022 | {"serviceLocator","OCSP Service Locator", | ||
| 1023 | NID_id_pkix_OCSP_serviceLocator,9,&(lvalues[2781]),0}, | ||
| 1024 | {"extendedStatus","Extended OCSP Status", | ||
| 1025 | NID_id_pkix_OCSP_extendedStatus,9,&(lvalues[2790]),0}, | ||
| 1026 | {"valid","valid",NID_id_pkix_OCSP_valid,9,&(lvalues[2799]),0}, | ||
| 1027 | {"path","path",NID_id_pkix_OCSP_path,9,&(lvalues[2808]),0}, | ||
| 1028 | {"trustRoot","Trust Root",NID_id_pkix_OCSP_trustRoot,9, | ||
| 1029 | &(lvalues[2817]),0}, | ||
| 1030 | {"algorithm","algorithm",NID_algorithm,4,&(lvalues[2826]),0}, | ||
| 1031 | {"rsaSignature","rsaSignature",NID_rsaSignature,5,&(lvalues[2830]),0}, | ||
| 1032 | {"X500algorithms","directory services - algorithms", | ||
| 1033 | NID_X500algorithms,2,&(lvalues[2835]),0}, | ||
| 1034 | {"ORG","org",NID_org,1,&(lvalues[2837]),0}, | ||
| 1035 | {"DOD","dod",NID_dod,2,&(lvalues[2838]),0}, | ||
| 1036 | {"IANA","iana",NID_iana,3,&(lvalues[2840]),0}, | ||
| 1037 | {"directory","Directory",NID_Directory,4,&(lvalues[2843]),0}, | ||
| 1038 | {"mgmt","Management",NID_Management,4,&(lvalues[2847]),0}, | ||
| 1039 | {"experimental","Experimental",NID_Experimental,4,&(lvalues[2851]),0}, | ||
| 1040 | {"private","Private",NID_Private,4,&(lvalues[2855]),0}, | ||
| 1041 | {"security","Security",NID_Security,4,&(lvalues[2859]),0}, | ||
| 1042 | {"snmpv2","SNMPv2",NID_SNMPv2,4,&(lvalues[2863]),0}, | ||
| 1043 | {"mail","Mail",NID_Mail,4,&(lvalues[2867]),0}, | ||
| 1044 | {"enterprises","Enterprises",NID_Enterprises,1,&(lvalues[2871]),0}, | ||
| 1045 | {"dcobject","dcObject",NID_dcObject,3,&(lvalues[2872]),0}, | ||
| 1046 | {"DC","domainComponent",NID_domainComponent,10,&(lvalues[2875]),0}, | ||
| 1047 | {"domain","Domain",NID_Domain,10,&(lvalues[2885]),0}, | ||
| 1048 | }; | ||
| 1049 | |||
| 1050 | static ASN1_OBJECT *sn_objs[NUM_SN]={ | ||
| 1051 | &(nid_objs[364]),/* "AD_DVCS" */ | ||
| 1052 | &(nid_objs[91]),/* "BF-CBC" */ | ||
| 1053 | &(nid_objs[93]),/* "BF-CFB" */ | ||
| 1054 | &(nid_objs[92]),/* "BF-ECB" */ | ||
| 1055 | &(nid_objs[94]),/* "BF-OFB" */ | ||
| 1056 | &(nid_objs[14]),/* "C" */ | ||
| 1057 | &(nid_objs[108]),/* "CAST5-CBC" */ | ||
| 1058 | &(nid_objs[110]),/* "CAST5-CFB" */ | ||
| 1059 | &(nid_objs[109]),/* "CAST5-ECB" */ | ||
| 1060 | &(nid_objs[111]),/* "CAST5-OFB" */ | ||
| 1061 | &(nid_objs[13]),/* "CN" */ | ||
| 1062 | &(nid_objs[141]),/* "CRLReason" */ | ||
| 1063 | &(nid_objs[367]),/* "CrlID" */ | ||
| 1064 | &(nid_objs[107]),/* "D" */ | ||
| 1065 | &(nid_objs[391]),/* "DC" */ | ||
| 1066 | &(nid_objs[31]),/* "DES-CBC" */ | ||
| 1067 | &(nid_objs[30]),/* "DES-CFB" */ | ||
| 1068 | &(nid_objs[29]),/* "DES-ECB" */ | ||
| 1069 | &(nid_objs[32]),/* "DES-EDE" */ | ||
| 1070 | &(nid_objs[43]),/* "DES-EDE-CBC" */ | ||
| 1071 | &(nid_objs[60]),/* "DES-EDE-CFB" */ | ||
| 1072 | &(nid_objs[62]),/* "DES-EDE-OFB" */ | ||
| 1073 | &(nid_objs[33]),/* "DES-EDE3" */ | ||
| 1074 | &(nid_objs[44]),/* "DES-EDE3-CBC" */ | ||
| 1075 | &(nid_objs[61]),/* "DES-EDE3-CFB" */ | ||
| 1076 | &(nid_objs[63]),/* "DES-EDE3-OFB" */ | ||
| 1077 | &(nid_objs[45]),/* "DES-OFB" */ | ||
| 1078 | &(nid_objs[80]),/* "DESX-CBC" */ | ||
| 1079 | &(nid_objs[380]),/* "DOD" */ | ||
| 1080 | &(nid_objs[116]),/* "DSA" */ | ||
| 1081 | &(nid_objs[66]),/* "DSA-SHA" */ | ||
| 1082 | &(nid_objs[113]),/* "DSA-SHA1" */ | ||
| 1083 | &(nid_objs[70]),/* "DSA-SHA1-old" */ | ||
| 1084 | &(nid_objs[67]),/* "DSA-old" */ | ||
| 1085 | &(nid_objs[297]),/* "DVCS" */ | ||
| 1086 | &(nid_objs[48]),/* "Email" */ | ||
| 1087 | &(nid_objs[99]),/* "G" */ | ||
| 1088 | &(nid_objs[101]),/* "I" */ | ||
| 1089 | &(nid_objs[381]),/* "IANA" */ | ||
| 1090 | &(nid_objs[34]),/* "IDEA-CBC" */ | ||
| 1091 | &(nid_objs[35]),/* "IDEA-CFB" */ | ||
| 1092 | &(nid_objs[36]),/* "IDEA-ECB" */ | ||
| 1093 | &(nid_objs[46]),/* "IDEA-OFB" */ | ||
| 1094 | &(nid_objs[181]),/* "ISO" */ | ||
| 1095 | &(nid_objs[183]),/* "ISO-US" */ | ||
| 1096 | &(nid_objs[15]),/* "L" */ | ||
| 1097 | &(nid_objs[ 3]),/* "MD2" */ | ||
| 1098 | &(nid_objs[257]),/* "MD4" */ | ||
| 1099 | &(nid_objs[ 4]),/* "MD5" */ | ||
| 1100 | &(nid_objs[114]),/* "MD5-SHA1" */ | ||
| 1101 | &(nid_objs[95]),/* "MDC2" */ | ||
| 1102 | &(nid_objs[57]),/* "Netscape" */ | ||
| 1103 | &(nid_objs[366]),/* "Nonce" */ | ||
| 1104 | &(nid_objs[17]),/* "O" */ | ||
| 1105 | &(nid_objs[178]),/* "OCSP" */ | ||
| 1106 | &(nid_objs[180]),/* "OCSPSigning" */ | ||
| 1107 | &(nid_objs[379]),/* "ORG" */ | ||
| 1108 | &(nid_objs[18]),/* "OU" */ | ||
| 1109 | &(nid_objs[ 9]),/* "PBE-MD2-DES" */ | ||
| 1110 | &(nid_objs[168]),/* "PBE-MD2-RC2-64" */ | ||
| 1111 | &(nid_objs[10]),/* "PBE-MD5-DES" */ | ||
| 1112 | &(nid_objs[169]),/* "PBE-MD5-RC2-64" */ | ||
| 1113 | &(nid_objs[147]),/* "PBE-SHA1-2DES" */ | ||
| 1114 | &(nid_objs[146]),/* "PBE-SHA1-3DES" */ | ||
| 1115 | &(nid_objs[170]),/* "PBE-SHA1-DES" */ | ||
| 1116 | &(nid_objs[148]),/* "PBE-SHA1-RC2-128" */ | ||
| 1117 | &(nid_objs[149]),/* "PBE-SHA1-RC2-40" */ | ||
| 1118 | &(nid_objs[68]),/* "PBE-SHA1-RC2-64" */ | ||
| 1119 | &(nid_objs[144]),/* "PBE-SHA1-RC4-128" */ | ||
| 1120 | &(nid_objs[145]),/* "PBE-SHA1-RC4-40" */ | ||
| 1121 | &(nid_objs[161]),/* "PBES2" */ | ||
| 1122 | &(nid_objs[69]),/* "PBKDF2" */ | ||
| 1123 | &(nid_objs[162]),/* "PBMAC1" */ | ||
| 1124 | &(nid_objs[127]),/* "PKIX" */ | ||
| 1125 | &(nid_objs[98]),/* "RC2-40-CBC" */ | ||
| 1126 | &(nid_objs[166]),/* "RC2-64-CBC" */ | ||
| 1127 | &(nid_objs[37]),/* "RC2-CBC" */ | ||
| 1128 | &(nid_objs[39]),/* "RC2-CFB" */ | ||
| 1129 | &(nid_objs[38]),/* "RC2-ECB" */ | ||
| 1130 | &(nid_objs[40]),/* "RC2-OFB" */ | ||
| 1131 | &(nid_objs[ 5]),/* "RC4" */ | ||
| 1132 | &(nid_objs[97]),/* "RC4-40" */ | ||
| 1133 | &(nid_objs[120]),/* "RC5-CBC" */ | ||
| 1134 | &(nid_objs[122]),/* "RC5-CFB" */ | ||
| 1135 | &(nid_objs[121]),/* "RC5-ECB" */ | ||
| 1136 | &(nid_objs[123]),/* "RC5-OFB" */ | ||
| 1137 | &(nid_objs[117]),/* "RIPEMD160" */ | ||
| 1138 | &(nid_objs[124]),/* "RLE" */ | ||
| 1139 | &(nid_objs[19]),/* "RSA" */ | ||
| 1140 | &(nid_objs[ 7]),/* "RSA-MD2" */ | ||
| 1141 | &(nid_objs[ 8]),/* "RSA-MD5" */ | ||
| 1142 | &(nid_objs[96]),/* "RSA-MDC2" */ | ||
| 1143 | &(nid_objs[104]),/* "RSA-NP-MD5" */ | ||
| 1144 | &(nid_objs[119]),/* "RSA-RIPEMD160" */ | ||
| 1145 | &(nid_objs[42]),/* "RSA-SHA" */ | ||
| 1146 | &(nid_objs[65]),/* "RSA-SHA1" */ | ||
| 1147 | &(nid_objs[115]),/* "RSA-SHA1-2" */ | ||
| 1148 | &(nid_objs[100]),/* "S" */ | ||
| 1149 | &(nid_objs[41]),/* "SHA" */ | ||
| 1150 | &(nid_objs[64]),/* "SHA1" */ | ||
| 1151 | &(nid_objs[188]),/* "SMIME" */ | ||
| 1152 | &(nid_objs[167]),/* "SMIME-CAPS" */ | ||
| 1153 | &(nid_objs[105]),/* "SN" */ | ||
| 1154 | &(nid_objs[16]),/* "ST" */ | ||
| 1155 | &(nid_objs[143]),/* "SXNetID" */ | ||
| 1156 | &(nid_objs[106]),/* "T" */ | ||
| 1157 | &(nid_objs[102]),/* "UID" */ | ||
| 1158 | &(nid_objs[ 0]),/* "UNDEF" */ | ||
| 1159 | &(nid_objs[11]),/* "X500" */ | ||
| 1160 | &(nid_objs[378]),/* "X500algorithms" */ | ||
| 1161 | &(nid_objs[12]),/* "X509" */ | ||
| 1162 | &(nid_objs[184]),/* "X9-57" */ | ||
| 1163 | &(nid_objs[185]),/* "X9cm" */ | ||
| 1164 | &(nid_objs[125]),/* "ZLIB" */ | ||
| 1165 | &(nid_objs[289]),/* "aaControls" */ | ||
| 1166 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
| 1167 | &(nid_objs[288]),/* "ac-targeting" */ | ||
| 1168 | &(nid_objs[368]),/* "acceptableResponses" */ | ||
| 1169 | &(nid_objs[363]),/* "ad_timestamping" */ | ||
| 1170 | &(nid_objs[376]),/* "algorithm" */ | ||
| 1171 | &(nid_objs[370]),/* "archiveCutoff" */ | ||
| 1172 | &(nid_objs[177]),/* "authorityInfoAccess" */ | ||
| 1173 | &(nid_objs[90]),/* "authorityKeyIdentifier" */ | ||
| 1174 | &(nid_objs[87]),/* "basicConstraints" */ | ||
| 1175 | &(nid_objs[365]),/* "basicOCSPResponse" */ | ||
| 1176 | &(nid_objs[285]),/* "biometricInfo" */ | ||
| 1177 | &(nid_objs[179]),/* "caIssuers" */ | ||
| 1178 | &(nid_objs[152]),/* "certBag" */ | ||
| 1179 | &(nid_objs[89]),/* "certificatePolicies" */ | ||
| 1180 | &(nid_objs[54]),/* "challengePassword" */ | ||
| 1181 | &(nid_objs[130]),/* "clientAuth" */ | ||
| 1182 | &(nid_objs[131]),/* "codeSigning" */ | ||
| 1183 | &(nid_objs[50]),/* "contentType" */ | ||
| 1184 | &(nid_objs[53]),/* "countersignature" */ | ||
| 1185 | &(nid_objs[153]),/* "crlBag" */ | ||
| 1186 | &(nid_objs[103]),/* "crlDistributionPoints" */ | ||
| 1187 | &(nid_objs[88]),/* "crlNumber" */ | ||
| 1188 | &(nid_objs[390]),/* "dcobject" */ | ||
| 1189 | &(nid_objs[140]),/* "deltaCRL" */ | ||
| 1190 | &(nid_objs[28]),/* "dhKeyAgreement" */ | ||
| 1191 | &(nid_objs[382]),/* "directory" */ | ||
| 1192 | &(nid_objs[174]),/* "dnQualifier" */ | ||
| 1193 | &(nid_objs[392]),/* "domain" */ | ||
| 1194 | &(nid_objs[132]),/* "emailProtection" */ | ||
| 1195 | &(nid_objs[389]),/* "enterprises" */ | ||
| 1196 | &(nid_objs[384]),/* "experimental" */ | ||
| 1197 | &(nid_objs[172]),/* "extReq" */ | ||
| 1198 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | ||
| 1199 | &(nid_objs[126]),/* "extendedKeyUsage" */ | ||
| 1200 | &(nid_objs[372]),/* "extendedStatus" */ | ||
| 1201 | &(nid_objs[156]),/* "friendlyName" */ | ||
| 1202 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
| 1203 | &(nid_objs[266]),/* "id-aca" */ | ||
| 1204 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
| 1205 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
| 1206 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
| 1207 | &(nid_objs[357]),/* "id-aca-group" */ | ||
| 1208 | &(nid_objs[358]),/* "id-aca-role" */ | ||
| 1209 | &(nid_objs[176]),/* "id-ad" */ | ||
| 1210 | &(nid_objs[262]),/* "id-alg" */ | ||
| 1211 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
| 1212 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
| 1213 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
| 1214 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
| 1215 | &(nid_objs[268]),/* "id-cct" */ | ||
| 1216 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
| 1217 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
| 1218 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
| 1219 | &(nid_objs[81]),/* "id-ce" */ | ||
| 1220 | &(nid_objs[263]),/* "id-cmc" */ | ||
| 1221 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
| 1222 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
| 1223 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
| 1224 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
| 1225 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
| 1226 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
| 1227 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
| 1228 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
| 1229 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
| 1230 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
| 1231 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
| 1232 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
| 1233 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
| 1234 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
| 1235 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
| 1236 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
| 1237 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
| 1238 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
| 1239 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
| 1240 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
| 1241 | &(nid_objs[260]),/* "id-it" */ | ||
| 1242 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
| 1243 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
| 1244 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
| 1245 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
| 1246 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
| 1247 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
| 1248 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
| 1249 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
| 1250 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
| 1251 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
| 1252 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
| 1253 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
| 1254 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
| 1255 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
| 1256 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
| 1257 | &(nid_objs[128]),/* "id-kp" */ | ||
| 1258 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
| 1259 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
| 1260 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
| 1261 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
| 1262 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
| 1263 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
| 1264 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
| 1265 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
| 1266 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
| 1267 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
| 1268 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
| 1269 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
| 1270 | &(nid_objs[264]),/* "id-on" */ | ||
| 1271 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
| 1272 | &(nid_objs[265]),/* "id-pda" */ | ||
| 1273 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
| 1274 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
| 1275 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
| 1276 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
| 1277 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
| 1278 | &(nid_objs[350]),/* "id-pda-pseudonym" */ | ||
| 1279 | &(nid_objs[175]),/* "id-pe" */ | ||
| 1280 | &(nid_objs[261]),/* "id-pkip" */ | ||
| 1281 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
| 1282 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
| 1283 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
| 1284 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
| 1285 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
| 1286 | &(nid_objs[267]),/* "id-qcs" */ | ||
| 1287 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
| 1288 | &(nid_objs[259]),/* "id-qt" */ | ||
| 1289 | &(nid_objs[164]),/* "id-qt-cps" */ | ||
| 1290 | &(nid_objs[165]),/* "id-qt-unotice" */ | ||
| 1291 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
| 1292 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
| 1293 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
| 1294 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
| 1295 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
| 1296 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
| 1297 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
| 1298 | &(nid_objs[314]),/* "id-regInfo" */ | ||
| 1299 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
| 1300 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
| 1301 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
| 1302 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
| 1303 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
| 1304 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
| 1305 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
| 1306 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
| 1307 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
| 1308 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
| 1309 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
| 1310 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
| 1311 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
| 1312 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
| 1313 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
| 1314 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
| 1315 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
| 1316 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
| 1317 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
| 1318 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
| 1319 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
| 1320 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
| 1321 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
| 1322 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
| 1323 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
| 1324 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
| 1325 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
| 1326 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
| 1327 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
| 1328 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
| 1329 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
| 1330 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
| 1331 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
| 1332 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
| 1333 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
| 1334 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
| 1335 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
| 1336 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
| 1337 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
| 1338 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
| 1339 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
| 1340 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
| 1341 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
| 1342 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
| 1343 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
| 1344 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
| 1345 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
| 1346 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
| 1347 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
| 1348 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
| 1349 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
| 1350 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
| 1351 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
| 1352 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
| 1353 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
| 1354 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
| 1355 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
| 1356 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
| 1357 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
| 1358 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
| 1359 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
| 1360 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
| 1361 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
| 1362 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
| 1363 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
| 1364 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
| 1365 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
| 1366 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
| 1367 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
| 1368 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
| 1369 | &(nid_objs[142]),/* "invalidityDate" */ | ||
| 1370 | &(nid_objs[294]),/* "ipsecEndSystem" */ | ||
| 1371 | &(nid_objs[295]),/* "ipsecTunnel" */ | ||
| 1372 | &(nid_objs[296]),/* "ipsecUser" */ | ||
| 1373 | &(nid_objs[86]),/* "issuerAltName" */ | ||
| 1374 | &(nid_objs[150]),/* "keyBag" */ | ||
| 1375 | &(nid_objs[83]),/* "keyUsage" */ | ||
| 1376 | &(nid_objs[157]),/* "localKeyID" */ | ||
| 1377 | &(nid_objs[388]),/* "mail" */ | ||
| 1378 | &(nid_objs[182]),/* "member-body" */ | ||
| 1379 | &(nid_objs[51]),/* "messageDigest" */ | ||
| 1380 | &(nid_objs[383]),/* "mgmt" */ | ||
| 1381 | &(nid_objs[136]),/* "msCTLSign" */ | ||
| 1382 | &(nid_objs[135]),/* "msCodeCom" */ | ||
| 1383 | &(nid_objs[134]),/* "msCodeInd" */ | ||
| 1384 | &(nid_objs[138]),/* "msEFS" */ | ||
| 1385 | &(nid_objs[171]),/* "msExtReq" */ | ||
| 1386 | &(nid_objs[137]),/* "msSGC" */ | ||
| 1387 | &(nid_objs[173]),/* "name" */ | ||
| 1388 | &(nid_objs[369]),/* "noCheck" */ | ||
| 1389 | &(nid_objs[72]),/* "nsBaseUrl" */ | ||
| 1390 | &(nid_objs[76]),/* "nsCaPolicyUrl" */ | ||
| 1391 | &(nid_objs[74]),/* "nsCaRevocationUrl" */ | ||
| 1392 | &(nid_objs[58]),/* "nsCertExt" */ | ||
| 1393 | &(nid_objs[79]),/* "nsCertSequence" */ | ||
| 1394 | &(nid_objs[71]),/* "nsCertType" */ | ||
| 1395 | &(nid_objs[78]),/* "nsComment" */ | ||
| 1396 | &(nid_objs[59]),/* "nsDataType" */ | ||
| 1397 | &(nid_objs[75]),/* "nsRenewalUrl" */ | ||
| 1398 | &(nid_objs[73]),/* "nsRevocationUrl" */ | ||
| 1399 | &(nid_objs[139]),/* "nsSGC" */ | ||
| 1400 | &(nid_objs[77]),/* "nsSslServerName" */ | ||
| 1401 | &(nid_objs[374]),/* "path" */ | ||
| 1402 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | ||
| 1403 | &(nid_objs[ 2]),/* "pkcs" */ | ||
| 1404 | &(nid_objs[186]),/* "pkcs1" */ | ||
| 1405 | &(nid_objs[27]),/* "pkcs3" */ | ||
| 1406 | &(nid_objs[187]),/* "pkcs5" */ | ||
| 1407 | &(nid_objs[20]),/* "pkcs7" */ | ||
| 1408 | &(nid_objs[21]),/* "pkcs7-data" */ | ||
| 1409 | &(nid_objs[25]),/* "pkcs7-digestData" */ | ||
| 1410 | &(nid_objs[26]),/* "pkcs7-encryptedData" */ | ||
| 1411 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | ||
| 1412 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | ||
| 1413 | &(nid_objs[22]),/* "pkcs7-signedData" */ | ||
| 1414 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
| 1415 | &(nid_objs[47]),/* "pkcs9" */ | ||
| 1416 | &(nid_objs[385]),/* "private" */ | ||
| 1417 | &(nid_objs[84]),/* "privateKeyUsagePeriod" */ | ||
| 1418 | &(nid_objs[286]),/* "qcStatements" */ | ||
| 1419 | &(nid_objs[ 6]),/* "rsaEncryption" */ | ||
| 1420 | &(nid_objs[377]),/* "rsaSignature" */ | ||
| 1421 | &(nid_objs[ 1]),/* "rsadsi" */ | ||
| 1422 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
| 1423 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
| 1424 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
| 1425 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
| 1426 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
| 1427 | &(nid_objs[154]),/* "secretBag" */ | ||
| 1428 | &(nid_objs[386]),/* "security" */ | ||
| 1429 | &(nid_objs[129]),/* "serverAuth" */ | ||
| 1430 | &(nid_objs[371]),/* "serviceLocator" */ | ||
| 1431 | &(nid_objs[52]),/* "signingTime" */ | ||
| 1432 | &(nid_objs[387]),/* "snmpv2" */ | ||
| 1433 | &(nid_objs[85]),/* "subjectAltName" */ | ||
| 1434 | &(nid_objs[82]),/* "subjectKeyIdentifier" */ | ||
| 1435 | &(nid_objs[293]),/* "textNotice" */ | ||
| 1436 | &(nid_objs[133]),/* "timeStamping" */ | ||
| 1437 | &(nid_objs[375]),/* "trustRoot" */ | ||
| 1438 | &(nid_objs[55]),/* "unstructuredAddress" */ | ||
| 1439 | &(nid_objs[49]),/* "unstructuredName" */ | ||
| 1440 | &(nid_objs[373]),/* "valid" */ | ||
| 1441 | &(nid_objs[158]),/* "x509Certificate" */ | ||
| 1442 | &(nid_objs[160]),/* "x509Crl" */ | ||
| 1443 | }; | ||
| 1444 | |||
| 1445 | static ASN1_OBJECT *ln_objs[NUM_LN]={ | ||
| 1446 | &(nid_objs[363]),/* "AD Time Stamping" */ | ||
| 1447 | &(nid_objs[368]),/* "Acceptable OCSP Responses" */ | ||
| 1448 | &(nid_objs[177]),/* "Authority Information Access" */ | ||
| 1449 | &(nid_objs[365]),/* "Basic OCSP Response" */ | ||
| 1450 | &(nid_objs[285]),/* "Biometric Info" */ | ||
| 1451 | &(nid_objs[179]),/* "CA Issuers" */ | ||
| 1452 | &(nid_objs[131]),/* "Code Signing" */ | ||
| 1453 | &(nid_objs[382]),/* "Directory" */ | ||
| 1454 | &(nid_objs[392]),/* "Domain" */ | ||
| 1455 | &(nid_objs[132]),/* "E-mail Protection" */ | ||
| 1456 | &(nid_objs[389]),/* "Enterprises" */ | ||
| 1457 | &(nid_objs[384]),/* "Experimental" */ | ||
| 1458 | &(nid_objs[372]),/* "Extended OCSP Status" */ | ||
| 1459 | &(nid_objs[172]),/* "Extension Request" */ | ||
| 1460 | &(nid_objs[294]),/* "IPSec End System" */ | ||
| 1461 | &(nid_objs[295]),/* "IPSec Tunnel" */ | ||
| 1462 | &(nid_objs[296]),/* "IPSec User" */ | ||
| 1463 | &(nid_objs[182]),/* "ISO Member Body" */ | ||
| 1464 | &(nid_objs[183]),/* "ISO US Member Body" */ | ||
| 1465 | &(nid_objs[142]),/* "Invalidity Date" */ | ||
| 1466 | &(nid_objs[388]),/* "Mail" */ | ||
| 1467 | &(nid_objs[383]),/* "Management" */ | ||
| 1468 | &(nid_objs[135]),/* "Microsoft Commercial Code Signing" */ | ||
| 1469 | &(nid_objs[138]),/* "Microsoft Encrypted File System" */ | ||
| 1470 | &(nid_objs[171]),/* "Microsoft Extension Request" */ | ||
| 1471 | &(nid_objs[134]),/* "Microsoft Individual Code Signing" */ | ||
| 1472 | &(nid_objs[137]),/* "Microsoft Server Gated Crypto" */ | ||
| 1473 | &(nid_objs[136]),/* "Microsoft Trust List Signing" */ | ||
| 1474 | &(nid_objs[72]),/* "Netscape Base Url" */ | ||
| 1475 | &(nid_objs[76]),/* "Netscape CA Policy Url" */ | ||
| 1476 | &(nid_objs[74]),/* "Netscape CA Revocation Url" */ | ||
| 1477 | &(nid_objs[71]),/* "Netscape Cert Type" */ | ||
| 1478 | &(nid_objs[58]),/* "Netscape Certificate Extension" */ | ||
| 1479 | &(nid_objs[79]),/* "Netscape Certificate Sequence" */ | ||
| 1480 | &(nid_objs[78]),/* "Netscape Comment" */ | ||
| 1481 | &(nid_objs[57]),/* "Netscape Communications Corp." */ | ||
| 1482 | &(nid_objs[59]),/* "Netscape Data Type" */ | ||
| 1483 | &(nid_objs[75]),/* "Netscape Renewal Url" */ | ||
| 1484 | &(nid_objs[73]),/* "Netscape Revocation Url" */ | ||
| 1485 | &(nid_objs[77]),/* "Netscape SSL Server Name" */ | ||
| 1486 | &(nid_objs[139]),/* "Netscape Server Gated Crypto" */ | ||
| 1487 | &(nid_objs[178]),/* "OCSP" */ | ||
| 1488 | &(nid_objs[370]),/* "OCSP Archive Cutoff" */ | ||
| 1489 | &(nid_objs[367]),/* "OCSP CRL ID" */ | ||
| 1490 | &(nid_objs[366]),/* "OCSP Nonce" */ | ||
| 1491 | &(nid_objs[371]),/* "OCSP Service Locator" */ | ||
| 1492 | &(nid_objs[180]),/* "OCSP Signing" */ | ||
| 1493 | &(nid_objs[161]),/* "PBES2" */ | ||
| 1494 | &(nid_objs[69]),/* "PBKDF2" */ | ||
| 1495 | &(nid_objs[162]),/* "PBMAC1" */ | ||
| 1496 | &(nid_objs[127]),/* "PKIX" */ | ||
| 1497 | &(nid_objs[164]),/* "Policy Qualifier CPS" */ | ||
| 1498 | &(nid_objs[165]),/* "Policy Qualifier User Notice" */ | ||
| 1499 | &(nid_objs[385]),/* "Private" */ | ||
| 1500 | &(nid_objs[ 1]),/* "RSA Data Security, Inc." */ | ||
| 1501 | &(nid_objs[ 2]),/* "RSA Data Security, Inc. PKCS" */ | ||
| 1502 | &(nid_objs[188]),/* "S/MIME" */ | ||
| 1503 | &(nid_objs[167]),/* "S/MIME Capabilities" */ | ||
| 1504 | &(nid_objs[387]),/* "SNMPv2" */ | ||
| 1505 | &(nid_objs[386]),/* "Security" */ | ||
| 1506 | &(nid_objs[143]),/* "Strong Extranet ID" */ | ||
| 1507 | &(nid_objs[130]),/* "TLS Web Client Authentication" */ | ||
| 1508 | &(nid_objs[129]),/* "TLS Web Server Authentication" */ | ||
| 1509 | &(nid_objs[133]),/* "Time Stamping" */ | ||
| 1510 | &(nid_objs[375]),/* "Trust Root" */ | ||
| 1511 | &(nid_objs[12]),/* "X509" */ | ||
| 1512 | &(nid_objs[90]),/* "X509v3 Authority Key Identifier" */ | ||
| 1513 | &(nid_objs[87]),/* "X509v3 Basic Constraints" */ | ||
| 1514 | &(nid_objs[103]),/* "X509v3 CRL Distribution Points" */ | ||
| 1515 | &(nid_objs[88]),/* "X509v3 CRL Number" */ | ||
| 1516 | &(nid_objs[141]),/* "X509v3 CRL Reason Code" */ | ||
| 1517 | &(nid_objs[89]),/* "X509v3 Certificate Policies" */ | ||
| 1518 | &(nid_objs[140]),/* "X509v3 Delta CRL Indicator" */ | ||
| 1519 | &(nid_objs[126]),/* "X509v3 Extended Key Usage" */ | ||
| 1520 | &(nid_objs[86]),/* "X509v3 Issuer Alternative Name" */ | ||
| 1521 | &(nid_objs[83]),/* "X509v3 Key Usage" */ | ||
| 1522 | &(nid_objs[84]),/* "X509v3 Private Key Usage Period" */ | ||
| 1523 | &(nid_objs[85]),/* "X509v3 Subject Alternative Name" */ | ||
| 1524 | &(nid_objs[82]),/* "X509v3 Subject Key Identifier" */ | ||
| 1525 | &(nid_objs[184]),/* "X9.57" */ | ||
| 1526 | &(nid_objs[185]),/* "X9.57 CM ?" */ | ||
| 1527 | &(nid_objs[289]),/* "aaControls" */ | ||
| 1528 | &(nid_objs[287]),/* "ac-auditEntity" */ | ||
| 1529 | &(nid_objs[288]),/* "ac-targeting" */ | ||
| 1530 | &(nid_objs[364]),/* "ad dvcs" */ | ||
| 1531 | &(nid_objs[376]),/* "algorithm" */ | ||
| 1532 | &(nid_objs[91]),/* "bf-cbc" */ | ||
| 1533 | &(nid_objs[93]),/* "bf-cfb" */ | ||
| 1534 | &(nid_objs[92]),/* "bf-ecb" */ | ||
| 1535 | &(nid_objs[94]),/* "bf-ofb" */ | ||
| 1536 | &(nid_objs[108]),/* "cast5-cbc" */ | ||
| 1537 | &(nid_objs[110]),/* "cast5-cfb" */ | ||
| 1538 | &(nid_objs[109]),/* "cast5-ecb" */ | ||
| 1539 | &(nid_objs[111]),/* "cast5-ofb" */ | ||
| 1540 | &(nid_objs[152]),/* "certBag" */ | ||
| 1541 | &(nid_objs[54]),/* "challengePassword" */ | ||
| 1542 | &(nid_objs[13]),/* "commonName" */ | ||
| 1543 | &(nid_objs[50]),/* "contentType" */ | ||
| 1544 | &(nid_objs[53]),/* "countersignature" */ | ||
| 1545 | &(nid_objs[14]),/* "countryName" */ | ||
| 1546 | &(nid_objs[153]),/* "crlBag" */ | ||
| 1547 | &(nid_objs[390]),/* "dcObject" */ | ||
| 1548 | &(nid_objs[31]),/* "des-cbc" */ | ||
| 1549 | &(nid_objs[30]),/* "des-cfb" */ | ||
| 1550 | &(nid_objs[29]),/* "des-ecb" */ | ||
| 1551 | &(nid_objs[32]),/* "des-ede" */ | ||
| 1552 | &(nid_objs[43]),/* "des-ede-cbc" */ | ||
| 1553 | &(nid_objs[60]),/* "des-ede-cfb" */ | ||
| 1554 | &(nid_objs[62]),/* "des-ede-ofb" */ | ||
| 1555 | &(nid_objs[33]),/* "des-ede3" */ | ||
| 1556 | &(nid_objs[44]),/* "des-ede3-cbc" */ | ||
| 1557 | &(nid_objs[61]),/* "des-ede3-cfb" */ | ||
| 1558 | &(nid_objs[63]),/* "des-ede3-ofb" */ | ||
| 1559 | &(nid_objs[45]),/* "des-ofb" */ | ||
| 1560 | &(nid_objs[107]),/* "description" */ | ||
| 1561 | &(nid_objs[80]),/* "desx-cbc" */ | ||
| 1562 | &(nid_objs[28]),/* "dhKeyAgreement" */ | ||
| 1563 | &(nid_objs[11]),/* "directory services (X.500)" */ | ||
| 1564 | &(nid_objs[378]),/* "directory services - algorithms" */ | ||
| 1565 | &(nid_objs[174]),/* "dnQualifier" */ | ||
| 1566 | &(nid_objs[380]),/* "dod" */ | ||
| 1567 | &(nid_objs[391]),/* "domainComponent" */ | ||
| 1568 | &(nid_objs[116]),/* "dsaEncryption" */ | ||
| 1569 | &(nid_objs[67]),/* "dsaEncryption-old" */ | ||
| 1570 | &(nid_objs[66]),/* "dsaWithSHA" */ | ||
| 1571 | &(nid_objs[113]),/* "dsaWithSHA1" */ | ||
| 1572 | &(nid_objs[70]),/* "dsaWithSHA1-old" */ | ||
| 1573 | &(nid_objs[297]),/* "dvcs" */ | ||
| 1574 | &(nid_objs[48]),/* "emailAddress" */ | ||
| 1575 | &(nid_objs[56]),/* "extendedCertificateAttributes" */ | ||
| 1576 | &(nid_objs[156]),/* "friendlyName" */ | ||
| 1577 | &(nid_objs[99]),/* "givenName" */ | ||
| 1578 | &(nid_objs[163]),/* "hmacWithSHA1" */ | ||
| 1579 | &(nid_objs[381]),/* "iana" */ | ||
| 1580 | &(nid_objs[266]),/* "id-aca" */ | ||
| 1581 | &(nid_objs[355]),/* "id-aca-accessIdentity" */ | ||
| 1582 | &(nid_objs[354]),/* "id-aca-authenticationInfo" */ | ||
| 1583 | &(nid_objs[356]),/* "id-aca-chargingIdentity" */ | ||
| 1584 | &(nid_objs[357]),/* "id-aca-group" */ | ||
| 1585 | &(nid_objs[358]),/* "id-aca-role" */ | ||
| 1586 | &(nid_objs[176]),/* "id-ad" */ | ||
| 1587 | &(nid_objs[262]),/* "id-alg" */ | ||
| 1588 | &(nid_objs[323]),/* "id-alg-des40" */ | ||
| 1589 | &(nid_objs[326]),/* "id-alg-dh-pop" */ | ||
| 1590 | &(nid_objs[325]),/* "id-alg-dh-sig-hmac-sha1" */ | ||
| 1591 | &(nid_objs[324]),/* "id-alg-noSignature" */ | ||
| 1592 | &(nid_objs[268]),/* "id-cct" */ | ||
| 1593 | &(nid_objs[361]),/* "id-cct-PKIData" */ | ||
| 1594 | &(nid_objs[362]),/* "id-cct-PKIResponse" */ | ||
| 1595 | &(nid_objs[360]),/* "id-cct-crs" */ | ||
| 1596 | &(nid_objs[81]),/* "id-ce" */ | ||
| 1597 | &(nid_objs[263]),/* "id-cmc" */ | ||
| 1598 | &(nid_objs[334]),/* "id-cmc-addExtensions" */ | ||
| 1599 | &(nid_objs[346]),/* "id-cmc-confirmCertAcceptance" */ | ||
| 1600 | &(nid_objs[330]),/* "id-cmc-dataReturn" */ | ||
| 1601 | &(nid_objs[336]),/* "id-cmc-decryptedPOP" */ | ||
| 1602 | &(nid_objs[335]),/* "id-cmc-encryptedPOP" */ | ||
| 1603 | &(nid_objs[339]),/* "id-cmc-getCRL" */ | ||
| 1604 | &(nid_objs[338]),/* "id-cmc-getCert" */ | ||
| 1605 | &(nid_objs[328]),/* "id-cmc-identification" */ | ||
| 1606 | &(nid_objs[329]),/* "id-cmc-identityProof" */ | ||
| 1607 | &(nid_objs[337]),/* "id-cmc-lraPOPWitness" */ | ||
| 1608 | &(nid_objs[344]),/* "id-cmc-popLinkRandom" */ | ||
| 1609 | &(nid_objs[345]),/* "id-cmc-popLinkWitness" */ | ||
| 1610 | &(nid_objs[343]),/* "id-cmc-queryPending" */ | ||
| 1611 | &(nid_objs[333]),/* "id-cmc-recipientNonce" */ | ||
| 1612 | &(nid_objs[341]),/* "id-cmc-regInfo" */ | ||
| 1613 | &(nid_objs[342]),/* "id-cmc-responseInfo" */ | ||
| 1614 | &(nid_objs[340]),/* "id-cmc-revokeRequest" */ | ||
| 1615 | &(nid_objs[332]),/* "id-cmc-senderNonce" */ | ||
| 1616 | &(nid_objs[327]),/* "id-cmc-statusInfo" */ | ||
| 1617 | &(nid_objs[331]),/* "id-cmc-transactionId" */ | ||
| 1618 | &(nid_objs[260]),/* "id-it" */ | ||
| 1619 | &(nid_objs[302]),/* "id-it-caKeyUpdateInfo" */ | ||
| 1620 | &(nid_objs[298]),/* "id-it-caProtEncCert" */ | ||
| 1621 | &(nid_objs[311]),/* "id-it-confirmWaitTime" */ | ||
| 1622 | &(nid_objs[303]),/* "id-it-currentCRL" */ | ||
| 1623 | &(nid_objs[300]),/* "id-it-encKeyPairTypes" */ | ||
| 1624 | &(nid_objs[310]),/* "id-it-implicitConfirm" */ | ||
| 1625 | &(nid_objs[308]),/* "id-it-keyPairParamRep" */ | ||
| 1626 | &(nid_objs[307]),/* "id-it-keyPairParamReq" */ | ||
| 1627 | &(nid_objs[312]),/* "id-it-origPKIMessage" */ | ||
| 1628 | &(nid_objs[301]),/* "id-it-preferredSymmAlg" */ | ||
| 1629 | &(nid_objs[309]),/* "id-it-revPassphrase" */ | ||
| 1630 | &(nid_objs[299]),/* "id-it-signKeyPairTypes" */ | ||
| 1631 | &(nid_objs[305]),/* "id-it-subscriptionRequest" */ | ||
| 1632 | &(nid_objs[306]),/* "id-it-subscriptionResponse" */ | ||
| 1633 | &(nid_objs[304]),/* "id-it-unsupportedOIDs" */ | ||
| 1634 | &(nid_objs[128]),/* "id-kp" */ | ||
| 1635 | &(nid_objs[280]),/* "id-mod-attribute-cert" */ | ||
| 1636 | &(nid_objs[274]),/* "id-mod-cmc" */ | ||
| 1637 | &(nid_objs[277]),/* "id-mod-cmp" */ | ||
| 1638 | &(nid_objs[284]),/* "id-mod-cmp2000" */ | ||
| 1639 | &(nid_objs[273]),/* "id-mod-crmf" */ | ||
| 1640 | &(nid_objs[283]),/* "id-mod-dvcs" */ | ||
| 1641 | &(nid_objs[275]),/* "id-mod-kea-profile-88" */ | ||
| 1642 | &(nid_objs[276]),/* "id-mod-kea-profile-93" */ | ||
| 1643 | &(nid_objs[282]),/* "id-mod-ocsp" */ | ||
| 1644 | &(nid_objs[278]),/* "id-mod-qualified-cert-88" */ | ||
| 1645 | &(nid_objs[279]),/* "id-mod-qualified-cert-93" */ | ||
| 1646 | &(nid_objs[281]),/* "id-mod-timestamp-protocol" */ | ||
| 1647 | &(nid_objs[264]),/* "id-on" */ | ||
| 1648 | &(nid_objs[347]),/* "id-on-personalData" */ | ||
| 1649 | &(nid_objs[265]),/* "id-pda" */ | ||
| 1650 | &(nid_objs[352]),/* "id-pda-countryOfCitizenship" */ | ||
| 1651 | &(nid_objs[353]),/* "id-pda-countryOfResidence" */ | ||
| 1652 | &(nid_objs[348]),/* "id-pda-dateOfBirth" */ | ||
| 1653 | &(nid_objs[351]),/* "id-pda-gender" */ | ||
| 1654 | &(nid_objs[349]),/* "id-pda-placeOfBirth" */ | ||
| 1655 | &(nid_objs[350]),/* "id-pda-pseudonym" */ | ||
| 1656 | &(nid_objs[175]),/* "id-pe" */ | ||
| 1657 | &(nid_objs[261]),/* "id-pkip" */ | ||
| 1658 | &(nid_objs[258]),/* "id-pkix-mod" */ | ||
| 1659 | &(nid_objs[269]),/* "id-pkix1-explicit-88" */ | ||
| 1660 | &(nid_objs[271]),/* "id-pkix1-explicit-93" */ | ||
| 1661 | &(nid_objs[270]),/* "id-pkix1-implicit-88" */ | ||
| 1662 | &(nid_objs[272]),/* "id-pkix1-implicit-93" */ | ||
| 1663 | &(nid_objs[267]),/* "id-qcs" */ | ||
| 1664 | &(nid_objs[359]),/* "id-qcs-pkixQCSyntax-v1" */ | ||
| 1665 | &(nid_objs[259]),/* "id-qt" */ | ||
| 1666 | &(nid_objs[313]),/* "id-regCtrl" */ | ||
| 1667 | &(nid_objs[316]),/* "id-regCtrl-authenticator" */ | ||
| 1668 | &(nid_objs[319]),/* "id-regCtrl-oldCertID" */ | ||
| 1669 | &(nid_objs[318]),/* "id-regCtrl-pkiArchiveOptions" */ | ||
| 1670 | &(nid_objs[317]),/* "id-regCtrl-pkiPublicationInfo" */ | ||
| 1671 | &(nid_objs[320]),/* "id-regCtrl-protocolEncrKey" */ | ||
| 1672 | &(nid_objs[315]),/* "id-regCtrl-regToken" */ | ||
| 1673 | &(nid_objs[314]),/* "id-regInfo" */ | ||
| 1674 | &(nid_objs[322]),/* "id-regInfo-certReq" */ | ||
| 1675 | &(nid_objs[321]),/* "id-regInfo-utf8Pairs" */ | ||
| 1676 | &(nid_objs[191]),/* "id-smime-aa" */ | ||
| 1677 | &(nid_objs[215]),/* "id-smime-aa-contentHint" */ | ||
| 1678 | &(nid_objs[218]),/* "id-smime-aa-contentIdentifier" */ | ||
| 1679 | &(nid_objs[221]),/* "id-smime-aa-contentReference" */ | ||
| 1680 | &(nid_objs[240]),/* "id-smime-aa-dvcs-dvc" */ | ||
| 1681 | &(nid_objs[217]),/* "id-smime-aa-encapContentType" */ | ||
| 1682 | &(nid_objs[222]),/* "id-smime-aa-encrypKeyPref" */ | ||
| 1683 | &(nid_objs[220]),/* "id-smime-aa-equivalentLabels" */ | ||
| 1684 | &(nid_objs[232]),/* "id-smime-aa-ets-CertificateRefs" */ | ||
| 1685 | &(nid_objs[233]),/* "id-smime-aa-ets-RevocationRefs" */ | ||
| 1686 | &(nid_objs[238]),/* "id-smime-aa-ets-archiveTimeStamp" */ | ||
| 1687 | &(nid_objs[237]),/* "id-smime-aa-ets-certCRLTimestamp" */ | ||
| 1688 | &(nid_objs[234]),/* "id-smime-aa-ets-certValues" */ | ||
| 1689 | &(nid_objs[227]),/* "id-smime-aa-ets-commitmentType" */ | ||
| 1690 | &(nid_objs[231]),/* "id-smime-aa-ets-contentTimestamp" */ | ||
| 1691 | &(nid_objs[236]),/* "id-smime-aa-ets-escTimeStamp" */ | ||
| 1692 | &(nid_objs[230]),/* "id-smime-aa-ets-otherSigCert" */ | ||
| 1693 | &(nid_objs[235]),/* "id-smime-aa-ets-revocationValues" */ | ||
| 1694 | &(nid_objs[226]),/* "id-smime-aa-ets-sigPolicyId" */ | ||
| 1695 | &(nid_objs[229]),/* "id-smime-aa-ets-signerAttr" */ | ||
| 1696 | &(nid_objs[228]),/* "id-smime-aa-ets-signerLocation" */ | ||
| 1697 | &(nid_objs[219]),/* "id-smime-aa-macValue" */ | ||
| 1698 | &(nid_objs[214]),/* "id-smime-aa-mlExpandHistory" */ | ||
| 1699 | &(nid_objs[216]),/* "id-smime-aa-msgSigDigest" */ | ||
| 1700 | &(nid_objs[212]),/* "id-smime-aa-receiptRequest" */ | ||
| 1701 | &(nid_objs[213]),/* "id-smime-aa-securityLabel" */ | ||
| 1702 | &(nid_objs[239]),/* "id-smime-aa-signatureType" */ | ||
| 1703 | &(nid_objs[223]),/* "id-smime-aa-signingCertificate" */ | ||
| 1704 | &(nid_objs[224]),/* "id-smime-aa-smimeEncryptCerts" */ | ||
| 1705 | &(nid_objs[225]),/* "id-smime-aa-timeStampToken" */ | ||
| 1706 | &(nid_objs[192]),/* "id-smime-alg" */ | ||
| 1707 | &(nid_objs[243]),/* "id-smime-alg-3DESwrap" */ | ||
| 1708 | &(nid_objs[246]),/* "id-smime-alg-CMS3DESwrap" */ | ||
| 1709 | &(nid_objs[247]),/* "id-smime-alg-CMSRC2wrap" */ | ||
| 1710 | &(nid_objs[245]),/* "id-smime-alg-ESDH" */ | ||
| 1711 | &(nid_objs[241]),/* "id-smime-alg-ESDHwith3DES" */ | ||
| 1712 | &(nid_objs[242]),/* "id-smime-alg-ESDHwithRC2" */ | ||
| 1713 | &(nid_objs[244]),/* "id-smime-alg-RC2wrap" */ | ||
| 1714 | &(nid_objs[193]),/* "id-smime-cd" */ | ||
| 1715 | &(nid_objs[248]),/* "id-smime-cd-ldap" */ | ||
| 1716 | &(nid_objs[190]),/* "id-smime-ct" */ | ||
| 1717 | &(nid_objs[210]),/* "id-smime-ct-DVCSRequestData" */ | ||
| 1718 | &(nid_objs[211]),/* "id-smime-ct-DVCSResponseData" */ | ||
| 1719 | &(nid_objs[208]),/* "id-smime-ct-TDTInfo" */ | ||
| 1720 | &(nid_objs[207]),/* "id-smime-ct-TSTInfo" */ | ||
| 1721 | &(nid_objs[205]),/* "id-smime-ct-authData" */ | ||
| 1722 | &(nid_objs[209]),/* "id-smime-ct-contentInfo" */ | ||
| 1723 | &(nid_objs[206]),/* "id-smime-ct-publishCert" */ | ||
| 1724 | &(nid_objs[204]),/* "id-smime-ct-receipt" */ | ||
| 1725 | &(nid_objs[195]),/* "id-smime-cti" */ | ||
| 1726 | &(nid_objs[255]),/* "id-smime-cti-ets-proofOfApproval" */ | ||
| 1727 | &(nid_objs[256]),/* "id-smime-cti-ets-proofOfCreation" */ | ||
| 1728 | &(nid_objs[253]),/* "id-smime-cti-ets-proofOfDelivery" */ | ||
| 1729 | &(nid_objs[251]),/* "id-smime-cti-ets-proofOfOrigin" */ | ||
| 1730 | &(nid_objs[252]),/* "id-smime-cti-ets-proofOfReceipt" */ | ||
| 1731 | &(nid_objs[254]),/* "id-smime-cti-ets-proofOfSender" */ | ||
| 1732 | &(nid_objs[189]),/* "id-smime-mod" */ | ||
| 1733 | &(nid_objs[196]),/* "id-smime-mod-cms" */ | ||
| 1734 | &(nid_objs[197]),/* "id-smime-mod-ess" */ | ||
| 1735 | &(nid_objs[202]),/* "id-smime-mod-ets-eSigPolicy-88" */ | ||
| 1736 | &(nid_objs[203]),/* "id-smime-mod-ets-eSigPolicy-97" */ | ||
| 1737 | &(nid_objs[200]),/* "id-smime-mod-ets-eSignature-88" */ | ||
| 1738 | &(nid_objs[201]),/* "id-smime-mod-ets-eSignature-97" */ | ||
| 1739 | &(nid_objs[199]),/* "id-smime-mod-msg-v3" */ | ||
| 1740 | &(nid_objs[198]),/* "id-smime-mod-oid" */ | ||
| 1741 | &(nid_objs[194]),/* "id-smime-spq" */ | ||
| 1742 | &(nid_objs[250]),/* "id-smime-spq-ets-sqt-unotice" */ | ||
| 1743 | &(nid_objs[249]),/* "id-smime-spq-ets-sqt-uri" */ | ||
| 1744 | &(nid_objs[34]),/* "idea-cbc" */ | ||
| 1745 | &(nid_objs[35]),/* "idea-cfb" */ | ||
| 1746 | &(nid_objs[36]),/* "idea-ecb" */ | ||
| 1747 | &(nid_objs[46]),/* "idea-ofb" */ | ||
| 1748 | &(nid_objs[101]),/* "initials" */ | ||
| 1749 | &(nid_objs[181]),/* "iso" */ | ||
| 1750 | &(nid_objs[150]),/* "keyBag" */ | ||
| 1751 | &(nid_objs[157]),/* "localKeyID" */ | ||
| 1752 | &(nid_objs[15]),/* "localityName" */ | ||
| 1753 | &(nid_objs[ 3]),/* "md2" */ | ||
| 1754 | &(nid_objs[ 7]),/* "md2WithRSAEncryption" */ | ||
| 1755 | &(nid_objs[257]),/* "md4" */ | ||
| 1756 | &(nid_objs[ 4]),/* "md5" */ | ||
| 1757 | &(nid_objs[114]),/* "md5-sha1" */ | ||
| 1758 | &(nid_objs[104]),/* "md5WithRSA" */ | ||
| 1759 | &(nid_objs[ 8]),/* "md5WithRSAEncryption" */ | ||
| 1760 | &(nid_objs[95]),/* "mdc2" */ | ||
| 1761 | &(nid_objs[96]),/* "mdc2WithRSA" */ | ||
| 1762 | &(nid_objs[51]),/* "messageDigest" */ | ||
| 1763 | &(nid_objs[173]),/* "name" */ | ||
| 1764 | &(nid_objs[369]),/* "noCheck" */ | ||
| 1765 | &(nid_objs[379]),/* "org" */ | ||
| 1766 | &(nid_objs[17]),/* "organizationName" */ | ||
| 1767 | &(nid_objs[18]),/* "organizationalUnitName" */ | ||
| 1768 | &(nid_objs[374]),/* "path" */ | ||
| 1769 | &(nid_objs[ 9]),/* "pbeWithMD2AndDES-CBC" */ | ||
| 1770 | &(nid_objs[168]),/* "pbeWithMD2AndRC2-CBC" */ | ||
| 1771 | &(nid_objs[112]),/* "pbeWithMD5AndCast5CBC" */ | ||
| 1772 | &(nid_objs[10]),/* "pbeWithMD5AndDES-CBC" */ | ||
| 1773 | &(nid_objs[169]),/* "pbeWithMD5AndRC2-CBC" */ | ||
| 1774 | &(nid_objs[148]),/* "pbeWithSHA1And128BitRC2-CBC" */ | ||
| 1775 | &(nid_objs[144]),/* "pbeWithSHA1And128BitRC4" */ | ||
| 1776 | &(nid_objs[147]),/* "pbeWithSHA1And2-KeyTripleDES-CBC" */ | ||
| 1777 | &(nid_objs[146]),/* "pbeWithSHA1And3-KeyTripleDES-CBC" */ | ||
| 1778 | &(nid_objs[149]),/* "pbeWithSHA1And40BitRC2-CBC" */ | ||
| 1779 | &(nid_objs[145]),/* "pbeWithSHA1And40BitRC4" */ | ||
| 1780 | &(nid_objs[170]),/* "pbeWithSHA1AndDES-CBC" */ | ||
| 1781 | &(nid_objs[68]),/* "pbeWithSHA1AndRC2-CBC" */ | ||
| 1782 | &(nid_objs[186]),/* "pkcs1" */ | ||
| 1783 | &(nid_objs[27]),/* "pkcs3" */ | ||
| 1784 | &(nid_objs[187]),/* "pkcs5" */ | ||
| 1785 | &(nid_objs[20]),/* "pkcs7" */ | ||
| 1786 | &(nid_objs[21]),/* "pkcs7-data" */ | ||
| 1787 | &(nid_objs[25]),/* "pkcs7-digestData" */ | ||
| 1788 | &(nid_objs[26]),/* "pkcs7-encryptedData" */ | ||
| 1789 | &(nid_objs[23]),/* "pkcs7-envelopedData" */ | ||
| 1790 | &(nid_objs[24]),/* "pkcs7-signedAndEnvelopedData" */ | ||
| 1791 | &(nid_objs[22]),/* "pkcs7-signedData" */ | ||
| 1792 | &(nid_objs[151]),/* "pkcs8ShroudedKeyBag" */ | ||
| 1793 | &(nid_objs[47]),/* "pkcs9" */ | ||
| 1794 | &(nid_objs[286]),/* "qcStatements" */ | ||
| 1795 | &(nid_objs[98]),/* "rc2-40-cbc" */ | ||
| 1796 | &(nid_objs[166]),/* "rc2-64-cbc" */ | ||
| 1797 | &(nid_objs[37]),/* "rc2-cbc" */ | ||
| 1798 | &(nid_objs[39]),/* "rc2-cfb" */ | ||
| 1799 | &(nid_objs[38]),/* "rc2-ecb" */ | ||
| 1800 | &(nid_objs[40]),/* "rc2-ofb" */ | ||
| 1801 | &(nid_objs[ 5]),/* "rc4" */ | ||
| 1802 | &(nid_objs[97]),/* "rc4-40" */ | ||
| 1803 | &(nid_objs[120]),/* "rc5-cbc" */ | ||
| 1804 | &(nid_objs[122]),/* "rc5-cfb" */ | ||
| 1805 | &(nid_objs[121]),/* "rc5-ecb" */ | ||
| 1806 | &(nid_objs[123]),/* "rc5-ofb" */ | ||
| 1807 | &(nid_objs[117]),/* "ripemd160" */ | ||
| 1808 | &(nid_objs[119]),/* "ripemd160WithRSA" */ | ||
| 1809 | &(nid_objs[19]),/* "rsa" */ | ||
| 1810 | &(nid_objs[ 6]),/* "rsaEncryption" */ | ||
| 1811 | &(nid_objs[377]),/* "rsaSignature" */ | ||
| 1812 | &(nid_objs[124]),/* "run length compression" */ | ||
| 1813 | &(nid_objs[155]),/* "safeContentsBag" */ | ||
| 1814 | &(nid_objs[291]),/* "sbqp-autonomousSysNum" */ | ||
| 1815 | &(nid_objs[290]),/* "sbqp-ipAddrBlock" */ | ||
| 1816 | &(nid_objs[292]),/* "sbqp-routerIdentifier" */ | ||
| 1817 | &(nid_objs[159]),/* "sdsiCertificate" */ | ||
| 1818 | &(nid_objs[154]),/* "secretBag" */ | ||
| 1819 | &(nid_objs[105]),/* "serialNumber" */ | ||
| 1820 | &(nid_objs[41]),/* "sha" */ | ||
| 1821 | &(nid_objs[64]),/* "sha1" */ | ||
| 1822 | &(nid_objs[115]),/* "sha1WithRSA" */ | ||
| 1823 | &(nid_objs[65]),/* "sha1WithRSAEncryption" */ | ||
| 1824 | &(nid_objs[42]),/* "shaWithRSAEncryption" */ | ||
| 1825 | &(nid_objs[52]),/* "signingTime" */ | ||
| 1826 | &(nid_objs[16]),/* "stateOrProvinceName" */ | ||
| 1827 | &(nid_objs[100]),/* "surname" */ | ||
| 1828 | &(nid_objs[293]),/* "textNotice" */ | ||
| 1829 | &(nid_objs[106]),/* "title" */ | ||
| 1830 | &(nid_objs[ 0]),/* "undefined" */ | ||
| 1831 | &(nid_objs[102]),/* "uniqueIdentifier" */ | ||
| 1832 | &(nid_objs[55]),/* "unstructuredAddress" */ | ||
| 1833 | &(nid_objs[49]),/* "unstructuredName" */ | ||
| 1834 | &(nid_objs[373]),/* "valid" */ | ||
| 1835 | &(nid_objs[158]),/* "x509Certificate" */ | ||
| 1836 | &(nid_objs[160]),/* "x509Crl" */ | ||
| 1837 | &(nid_objs[125]),/* "zlib compression" */ | ||
| 1838 | }; | ||
| 1839 | |||
| 1840 | static ASN1_OBJECT *obj_objs[NUM_OBJ]={ | ||
| 1841 | &(nid_objs[ 0]),/* OBJ_undef 0 */ | ||
| 1842 | &(nid_objs[389]),/* OBJ_Enterprises 1 */ | ||
| 1843 | &(nid_objs[181]),/* OBJ_iso 1 */ | ||
| 1844 | &(nid_objs[182]),/* OBJ_member_body 1 2 */ | ||
| 1845 | &(nid_objs[379]),/* OBJ_org 1 3 */ | ||
| 1846 | &(nid_objs[11]),/* OBJ_X500 2 5 */ | ||
| 1847 | &(nid_objs[380]),/* OBJ_dod 1 3 6 */ | ||
| 1848 | &(nid_objs[12]),/* OBJ_X509 2 5 4 */ | ||
| 1849 | &(nid_objs[378]),/* OBJ_X500algorithms 2 5 8 */ | ||
| 1850 | &(nid_objs[81]),/* OBJ_id_ce 2 5 29 */ | ||
| 1851 | &(nid_objs[183]),/* OBJ_ISO_US 1 2 840 */ | ||
| 1852 | &(nid_objs[381]),/* OBJ_iana 1 3 6 1 */ | ||
| 1853 | &(nid_objs[13]),/* OBJ_commonName 2 5 4 3 */ | ||
| 1854 | &(nid_objs[100]),/* OBJ_surname 2 5 4 4 */ | ||
| 1855 | &(nid_objs[105]),/* OBJ_serialNumber 2 5 4 5 */ | ||
| 1856 | &(nid_objs[14]),/* OBJ_countryName 2 5 4 6 */ | ||
| 1857 | &(nid_objs[15]),/* OBJ_localityName 2 5 4 7 */ | ||
| 1858 | &(nid_objs[16]),/* OBJ_stateOrProvinceName 2 5 4 8 */ | ||
| 1859 | &(nid_objs[17]),/* OBJ_organizationName 2 5 4 10 */ | ||
| 1860 | &(nid_objs[18]),/* OBJ_organizationalUnitName 2 5 4 11 */ | ||
| 1861 | &(nid_objs[106]),/* OBJ_title 2 5 4 12 */ | ||
| 1862 | &(nid_objs[107]),/* OBJ_description 2 5 4 13 */ | ||
| 1863 | &(nid_objs[173]),/* OBJ_name 2 5 4 41 */ | ||
| 1864 | &(nid_objs[99]),/* OBJ_givenName 2 5 4 42 */ | ||
| 1865 | &(nid_objs[101]),/* OBJ_initials 2 5 4 43 */ | ||
| 1866 | &(nid_objs[102]),/* OBJ_uniqueIdentifier 2 5 4 45 */ | ||
| 1867 | &(nid_objs[174]),/* OBJ_dnQualifier 2 5 4 46 */ | ||
| 1868 | &(nid_objs[82]),/* OBJ_subject_key_identifier 2 5 29 14 */ | ||
| 1869 | &(nid_objs[83]),/* OBJ_key_usage 2 5 29 15 */ | ||
| 1870 | &(nid_objs[84]),/* OBJ_private_key_usage_period 2 5 29 16 */ | ||
| 1871 | &(nid_objs[85]),/* OBJ_subject_alt_name 2 5 29 17 */ | ||
| 1872 | &(nid_objs[86]),/* OBJ_issuer_alt_name 2 5 29 18 */ | ||
| 1873 | &(nid_objs[87]),/* OBJ_basic_constraints 2 5 29 19 */ | ||
| 1874 | &(nid_objs[88]),/* OBJ_crl_number 2 5 29 20 */ | ||
| 1875 | &(nid_objs[141]),/* OBJ_crl_reason 2 5 29 21 */ | ||
| 1876 | &(nid_objs[142]),/* OBJ_invalidity_date 2 5 29 24 */ | ||
| 1877 | &(nid_objs[140]),/* OBJ_delta_crl 2 5 29 27 */ | ||
| 1878 | &(nid_objs[103]),/* OBJ_crl_distribution_points 2 5 29 31 */ | ||
| 1879 | &(nid_objs[89]),/* OBJ_certificate_policies 2 5 29 32 */ | ||
| 1880 | &(nid_objs[90]),/* OBJ_authority_key_identifier 2 5 29 35 */ | ||
| 1881 | &(nid_objs[126]),/* OBJ_ext_key_usage 2 5 29 37 */ | ||
| 1882 | &(nid_objs[390]),/* OBJ_dcObject 1466 344 */ | ||
| 1883 | &(nid_objs[382]),/* OBJ_Directory 1 3 6 1 1 */ | ||
| 1884 | &(nid_objs[383]),/* OBJ_Management 1 3 6 1 2 */ | ||
| 1885 | &(nid_objs[384]),/* OBJ_Experimental 1 3 6 1 3 */ | ||
| 1886 | &(nid_objs[385]),/* OBJ_Private 1 3 6 1 4 */ | ||
| 1887 | &(nid_objs[386]),/* OBJ_Security 1 3 6 1 5 */ | ||
| 1888 | &(nid_objs[387]),/* OBJ_SNMPv2 1 3 6 1 6 */ | ||
| 1889 | &(nid_objs[388]),/* OBJ_Mail 1 3 6 1 7 */ | ||
| 1890 | &(nid_objs[376]),/* OBJ_algorithm 1 3 14 3 2 */ | ||
| 1891 | &(nid_objs[19]),/* OBJ_rsa 2 5 8 1 1 */ | ||
| 1892 | &(nid_objs[96]),/* OBJ_mdc2WithRSA 2 5 8 3 100 */ | ||
| 1893 | &(nid_objs[95]),/* OBJ_mdc2 2 5 8 3 101 */ | ||
| 1894 | &(nid_objs[184]),/* OBJ_X9_57 1 2 840 10040 */ | ||
| 1895 | &(nid_objs[104]),/* OBJ_md5WithRSA 1 3 14 3 2 3 */ | ||
| 1896 | &(nid_objs[29]),/* OBJ_des_ecb 1 3 14 3 2 6 */ | ||
| 1897 | &(nid_objs[31]),/* OBJ_des_cbc 1 3 14 3 2 7 */ | ||
| 1898 | &(nid_objs[45]),/* OBJ_des_ofb64 1 3 14 3 2 8 */ | ||
| 1899 | &(nid_objs[30]),/* OBJ_des_cfb64 1 3 14 3 2 9 */ | ||
| 1900 | &(nid_objs[377]),/* OBJ_rsaSignature 1 3 14 3 2 11 */ | ||
| 1901 | &(nid_objs[67]),/* OBJ_dsa_2 1 3 14 3 2 12 */ | ||
| 1902 | &(nid_objs[66]),/* OBJ_dsaWithSHA 1 3 14 3 2 13 */ | ||
| 1903 | &(nid_objs[42]),/* OBJ_shaWithRSAEncryption 1 3 14 3 2 15 */ | ||
| 1904 | &(nid_objs[32]),/* OBJ_des_ede 1 3 14 3 2 17 */ | ||
| 1905 | &(nid_objs[41]),/* OBJ_sha 1 3 14 3 2 18 */ | ||
| 1906 | &(nid_objs[64]),/* OBJ_sha1 1 3 14 3 2 26 */ | ||
| 1907 | &(nid_objs[70]),/* OBJ_dsaWithSHA1_2 1 3 14 3 2 27 */ | ||
| 1908 | &(nid_objs[115]),/* OBJ_sha1WithRSA 1 3 14 3 2 29 */ | ||
| 1909 | &(nid_objs[117]),/* OBJ_ripemd160 1 3 36 3 2 1 */ | ||
| 1910 | &(nid_objs[143]),/* OBJ_sxnet 1 3 101 1 4 1 */ | ||
| 1911 | &(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666 1 */ | ||
| 1912 | &(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666 2 */ | ||
| 1913 | &(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */ | ||
| 1914 | &(nid_objs[185]),/* OBJ_X9cm 1 2 840 10040 4 */ | ||
| 1915 | &(nid_objs[127]),/* OBJ_id_pkix 1 3 6 1 5 5 7 */ | ||
| 1916 | &(nid_objs[119]),/* OBJ_ripemd160WithRSA 1 3 36 3 3 1 2 */ | ||
| 1917 | &(nid_objs[ 2]),/* OBJ_pkcs 1 2 840 113549 1 */ | ||
| 1918 | &(nid_objs[116]),/* OBJ_dsa 1 2 840 10040 4 1 */ | ||
| 1919 | &(nid_objs[113]),/* OBJ_dsaWithSHA1 1 2 840 10040 4 3 */ | ||
| 1920 | &(nid_objs[258]),/* OBJ_id_pkix_mod 1 3 6 1 5 5 7 0 */ | ||
| 1921 | &(nid_objs[175]),/* OBJ_id_pe 1 3 6 1 5 5 7 1 */ | ||
| 1922 | &(nid_objs[259]),/* OBJ_id_qt 1 3 6 1 5 5 7 2 */ | ||
| 1923 | &(nid_objs[128]),/* OBJ_id_kp 1 3 6 1 5 5 7 3 */ | ||
| 1924 | &(nid_objs[260]),/* OBJ_id_it 1 3 6 1 5 5 7 4 */ | ||
| 1925 | &(nid_objs[261]),/* OBJ_id_pkip 1 3 6 1 5 5 7 5 */ | ||
| 1926 | &(nid_objs[262]),/* OBJ_id_alg 1 3 6 1 5 5 7 6 */ | ||
| 1927 | &(nid_objs[263]),/* OBJ_id_cmc 1 3 6 1 5 5 7 7 */ | ||
| 1928 | &(nid_objs[264]),/* OBJ_id_on 1 3 6 1 5 5 7 8 */ | ||
| 1929 | &(nid_objs[265]),/* OBJ_id_pda 1 3 6 1 5 5 7 9 */ | ||
| 1930 | &(nid_objs[266]),/* OBJ_id_aca 1 3 6 1 5 5 7 10 */ | ||
| 1931 | &(nid_objs[267]),/* OBJ_id_qcs 1 3 6 1 5 5 7 11 */ | ||
| 1932 | &(nid_objs[268]),/* OBJ_id_cct 1 3 6 1 5 5 7 12 */ | ||
| 1933 | &(nid_objs[176]),/* OBJ_id_ad 1 3 6 1 5 5 7 48 */ | ||
| 1934 | &(nid_objs[57]),/* OBJ_netscape 2 16 840 1 113730 */ | ||
| 1935 | &(nid_objs[186]),/* OBJ_pkcs1 1 2 840 113549 1 1 */ | ||
| 1936 | &(nid_objs[27]),/* OBJ_pkcs3 1 2 840 113549 1 3 */ | ||
| 1937 | &(nid_objs[187]),/* OBJ_pkcs5 1 2 840 113549 1 5 */ | ||
| 1938 | &(nid_objs[20]),/* OBJ_pkcs7 1 2 840 113549 1 7 */ | ||
| 1939 | &(nid_objs[47]),/* OBJ_pkcs9 1 2 840 113549 1 9 */ | ||
| 1940 | &(nid_objs[ 3]),/* OBJ_md2 1 2 840 113549 2 2 */ | ||
| 1941 | &(nid_objs[257]),/* OBJ_md4 1 2 840 113549 2 4 */ | ||
| 1942 | &(nid_objs[ 4]),/* OBJ_md5 1 2 840 113549 2 5 */ | ||
| 1943 | &(nid_objs[163]),/* OBJ_hmacWithSHA1 1 2 840 113549 2 7 */ | ||
| 1944 | &(nid_objs[37]),/* OBJ_rc2_cbc 1 2 840 113549 3 2 */ | ||
| 1945 | &(nid_objs[ 5]),/* OBJ_rc4 1 2 840 113549 3 4 */ | ||
| 1946 | &(nid_objs[44]),/* OBJ_des_ede3_cbc 1 2 840 113549 3 7 */ | ||
| 1947 | &(nid_objs[120]),/* OBJ_rc5_cbc 1 2 840 113549 3 8 */ | ||
| 1948 | &(nid_objs[269]),/* OBJ_id_pkix1_explicit_88 1 3 6 1 5 5 7 0 1 */ | ||
| 1949 | &(nid_objs[270]),/* OBJ_id_pkix1_implicit_88 1 3 6 1 5 5 7 0 2 */ | ||
| 1950 | &(nid_objs[271]),/* OBJ_id_pkix1_explicit_93 1 3 6 1 5 5 7 0 3 */ | ||
| 1951 | &(nid_objs[272]),/* OBJ_id_pkix1_implicit_93 1 3 6 1 5 5 7 0 4 */ | ||
| 1952 | &(nid_objs[273]),/* OBJ_id_mod_crmf 1 3 6 1 5 5 7 0 5 */ | ||
| 1953 | &(nid_objs[274]),/* OBJ_id_mod_cmc 1 3 6 1 5 5 7 0 6 */ | ||
| 1954 | &(nid_objs[275]),/* OBJ_id_mod_kea_profile_88 1 3 6 1 5 5 7 0 7 */ | ||
| 1955 | &(nid_objs[276]),/* OBJ_id_mod_kea_profile_93 1 3 6 1 5 5 7 0 8 */ | ||
| 1956 | &(nid_objs[277]),/* OBJ_id_mod_cmp 1 3 6 1 5 5 7 0 9 */ | ||
| 1957 | &(nid_objs[278]),/* OBJ_id_mod_qualified_cert_88 1 3 6 1 5 5 7 0 10 */ | ||
| 1958 | &(nid_objs[279]),/* OBJ_id_mod_qualified_cert_93 1 3 6 1 5 5 7 0 11 */ | ||
| 1959 | &(nid_objs[280]),/* OBJ_id_mod_attribute_cert 1 3 6 1 5 5 7 0 12 */ | ||
| 1960 | &(nid_objs[281]),/* OBJ_id_mod_timestamp_protocol 1 3 6 1 5 5 7 0 13 */ | ||
| 1961 | &(nid_objs[282]),/* OBJ_id_mod_ocsp 1 3 6 1 5 5 7 0 14 */ | ||
| 1962 | &(nid_objs[283]),/* OBJ_id_mod_dvcs 1 3 6 1 5 5 7 0 15 */ | ||
| 1963 | &(nid_objs[284]),/* OBJ_id_mod_cmp2000 1 3 6 1 5 5 7 0 16 */ | ||
| 1964 | &(nid_objs[177]),/* OBJ_info_access 1 3 6 1 5 5 7 1 1 */ | ||
| 1965 | &(nid_objs[285]),/* OBJ_biometricInfo 1 3 6 1 5 5 7 1 2 */ | ||
| 1966 | &(nid_objs[286]),/* OBJ_qcStatements 1 3 6 1 5 5 7 1 3 */ | ||
| 1967 | &(nid_objs[287]),/* OBJ_ac_auditEntity 1 3 6 1 5 5 7 1 4 */ | ||
| 1968 | &(nid_objs[288]),/* OBJ_ac_targeting 1 3 6 1 5 5 7 1 5 */ | ||
| 1969 | &(nid_objs[289]),/* OBJ_aaControls 1 3 6 1 5 5 7 1 6 */ | ||
| 1970 | &(nid_objs[290]),/* OBJ_sbqp_ipAddrBlock 1 3 6 1 5 5 7 1 7 */ | ||
| 1971 | &(nid_objs[291]),/* OBJ_sbqp_autonomousSysNum 1 3 6 1 5 5 7 1 8 */ | ||
| 1972 | &(nid_objs[292]),/* OBJ_sbqp_routerIdentifier 1 3 6 1 5 5 7 1 9 */ | ||
| 1973 | &(nid_objs[164]),/* OBJ_id_qt_cps 1 3 6 1 5 5 7 2 1 */ | ||
| 1974 | &(nid_objs[165]),/* OBJ_id_qt_unotice 1 3 6 1 5 5 7 2 2 */ | ||
| 1975 | &(nid_objs[293]),/* OBJ_textNotice 1 3 6 1 5 5 7 2 3 */ | ||
| 1976 | &(nid_objs[129]),/* OBJ_server_auth 1 3 6 1 5 5 7 3 1 */ | ||
| 1977 | &(nid_objs[130]),/* OBJ_client_auth 1 3 6 1 5 5 7 3 2 */ | ||
| 1978 | &(nid_objs[131]),/* OBJ_code_sign 1 3 6 1 5 5 7 3 3 */ | ||
| 1979 | &(nid_objs[132]),/* OBJ_email_protect 1 3 6 1 5 5 7 3 4 */ | ||
| 1980 | &(nid_objs[294]),/* OBJ_ipsecEndSystem 1 3 6 1 5 5 7 3 5 */ | ||
| 1981 | &(nid_objs[295]),/* OBJ_ipsecTunnel 1 3 6 1 5 5 7 3 6 */ | ||
| 1982 | &(nid_objs[296]),/* OBJ_ipsecUser 1 3 6 1 5 5 7 3 7 */ | ||
| 1983 | &(nid_objs[133]),/* OBJ_time_stamp 1 3 6 1 5 5 7 3 8 */ | ||
| 1984 | &(nid_objs[180]),/* OBJ_OCSP_sign 1 3 6 1 5 5 7 3 9 */ | ||
| 1985 | &(nid_objs[297]),/* OBJ_dvcs 1 3 6 1 5 5 7 3 10 */ | ||
| 1986 | &(nid_objs[298]),/* OBJ_id_it_caProtEncCert 1 3 6 1 5 5 7 4 1 */ | ||
| 1987 | &(nid_objs[299]),/* OBJ_id_it_signKeyPairTypes 1 3 6 1 5 5 7 4 2 */ | ||
| 1988 | &(nid_objs[300]),/* OBJ_id_it_encKeyPairTypes 1 3 6 1 5 5 7 4 3 */ | ||
| 1989 | &(nid_objs[301]),/* OBJ_id_it_preferredSymmAlg 1 3 6 1 5 5 7 4 4 */ | ||
| 1990 | &(nid_objs[302]),/* OBJ_id_it_caKeyUpdateInfo 1 3 6 1 5 5 7 4 5 */ | ||
| 1991 | &(nid_objs[303]),/* OBJ_id_it_currentCRL 1 3 6 1 5 5 7 4 6 */ | ||
| 1992 | &(nid_objs[304]),/* OBJ_id_it_unsupportedOIDs 1 3 6 1 5 5 7 4 7 */ | ||
| 1993 | &(nid_objs[305]),/* OBJ_id_it_subscriptionRequest 1 3 6 1 5 5 7 4 8 */ | ||
| 1994 | &(nid_objs[306]),/* OBJ_id_it_subscriptionResponse 1 3 6 1 5 5 7 4 9 */ | ||
| 1995 | &(nid_objs[307]),/* OBJ_id_it_keyPairParamReq 1 3 6 1 5 5 7 4 10 */ | ||
| 1996 | &(nid_objs[308]),/* OBJ_id_it_keyPairParamRep 1 3 6 1 5 5 7 4 11 */ | ||
| 1997 | &(nid_objs[309]),/* OBJ_id_it_revPassphrase 1 3 6 1 5 5 7 4 12 */ | ||
| 1998 | &(nid_objs[310]),/* OBJ_id_it_implicitConfirm 1 3 6 1 5 5 7 4 13 */ | ||
| 1999 | &(nid_objs[311]),/* OBJ_id_it_confirmWaitTime 1 3 6 1 5 5 7 4 14 */ | ||
| 2000 | &(nid_objs[312]),/* OBJ_id_it_origPKIMessage 1 3 6 1 5 5 7 4 15 */ | ||
| 2001 | &(nid_objs[313]),/* OBJ_id_regCtrl 1 3 6 1 5 5 7 5 1 */ | ||
| 2002 | &(nid_objs[314]),/* OBJ_id_regInfo 1 3 6 1 5 5 7 5 2 */ | ||
| 2003 | &(nid_objs[323]),/* OBJ_id_alg_des40 1 3 6 1 5 5 7 6 1 */ | ||
| 2004 | &(nid_objs[324]),/* OBJ_id_alg_noSignature 1 3 6 1 5 5 7 6 2 */ | ||
| 2005 | &(nid_objs[325]),/* OBJ_id_alg_dh_sig_hmac_sha1 1 3 6 1 5 5 7 6 3 */ | ||
| 2006 | &(nid_objs[326]),/* OBJ_id_alg_dh_pop 1 3 6 1 5 5 7 6 4 */ | ||
| 2007 | &(nid_objs[327]),/* OBJ_id_cmc_statusInfo 1 3 6 1 5 5 7 7 1 */ | ||
| 2008 | &(nid_objs[328]),/* OBJ_id_cmc_identification 1 3 6 1 5 5 7 7 2 */ | ||
| 2009 | &(nid_objs[329]),/* OBJ_id_cmc_identityProof 1 3 6 1 5 5 7 7 3 */ | ||
| 2010 | &(nid_objs[330]),/* OBJ_id_cmc_dataReturn 1 3 6 1 5 5 7 7 4 */ | ||
| 2011 | &(nid_objs[331]),/* OBJ_id_cmc_transactionId 1 3 6 1 5 5 7 7 5 */ | ||
| 2012 | &(nid_objs[332]),/* OBJ_id_cmc_senderNonce 1 3 6 1 5 5 7 7 6 */ | ||
| 2013 | &(nid_objs[333]),/* OBJ_id_cmc_recipientNonce 1 3 6 1 5 5 7 7 7 */ | ||
| 2014 | &(nid_objs[334]),/* OBJ_id_cmc_addExtensions 1 3 6 1 5 5 7 7 8 */ | ||
| 2015 | &(nid_objs[335]),/* OBJ_id_cmc_encryptedPOP 1 3 6 1 5 5 7 7 9 */ | ||
| 2016 | &(nid_objs[336]),/* OBJ_id_cmc_decryptedPOP 1 3 6 1 5 5 7 7 10 */ | ||
| 2017 | &(nid_objs[337]),/* OBJ_id_cmc_lraPOPWitness 1 3 6 1 5 5 7 7 11 */ | ||
| 2018 | &(nid_objs[338]),/* OBJ_id_cmc_getCert 1 3 6 1 5 5 7 7 15 */ | ||
| 2019 | &(nid_objs[339]),/* OBJ_id_cmc_getCRL 1 3 6 1 5 5 7 7 16 */ | ||
| 2020 | &(nid_objs[340]),/* OBJ_id_cmc_revokeRequest 1 3 6 1 5 5 7 7 17 */ | ||
| 2021 | &(nid_objs[341]),/* OBJ_id_cmc_regInfo 1 3 6 1 5 5 7 7 18 */ | ||
| 2022 | &(nid_objs[342]),/* OBJ_id_cmc_responseInfo 1 3 6 1 5 5 7 7 19 */ | ||
| 2023 | &(nid_objs[343]),/* OBJ_id_cmc_queryPending 1 3 6 1 5 5 7 7 21 */ | ||
| 2024 | &(nid_objs[344]),/* OBJ_id_cmc_popLinkRandom 1 3 6 1 5 5 7 7 22 */ | ||
| 2025 | &(nid_objs[345]),/* OBJ_id_cmc_popLinkWitness 1 3 6 1 5 5 7 7 23 */ | ||
| 2026 | &(nid_objs[346]),/* OBJ_id_cmc_confirmCertAcceptance 1 3 6 1 5 5 7 7 24 */ | ||
| 2027 | &(nid_objs[347]),/* OBJ_id_on_personalData 1 3 6 1 5 5 7 8 1 */ | ||
| 2028 | &(nid_objs[348]),/* OBJ_id_pda_dateOfBirth 1 3 6 1 5 5 7 9 1 */ | ||
| 2029 | &(nid_objs[349]),/* OBJ_id_pda_placeOfBirth 1 3 6 1 5 5 7 9 2 */ | ||
| 2030 | &(nid_objs[350]),/* OBJ_id_pda_pseudonym 1 3 6 1 5 5 7 9 3 */ | ||
| 2031 | &(nid_objs[351]),/* OBJ_id_pda_gender 1 3 6 1 5 5 7 9 4 */ | ||
| 2032 | &(nid_objs[352]),/* OBJ_id_pda_countryOfCitizenship 1 3 6 1 5 5 7 9 5 */ | ||
| 2033 | &(nid_objs[353]),/* OBJ_id_pda_countryOfResidence 1 3 6 1 5 5 7 9 6 */ | ||
| 2034 | &(nid_objs[354]),/* OBJ_id_aca_authenticationInfo 1 3 6 1 5 5 7 10 1 */ | ||
| 2035 | &(nid_objs[355]),/* OBJ_id_aca_accessIdentity 1 3 6 1 5 5 7 10 2 */ | ||
| 2036 | &(nid_objs[356]),/* OBJ_id_aca_chargingIdentity 1 3 6 1 5 5 7 10 3 */ | ||
| 2037 | &(nid_objs[357]),/* OBJ_id_aca_group 1 3 6 1 5 5 7 10 4 */ | ||
| 2038 | &(nid_objs[358]),/* OBJ_id_aca_role 1 3 6 1 5 5 7 10 5 */ | ||
| 2039 | &(nid_objs[359]),/* OBJ_id_qcs_pkixQCSyntax_v1 1 3 6 1 5 5 7 11 1 */ | ||
| 2040 | &(nid_objs[360]),/* OBJ_id_cct_crs 1 3 6 1 5 5 7 12 1 */ | ||
| 2041 | &(nid_objs[361]),/* OBJ_id_cct_PKIData 1 3 6 1 5 5 7 12 2 */ | ||
| 2042 | &(nid_objs[362]),/* OBJ_id_cct_PKIResponse 1 3 6 1 5 5 7 12 3 */ | ||
| 2043 | &(nid_objs[178]),/* OBJ_ad_OCSP 1 3 6 1 5 5 7 48 1 */ | ||
| 2044 | &(nid_objs[179]),/* OBJ_ad_ca_issuers 1 3 6 1 5 5 7 48 2 */ | ||
| 2045 | &(nid_objs[363]),/* OBJ_ad_timeStamping 1 3 6 1 5 5 7 48 3 */ | ||
| 2046 | &(nid_objs[364]),/* OBJ_ad_dvcs 1 3 6 1 5 5 7 48 4 */ | ||
| 2047 | &(nid_objs[58]),/* OBJ_netscape_cert_extension 2 16 840 1 113730 1 */ | ||
| 2048 | &(nid_objs[59]),/* OBJ_netscape_data_type 2 16 840 1 113730 2 */ | ||
| 2049 | &(nid_objs[108]),/* OBJ_cast5_cbc 1 2 840 113533 7 66 10 */ | ||
| 2050 | &(nid_objs[112]),/* OBJ_pbeWithMD5AndCast5_CBC 1 2 840 113533 7 66 12 */ | ||
| 2051 | &(nid_objs[ 6]),/* OBJ_rsaEncryption 1 2 840 113549 1 1 1 */ | ||
| 2052 | &(nid_objs[ 7]),/* OBJ_md2WithRSAEncryption 1 2 840 113549 1 1 2 */ | ||
| 2053 | &(nid_objs[ 8]),/* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */ | ||
| 2054 | &(nid_objs[65]),/* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */ | ||
| 2055 | &(nid_objs[28]),/* OBJ_dhKeyAgreement 1 2 840 113549 1 3 1 */ | ||
| 2056 | &(nid_objs[ 9]),/* OBJ_pbeWithMD2AndDES_CBC 1 2 840 113549 1 5 1 */ | ||
| 2057 | &(nid_objs[10]),/* OBJ_pbeWithMD5AndDES_CBC 1 2 840 113549 1 5 3 */ | ||
| 2058 | &(nid_objs[168]),/* OBJ_pbeWithMD2AndRC2_CBC 1 2 840 113549 1 5 4 */ | ||
| 2059 | &(nid_objs[169]),/* OBJ_pbeWithMD5AndRC2_CBC 1 2 840 113549 1 5 6 */ | ||
| 2060 | &(nid_objs[170]),/* OBJ_pbeWithSHA1AndDES_CBC 1 2 840 113549 1 5 10 */ | ||
| 2061 | &(nid_objs[68]),/* OBJ_pbeWithSHA1AndRC2_CBC 1 2 840 113549 1 5 11 */ | ||
| 2062 | &(nid_objs[69]),/* OBJ_id_pbkdf2 1 2 840 113549 1 5 12 */ | ||
| 2063 | &(nid_objs[161]),/* OBJ_pbes2 1 2 840 113549 1 5 13 */ | ||
| 2064 | &(nid_objs[162]),/* OBJ_pbmac1 1 2 840 113549 1 5 14 */ | ||
| 2065 | &(nid_objs[21]),/* OBJ_pkcs7_data 1 2 840 113549 1 7 1 */ | ||
| 2066 | &(nid_objs[22]),/* OBJ_pkcs7_signed 1 2 840 113549 1 7 2 */ | ||
| 2067 | &(nid_objs[23]),/* OBJ_pkcs7_enveloped 1 2 840 113549 1 7 3 */ | ||
| 2068 | &(nid_objs[24]),/* OBJ_pkcs7_signedAndEnveloped 1 2 840 113549 1 7 4 */ | ||
| 2069 | &(nid_objs[25]),/* OBJ_pkcs7_digest 1 2 840 113549 1 7 5 */ | ||
| 2070 | &(nid_objs[26]),/* OBJ_pkcs7_encrypted 1 2 840 113549 1 7 6 */ | ||
| 2071 | &(nid_objs[48]),/* OBJ_pkcs9_emailAddress 1 2 840 113549 1 9 1 */ | ||
| 2072 | &(nid_objs[49]),/* OBJ_pkcs9_unstructuredName 1 2 840 113549 1 9 2 */ | ||
| 2073 | &(nid_objs[50]),/* OBJ_pkcs9_contentType 1 2 840 113549 1 9 3 */ | ||
| 2074 | &(nid_objs[51]),/* OBJ_pkcs9_messageDigest 1 2 840 113549 1 9 4 */ | ||
| 2075 | &(nid_objs[52]),/* OBJ_pkcs9_signingTime 1 2 840 113549 1 9 5 */ | ||
| 2076 | &(nid_objs[53]),/* OBJ_pkcs9_countersignature 1 2 840 113549 1 9 6 */ | ||
| 2077 | &(nid_objs[54]),/* OBJ_pkcs9_challengePassword 1 2 840 113549 1 9 7 */ | ||
| 2078 | &(nid_objs[55]),/* OBJ_pkcs9_unstructuredAddress 1 2 840 113549 1 9 8 */ | ||
| 2079 | &(nid_objs[56]),/* OBJ_pkcs9_extCertAttributes 1 2 840 113549 1 9 9 */ | ||
| 2080 | &(nid_objs[172]),/* OBJ_ext_req 1 2 840 113549 1 9 14 */ | ||
| 2081 | &(nid_objs[167]),/* OBJ_SMIMECapabilities 1 2 840 113549 1 9 15 */ | ||
| 2082 | &(nid_objs[188]),/* OBJ_SMIME 1 2 840 113549 1 9 16 */ | ||
| 2083 | &(nid_objs[156]),/* OBJ_friendlyName 1 2 840 113549 1 9 20 */ | ||
| 2084 | &(nid_objs[157]),/* OBJ_localKeyID 1 2 840 113549 1 9 21 */ | ||
| 2085 | &(nid_objs[91]),/* OBJ_bf_cbc 1 3 6 1 4 1 3029 1 2 */ | ||
| 2086 | &(nid_objs[315]),/* OBJ_id_regCtrl_regToken 1 3 6 1 5 5 7 5 1 1 */ | ||
| 2087 | &(nid_objs[316]),/* OBJ_id_regCtrl_authenticator 1 3 6 1 5 5 7 5 1 2 */ | ||
| 2088 | &(nid_objs[317]),/* OBJ_id_regCtrl_pkiPublicationInfo 1 3 6 1 5 5 7 5 1 3 */ | ||
| 2089 | &(nid_objs[318]),/* OBJ_id_regCtrl_pkiArchiveOptions 1 3 6 1 5 5 7 5 1 4 */ | ||
| 2090 | &(nid_objs[319]),/* OBJ_id_regCtrl_oldCertID 1 3 6 1 5 5 7 5 1 5 */ | ||
| 2091 | &(nid_objs[320]),/* OBJ_id_regCtrl_protocolEncrKey 1 3 6 1 5 5 7 5 1 6 */ | ||
| 2092 | &(nid_objs[321]),/* OBJ_id_regInfo_utf8Pairs 1 3 6 1 5 5 7 5 2 1 */ | ||
| 2093 | &(nid_objs[322]),/* OBJ_id_regInfo_certReq 1 3 6 1 5 5 7 5 2 2 */ | ||
| 2094 | &(nid_objs[365]),/* OBJ_id_pkix_OCSP_basic 1 3 6 1 5 5 7 48 1 1 */ | ||
| 2095 | &(nid_objs[366]),/* OBJ_id_pkix_OCSP_Nonce 1 3 6 1 5 5 7 48 1 2 */ | ||
| 2096 | &(nid_objs[367]),/* OBJ_id_pkix_OCSP_CrlID 1 3 6 1 5 5 7 48 1 3 */ | ||
| 2097 | &(nid_objs[368]),/* OBJ_id_pkix_OCSP_acceptableResponses 1 3 6 1 5 5 7 48 1 4 */ | ||
| 2098 | &(nid_objs[369]),/* OBJ_id_pkix_OCSP_noCheck 1 3 6 1 5 5 7 48 1 5 */ | ||
| 2099 | &(nid_objs[370]),/* OBJ_id_pkix_OCSP_archiveCutoff 1 3 6 1 5 5 7 48 1 6 */ | ||
| 2100 | &(nid_objs[371]),/* OBJ_id_pkix_OCSP_serviceLocator 1 3 6 1 5 5 7 48 1 7 */ | ||
| 2101 | &(nid_objs[372]),/* OBJ_id_pkix_OCSP_extendedStatus 1 3 6 1 5 5 7 48 1 8 */ | ||
| 2102 | &(nid_objs[373]),/* OBJ_id_pkix_OCSP_valid 1 3 6 1 5 5 7 48 1 9 */ | ||
| 2103 | &(nid_objs[374]),/* OBJ_id_pkix_OCSP_path 1 3 6 1 5 5 7 48 1 10 */ | ||
| 2104 | &(nid_objs[375]),/* OBJ_id_pkix_OCSP_trustRoot 1 3 6 1 5 5 7 48 1 11 */ | ||
| 2105 | &(nid_objs[71]),/* OBJ_netscape_cert_type 2 16 840 1 113730 1 1 */ | ||
| 2106 | &(nid_objs[72]),/* OBJ_netscape_base_url 2 16 840 1 113730 1 2 */ | ||
| 2107 | &(nid_objs[73]),/* OBJ_netscape_revocation_url 2 16 840 1 113730 1 3 */ | ||
| 2108 | &(nid_objs[74]),/* OBJ_netscape_ca_revocation_url 2 16 840 1 113730 1 4 */ | ||
| 2109 | &(nid_objs[75]),/* OBJ_netscape_renewal_url 2 16 840 1 113730 1 7 */ | ||
| 2110 | &(nid_objs[76]),/* OBJ_netscape_ca_policy_url 2 16 840 1 113730 1 8 */ | ||
| 2111 | &(nid_objs[77]),/* OBJ_netscape_ssl_server_name 2 16 840 1 113730 1 12 */ | ||
| 2112 | &(nid_objs[78]),/* OBJ_netscape_comment 2 16 840 1 113730 1 13 */ | ||
| 2113 | &(nid_objs[79]),/* OBJ_netscape_cert_sequence 2 16 840 1 113730 2 5 */ | ||
| 2114 | &(nid_objs[139]),/* OBJ_ns_sgc 2 16 840 1 113730 4 1 */ | ||
| 2115 | &(nid_objs[391]),/* OBJ_domainComponent 0 9 2342 19200300 100 1 25 */ | ||
| 2116 | &(nid_objs[392]),/* OBJ_Domain 0 9 2342 19200300 100 4 13 */ | ||
| 2117 | &(nid_objs[189]),/* OBJ_id_smime_mod 1 2 840 113549 1 9 16 0 */ | ||
| 2118 | &(nid_objs[190]),/* OBJ_id_smime_ct 1 2 840 113549 1 9 16 1 */ | ||
| 2119 | &(nid_objs[191]),/* OBJ_id_smime_aa 1 2 840 113549 1 9 16 2 */ | ||
| 2120 | &(nid_objs[192]),/* OBJ_id_smime_alg 1 2 840 113549 1 9 16 3 */ | ||
| 2121 | &(nid_objs[193]),/* OBJ_id_smime_cd 1 2 840 113549 1 9 16 4 */ | ||
| 2122 | &(nid_objs[194]),/* OBJ_id_smime_spq 1 2 840 113549 1 9 16 5 */ | ||
| 2123 | &(nid_objs[195]),/* OBJ_id_smime_cti 1 2 840 113549 1 9 16 6 */ | ||
| 2124 | &(nid_objs[158]),/* OBJ_x509Certificate 1 2 840 113549 1 9 22 1 */ | ||
| 2125 | &(nid_objs[159]),/* OBJ_sdsiCertificate 1 2 840 113549 1 9 22 2 */ | ||
| 2126 | &(nid_objs[160]),/* OBJ_x509Crl 1 2 840 113549 1 9 23 1 */ | ||
| 2127 | &(nid_objs[144]),/* OBJ_pbe_WithSHA1And128BitRC4 1 2 840 113549 1 12 1 1 */ | ||
| 2128 | &(nid_objs[145]),/* OBJ_pbe_WithSHA1And40BitRC4 1 2 840 113549 1 12 1 2 */ | ||
| 2129 | &(nid_objs[146]),/* OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC 1 2 840 113549 1 12 1 3 */ | ||
| 2130 | &(nid_objs[147]),/* OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC 1 2 840 113549 1 12 1 4 */ | ||
| 2131 | &(nid_objs[148]),/* OBJ_pbe_WithSHA1And128BitRC2_CBC 1 2 840 113549 1 12 1 5 */ | ||
| 2132 | &(nid_objs[149]),/* OBJ_pbe_WithSHA1And40BitRC2_CBC 1 2 840 113549 1 12 1 6 */ | ||
| 2133 | &(nid_objs[171]),/* OBJ_ms_ext_req 1 3 6 1 4 1 311 2 1 14 */ | ||
| 2134 | &(nid_objs[134]),/* OBJ_ms_code_ind 1 3 6 1 4 1 311 2 1 21 */ | ||
| 2135 | &(nid_objs[135]),/* OBJ_ms_code_com 1 3 6 1 4 1 311 2 1 22 */ | ||
| 2136 | &(nid_objs[136]),/* OBJ_ms_ctl_sign 1 3 6 1 4 1 311 10 3 1 */ | ||
| 2137 | &(nid_objs[137]),/* OBJ_ms_sgc 1 3 6 1 4 1 311 10 3 3 */ | ||
| 2138 | &(nid_objs[138]),/* OBJ_ms_efs 1 3 6 1 4 1 311 10 3 4 */ | ||
| 2139 | &(nid_objs[196]),/* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */ | ||
| 2140 | &(nid_objs[197]),/* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */ | ||
| 2141 | &(nid_objs[198]),/* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */ | ||
| 2142 | &(nid_objs[199]),/* OBJ_id_smime_mod_msg_v3 1 2 840 113549 1 9 16 0 4 */ | ||
| 2143 | &(nid_objs[200]),/* OBJ_id_smime_mod_ets_eSignature_88 1 2 840 113549 1 9 16 0 5 */ | ||
| 2144 | &(nid_objs[201]),/* OBJ_id_smime_mod_ets_eSignature_97 1 2 840 113549 1 9 16 0 6 */ | ||
| 2145 | &(nid_objs[202]),/* OBJ_id_smime_mod_ets_eSigPolicy_88 1 2 840 113549 1 9 16 0 7 */ | ||
| 2146 | &(nid_objs[203]),/* OBJ_id_smime_mod_ets_eSigPolicy_97 1 2 840 113549 1 9 16 0 8 */ | ||
| 2147 | &(nid_objs[204]),/* OBJ_id_smime_ct_receipt 1 2 840 113549 1 9 16 1 1 */ | ||
| 2148 | &(nid_objs[205]),/* OBJ_id_smime_ct_authData 1 2 840 113549 1 9 16 1 2 */ | ||
| 2149 | &(nid_objs[206]),/* OBJ_id_smime_ct_publishCert 1 2 840 113549 1 9 16 1 3 */ | ||
| 2150 | &(nid_objs[207]),/* OBJ_id_smime_ct_TSTInfo 1 2 840 113549 1 9 16 1 4 */ | ||
| 2151 | &(nid_objs[208]),/* OBJ_id_smime_ct_TDTInfo 1 2 840 113549 1 9 16 1 5 */ | ||
| 2152 | &(nid_objs[209]),/* OBJ_id_smime_ct_contentInfo 1 2 840 113549 1 9 16 1 6 */ | ||
| 2153 | &(nid_objs[210]),/* OBJ_id_smime_ct_DVCSRequestData 1 2 840 113549 1 9 16 1 7 */ | ||
| 2154 | &(nid_objs[211]),/* OBJ_id_smime_ct_DVCSResponseData 1 2 840 113549 1 9 16 1 8 */ | ||
| 2155 | &(nid_objs[212]),/* OBJ_id_smime_aa_receiptRequest 1 2 840 113549 1 9 16 2 1 */ | ||
| 2156 | &(nid_objs[213]),/* OBJ_id_smime_aa_securityLabel 1 2 840 113549 1 9 16 2 2 */ | ||
| 2157 | &(nid_objs[214]),/* OBJ_id_smime_aa_mlExpandHistory 1 2 840 113549 1 9 16 2 3 */ | ||
| 2158 | &(nid_objs[215]),/* OBJ_id_smime_aa_contentHint 1 2 840 113549 1 9 16 2 4 */ | ||
| 2159 | &(nid_objs[216]),/* OBJ_id_smime_aa_msgSigDigest 1 2 840 113549 1 9 16 2 5 */ | ||
| 2160 | &(nid_objs[217]),/* OBJ_id_smime_aa_encapContentType 1 2 840 113549 1 9 16 2 6 */ | ||
| 2161 | &(nid_objs[218]),/* OBJ_id_smime_aa_contentIdentifier 1 2 840 113549 1 9 16 2 7 */ | ||
| 2162 | &(nid_objs[219]),/* OBJ_id_smime_aa_macValue 1 2 840 113549 1 9 16 2 8 */ | ||
| 2163 | &(nid_objs[220]),/* OBJ_id_smime_aa_equivalentLabels 1 2 840 113549 1 9 16 2 9 */ | ||
| 2164 | &(nid_objs[221]),/* OBJ_id_smime_aa_contentReference 1 2 840 113549 1 9 16 2 10 */ | ||
| 2165 | &(nid_objs[222]),/* OBJ_id_smime_aa_encrypKeyPref 1 2 840 113549 1 9 16 2 11 */ | ||
| 2166 | &(nid_objs[223]),/* OBJ_id_smime_aa_signingCertificate 1 2 840 113549 1 9 16 2 12 */ | ||
| 2167 | &(nid_objs[224]),/* OBJ_id_smime_aa_smimeEncryptCerts 1 2 840 113549 1 9 16 2 13 */ | ||
| 2168 | &(nid_objs[225]),/* OBJ_id_smime_aa_timeStampToken 1 2 840 113549 1 9 16 2 14 */ | ||
| 2169 | &(nid_objs[226]),/* OBJ_id_smime_aa_ets_sigPolicyId 1 2 840 113549 1 9 16 2 15 */ | ||
| 2170 | &(nid_objs[227]),/* OBJ_id_smime_aa_ets_commitmentType 1 2 840 113549 1 9 16 2 16 */ | ||
| 2171 | &(nid_objs[228]),/* OBJ_id_smime_aa_ets_signerLocation 1 2 840 113549 1 9 16 2 17 */ | ||
| 2172 | &(nid_objs[229]),/* OBJ_id_smime_aa_ets_signerAttr 1 2 840 113549 1 9 16 2 18 */ | ||
| 2173 | &(nid_objs[230]),/* OBJ_id_smime_aa_ets_otherSigCert 1 2 840 113549 1 9 16 2 19 */ | ||
| 2174 | &(nid_objs[231]),/* OBJ_id_smime_aa_ets_contentTimestamp 1 2 840 113549 1 9 16 2 20 */ | ||
| 2175 | &(nid_objs[232]),/* OBJ_id_smime_aa_ets_CertificateRefs 1 2 840 113549 1 9 16 2 21 */ | ||
| 2176 | &(nid_objs[233]),/* OBJ_id_smime_aa_ets_RevocationRefs 1 2 840 113549 1 9 16 2 22 */ | ||
| 2177 | &(nid_objs[234]),/* OBJ_id_smime_aa_ets_certValues 1 2 840 113549 1 9 16 2 23 */ | ||
| 2178 | &(nid_objs[235]),/* OBJ_id_smime_aa_ets_revocationValues 1 2 840 113549 1 9 16 2 24 */ | ||
| 2179 | &(nid_objs[236]),/* OBJ_id_smime_aa_ets_escTimeStamp 1 2 840 113549 1 9 16 2 25 */ | ||
| 2180 | &(nid_objs[237]),/* OBJ_id_smime_aa_ets_certCRLTimestamp 1 2 840 113549 1 9 16 2 26 */ | ||
| 2181 | &(nid_objs[238]),/* OBJ_id_smime_aa_ets_archiveTimeStamp 1 2 840 113549 1 9 16 2 27 */ | ||
| 2182 | &(nid_objs[239]),/* OBJ_id_smime_aa_signatureType 1 2 840 113549 1 9 16 2 28 */ | ||
| 2183 | &(nid_objs[240]),/* OBJ_id_smime_aa_dvcs_dvc 1 2 840 113549 1 9 16 2 29 */ | ||
| 2184 | &(nid_objs[241]),/* OBJ_id_smime_alg_ESDHwith3DES 1 2 840 113549 1 9 16 3 1 */ | ||
| 2185 | &(nid_objs[242]),/* OBJ_id_smime_alg_ESDHwithRC2 1 2 840 113549 1 9 16 3 2 */ | ||
| 2186 | &(nid_objs[243]),/* OBJ_id_smime_alg_3DESwrap 1 2 840 113549 1 9 16 3 3 */ | ||
| 2187 | &(nid_objs[244]),/* OBJ_id_smime_alg_RC2wrap 1 2 840 113549 1 9 16 3 4 */ | ||
| 2188 | &(nid_objs[245]),/* OBJ_id_smime_alg_ESDH 1 2 840 113549 1 9 16 3 5 */ | ||
| 2189 | &(nid_objs[246]),/* OBJ_id_smime_alg_CMS3DESwrap 1 2 840 113549 1 9 16 3 6 */ | ||
| 2190 | &(nid_objs[247]),/* OBJ_id_smime_alg_CMSRC2wrap 1 2 840 113549 1 9 16 3 7 */ | ||
| 2191 | &(nid_objs[248]),/* OBJ_id_smime_cd_ldap 1 2 840 113549 1 9 16 4 1 */ | ||
| 2192 | &(nid_objs[249]),/* OBJ_id_smime_spq_ets_sqt_uri 1 2 840 113549 1 9 16 5 1 */ | ||
| 2193 | &(nid_objs[250]),/* OBJ_id_smime_spq_ets_sqt_unotice 1 2 840 113549 1 9 16 5 2 */ | ||
| 2194 | &(nid_objs[251]),/* OBJ_id_smime_cti_ets_proofOfOrigin 1 2 840 113549 1 9 16 6 1 */ | ||
| 2195 | &(nid_objs[252]),/* OBJ_id_smime_cti_ets_proofOfReceipt 1 2 840 113549 1 9 16 6 2 */ | ||
| 2196 | &(nid_objs[253]),/* OBJ_id_smime_cti_ets_proofOfDelivery 1 2 840 113549 1 9 16 6 3 */ | ||
| 2197 | &(nid_objs[254]),/* OBJ_id_smime_cti_ets_proofOfSender 1 2 840 113549 1 9 16 6 4 */ | ||
| 2198 | &(nid_objs[255]),/* OBJ_id_smime_cti_ets_proofOfApproval 1 2 840 113549 1 9 16 6 5 */ | ||
| 2199 | &(nid_objs[256]),/* OBJ_id_smime_cti_ets_proofOfCreation 1 2 840 113549 1 9 16 6 6 */ | ||
| 2200 | &(nid_objs[150]),/* OBJ_keyBag 1 2 840 113549 1 12 10 1 1 */ | ||
| 2201 | &(nid_objs[151]),/* OBJ_pkcs8ShroudedKeyBag 1 2 840 113549 1 12 10 1 2 */ | ||
| 2202 | &(nid_objs[152]),/* OBJ_certBag 1 2 840 113549 1 12 10 1 3 */ | ||
| 2203 | &(nid_objs[153]),/* OBJ_crlBag 1 2 840 113549 1 12 10 1 4 */ | ||
| 2204 | &(nid_objs[154]),/* OBJ_secretBag 1 2 840 113549 1 12 10 1 5 */ | ||
| 2205 | &(nid_objs[155]),/* OBJ_safeContentsBag 1 2 840 113549 1 12 10 1 6 */ | ||
| 2206 | &(nid_objs[34]),/* OBJ_idea_cbc 1 3 6 1 4 1 188 7 1 1 2 */ | ||
| 2207 | }; | ||
| 2208 | |||
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_bags.c b/src/lib/libssl/src/crypto/pkcs12/p12_bags.c deleted file mode 100644 index 56547ef933..0000000000 --- a/src/lib/libssl/src/crypto/pkcs12/p12_bags.c +++ /dev/null | |||
| @@ -1,192 +0,0 @@ | |||
| 1 | /* p12_bags.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12_BAGS(PKCS12_BAGS *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | int bagnid, v = 0; | ||
| 67 | M_ASN1_I2D_vars(a); | ||
| 68 | bagnid = OBJ_obj2nid (a->type); | ||
| 69 | M_ASN1_I2D_len (a->type, i2d_ASN1_OBJECT); | ||
| 70 | |||
| 71 | switch (bagnid) { | ||
| 72 | |||
| 73 | case NID_x509Certificate: | ||
| 74 | M_ASN1_I2D_len_EXP_opt (a->value.x509cert, | ||
| 75 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 76 | break; | ||
| 77 | |||
| 78 | case NID_x509Crl: | ||
| 79 | M_ASN1_I2D_len_EXP_opt (a->value.x509crl, | ||
| 80 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 81 | break; | ||
| 82 | |||
| 83 | case NID_sdsiCertificate: | ||
| 84 | M_ASN1_I2D_len_EXP_opt (a->value.sdsicert, | ||
| 85 | i2d_ASN1_IA5STRING, 0, v); | ||
| 86 | break; | ||
| 87 | |||
| 88 | default: | ||
| 89 | M_ASN1_I2D_len_EXP_opt (a->value.other, | ||
| 90 | i2d_ASN1_TYPE, 0, v); | ||
| 91 | break; | ||
| 92 | } | ||
| 93 | |||
| 94 | M_ASN1_I2D_seq_total (); | ||
| 95 | |||
| 96 | M_ASN1_I2D_put (a->type, i2d_ASN1_OBJECT); | ||
| 97 | |||
| 98 | switch (bagnid) { | ||
| 99 | |||
| 100 | case NID_x509Certificate: | ||
| 101 | M_ASN1_I2D_put_EXP_opt (a->value.x509cert, | ||
| 102 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 103 | break; | ||
| 104 | |||
| 105 | case NID_x509Crl: | ||
| 106 | M_ASN1_I2D_put_EXP_opt (a->value.x509crl, | ||
| 107 | i2d_ASN1_OCTET_STRING, 0, v); | ||
| 108 | break; | ||
| 109 | |||
| 110 | case NID_sdsiCertificate: | ||
| 111 | M_ASN1_I2D_put_EXP_opt (a->value.sdsicert, | ||
| 112 | i2d_ASN1_IA5STRING, 0, v); | ||
| 113 | break; | ||
| 114 | |||
| 115 | default: | ||
| 116 | M_ASN1_I2D_put_EXP_opt (a->value.other, i2d_ASN1_TYPE, 0, v); | ||
| 117 | break; | ||
| 118 | } | ||
| 119 | M_ASN1_I2D_finish(); | ||
| 120 | } | ||
| 121 | |||
| 122 | PKCS12_BAGS *PKCS12_BAGS_new(void) | ||
| 123 | { | ||
| 124 | PKCS12_BAGS *ret=NULL; | ||
| 125 | ASN1_CTX c; | ||
| 126 | M_ASN1_New_Malloc(ret, PKCS12_BAGS); | ||
| 127 | ret->type=NULL; | ||
| 128 | ret->value.other=NULL; | ||
| 129 | return (ret); | ||
| 130 | M_ASN1_New_Error(ASN1_F_PKCS12_BAGS_NEW); | ||
| 131 | } | ||
| 132 | |||
| 133 | PKCS12_BAGS *d2i_PKCS12_BAGS(PKCS12_BAGS **a, unsigned char **pp, | ||
| 134 | long length) | ||
| 135 | { | ||
| 136 | int bagnid; | ||
| 137 | M_ASN1_D2I_vars(a,PKCS12_BAGS *,PKCS12_BAGS_new); | ||
| 138 | M_ASN1_D2I_Init(); | ||
| 139 | M_ASN1_D2I_start_sequence(); | ||
| 140 | M_ASN1_D2I_get (ret->type, d2i_ASN1_OBJECT); | ||
| 141 | bagnid = OBJ_obj2nid (ret->type); | ||
| 142 | switch (bagnid) { | ||
| 143 | |||
| 144 | case NID_x509Certificate: | ||
| 145 | M_ASN1_D2I_get_EXP_opt (ret->value.x509cert, | ||
| 146 | d2i_ASN1_OCTET_STRING, 0); | ||
| 147 | break; | ||
| 148 | |||
| 149 | case NID_x509Crl: | ||
| 150 | M_ASN1_D2I_get_EXP_opt (ret->value.x509crl, | ||
| 151 | d2i_ASN1_OCTET_STRING, 0); | ||
| 152 | break; | ||
| 153 | |||
| 154 | case NID_sdsiCertificate: | ||
| 155 | M_ASN1_D2I_get_EXP_opt (ret->value.sdsicert, | ||
| 156 | d2i_ASN1_IA5STRING, 0); | ||
| 157 | break; | ||
| 158 | |||
| 159 | default: | ||
| 160 | M_ASN1_D2I_get_EXP_opt (ret->value.other, | ||
| 161 | d2i_ASN1_TYPE, 0); | ||
| 162 | break; | ||
| 163 | } | ||
| 164 | |||
| 165 | M_ASN1_D2I_Finish(a, PKCS12_BAGS_free, ASN1_F_D2I_PKCS12_BAGS); | ||
| 166 | } | ||
| 167 | |||
| 168 | void PKCS12_BAGS_free (PKCS12_BAGS *a) | ||
| 169 | { | ||
| 170 | if (a == NULL) return; | ||
| 171 | switch (OBJ_obj2nid(a->type)) { | ||
| 172 | |||
| 173 | case NID_x509Certificate: | ||
| 174 | M_ASN1_OCTET_STRING_free (a->value.x509cert); | ||
| 175 | break; | ||
| 176 | |||
| 177 | case NID_x509Crl: | ||
| 178 | M_ASN1_OCTET_STRING_free (a->value.x509crl); | ||
| 179 | break; | ||
| 180 | |||
| 181 | case NID_sdsiCertificate: | ||
| 182 | M_ASN1_IA5STRING_free (a->value.sdsicert); | ||
| 183 | break; | ||
| 184 | |||
| 185 | default: | ||
| 186 | ASN1_TYPE_free (a->value.other); | ||
| 187 | break; | ||
| 188 | } | ||
| 189 | |||
| 190 | ASN1_OBJECT_free (a->type); | ||
| 191 | OPENSSL_free (a); | ||
| 192 | } | ||
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_lib.c b/src/lib/libssl/src/crypto/pkcs12/p12_lib.c deleted file mode 100644 index 7d464e3a32..0000000000 --- a/src/lib/libssl/src/crypto/pkcs12/p12_lib.c +++ /dev/null | |||
| @@ -1,111 +0,0 @@ | |||
| 1 | /* p12_lib.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12(PKCS12 *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | |||
| 68 | M_ASN1_I2D_len (a->version, i2d_ASN1_INTEGER); | ||
| 69 | M_ASN1_I2D_len (a->authsafes, i2d_PKCS7); | ||
| 70 | M_ASN1_I2D_len (a->mac, i2d_PKCS12_MAC_DATA); | ||
| 71 | |||
| 72 | M_ASN1_I2D_seq_total(); | ||
| 73 | |||
| 74 | M_ASN1_I2D_put (a->version, i2d_ASN1_INTEGER); | ||
| 75 | M_ASN1_I2D_put (a->authsafes, i2d_PKCS7); | ||
| 76 | M_ASN1_I2D_put (a->mac, i2d_PKCS12_MAC_DATA); | ||
| 77 | |||
| 78 | M_ASN1_I2D_finish(); | ||
| 79 | } | ||
| 80 | |||
| 81 | PKCS12 *d2i_PKCS12(PKCS12 **a, unsigned char **pp, long length) | ||
| 82 | { | ||
| 83 | M_ASN1_D2I_vars(a,PKCS12 *,PKCS12_new); | ||
| 84 | M_ASN1_D2I_Init(); | ||
| 85 | M_ASN1_D2I_start_sequence(); | ||
| 86 | M_ASN1_D2I_get (ret->version, d2i_ASN1_INTEGER); | ||
| 87 | M_ASN1_D2I_get (ret->authsafes, d2i_PKCS7); | ||
| 88 | M_ASN1_D2I_get_opt (ret->mac, d2i_PKCS12_MAC_DATA, V_ASN1_SEQUENCE); | ||
| 89 | M_ASN1_D2I_Finish(a, PKCS12_free, ASN1_F_D2I_PKCS12); | ||
| 90 | } | ||
| 91 | |||
| 92 | PKCS12 *PKCS12_new(void) | ||
| 93 | { | ||
| 94 | PKCS12 *ret=NULL; | ||
| 95 | ASN1_CTX c; | ||
| 96 | M_ASN1_New_Malloc(ret, PKCS12); | ||
| 97 | ret->version=NULL; | ||
| 98 | ret->mac=NULL; | ||
| 99 | ret->authsafes=NULL; | ||
| 100 | return (ret); | ||
| 101 | M_ASN1_New_Error(ASN1_F_PKCS12_NEW); | ||
| 102 | } | ||
| 103 | |||
| 104 | void PKCS12_free (PKCS12 *a) | ||
| 105 | { | ||
| 106 | if (a == NULL) return; | ||
| 107 | M_ASN1_INTEGER_free(a->version); | ||
| 108 | PKCS12_MAC_DATA_free (a->mac); | ||
| 109 | PKCS7_free (a->authsafes); | ||
| 110 | OPENSSL_free (a); | ||
| 111 | } | ||
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_mac.c b/src/lib/libssl/src/crypto/pkcs12/p12_mac.c deleted file mode 100644 index fbd1eca24f..0000000000 --- a/src/lib/libssl/src/crypto/pkcs12/p12_mac.c +++ /dev/null | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | /* p12_mac.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12_MAC_DATA(PKCS12_MAC_DATA *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | M_ASN1_I2D_vars(a); | ||
| 67 | M_ASN1_I2D_len (a->dinfo, i2d_X509_SIG); | ||
| 68 | M_ASN1_I2D_len (a->salt, i2d_ASN1_OCTET_STRING); | ||
| 69 | M_ASN1_I2D_len (a->iter, i2d_ASN1_INTEGER); | ||
| 70 | |||
| 71 | M_ASN1_I2D_seq_total(); | ||
| 72 | |||
| 73 | M_ASN1_I2D_put (a->dinfo, i2d_X509_SIG); | ||
| 74 | M_ASN1_I2D_put (a->salt, i2d_ASN1_OCTET_STRING); | ||
| 75 | M_ASN1_I2D_put (a->iter, i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_finish(); | ||
| 77 | } | ||
| 78 | |||
| 79 | PKCS12_MAC_DATA *PKCS12_MAC_DATA_new(void) | ||
| 80 | { | ||
| 81 | PKCS12_MAC_DATA *ret=NULL; | ||
| 82 | ASN1_CTX c; | ||
| 83 | M_ASN1_New_Malloc(ret, PKCS12_MAC_DATA); | ||
| 84 | ret->dinfo = X509_SIG_new(); | ||
| 85 | ret->salt = M_ASN1_OCTET_STRING_new(); | ||
| 86 | ret->iter = NULL; | ||
| 87 | return(ret); | ||
| 88 | M_ASN1_New_Error(ASN1_F_PKCS12_MAC_DATA_NEW); | ||
| 89 | } | ||
| 90 | |||
| 91 | PKCS12_MAC_DATA *d2i_PKCS12_MAC_DATA(PKCS12_MAC_DATA **a, unsigned char **pp, | ||
| 92 | long length) | ||
| 93 | { | ||
| 94 | M_ASN1_D2I_vars(a,PKCS12_MAC_DATA *,PKCS12_MAC_DATA_new); | ||
| 95 | M_ASN1_D2I_Init(); | ||
| 96 | M_ASN1_D2I_start_sequence(); | ||
| 97 | M_ASN1_D2I_get(ret->dinfo, d2i_X509_SIG); | ||
| 98 | M_ASN1_D2I_get(ret->salt, d2i_ASN1_OCTET_STRING); | ||
| 99 | M_ASN1_D2I_get_opt(ret->iter, d2i_ASN1_INTEGER, V_ASN1_INTEGER); | ||
| 100 | M_ASN1_D2I_Finish(a, PKCS12_MAC_DATA_free, ASN1_F_D2I_PKCS12_MAC_DATA); | ||
| 101 | } | ||
| 102 | |||
| 103 | void PKCS12_MAC_DATA_free (PKCS12_MAC_DATA *a) | ||
| 104 | { | ||
| 105 | if (a == NULL) return; | ||
| 106 | X509_SIG_free (a->dinfo); | ||
| 107 | M_ASN1_OCTET_STRING_free(a->salt); | ||
| 108 | M_ASN1_INTEGER_free(a->iter); | ||
| 109 | OPENSSL_free (a); | ||
| 110 | } | ||
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_sbag.c b/src/lib/libssl/src/crypto/pkcs12/p12_sbag.c deleted file mode 100644 index 64ac32ee6f..0000000000 --- a/src/lib/libssl/src/crypto/pkcs12/p12_sbag.c +++ /dev/null | |||
| @@ -1,234 +0,0 @@ | |||
| 1 | /* p12_sbag.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 1999. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
| 7 | * | ||
| 8 | * Redistribution and use in source and binary forms, with or without | ||
| 9 | * modification, are permitted provided that the following conditions | ||
| 10 | * are met: | ||
| 11 | * | ||
| 12 | * 1. Redistributions of source code must retain the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer. | ||
| 14 | * | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in | ||
| 17 | * the documentation and/or other materials provided with the | ||
| 18 | * distribution. | ||
| 19 | * | ||
| 20 | * 3. All advertising materials mentioning features or use of this | ||
| 21 | * software must display the following acknowledgment: | ||
| 22 | * "This product includes software developed by the OpenSSL Project | ||
| 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 24 | * | ||
| 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 26 | * endorse or promote products derived from this software without | ||
| 27 | * prior written permission. For written permission, please contact | ||
| 28 | * licensing@OpenSSL.org. | ||
| 29 | * | ||
| 30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 31 | * nor may "OpenSSL" appear in their names without prior written | ||
| 32 | * permission of the OpenSSL Project. | ||
| 33 | * | ||
| 34 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 35 | * acknowledgment: | ||
| 36 | * "This product includes software developed by the OpenSSL Project | ||
| 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 38 | * | ||
| 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 51 | * ==================================================================== | ||
| 52 | * | ||
| 53 | * This product includes cryptographic software written by Eric Young | ||
| 54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 55 | * Hudson (tjh@cryptsoft.com). | ||
| 56 | * | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include <openssl/asn1_mac.h> | ||
| 62 | #include <openssl/pkcs12.h> | ||
| 63 | |||
| 64 | int i2d_PKCS12_SAFEBAG(PKCS12_SAFEBAG *a, unsigned char **pp) | ||
| 65 | { | ||
| 66 | int bagnid, v = 0; | ||
| 67 | M_ASN1_I2D_vars(a); | ||
| 68 | bagnid = OBJ_obj2nid (a->type); | ||
| 69 | M_ASN1_I2D_len (a->type, i2d_ASN1_OBJECT); | ||
| 70 | |||
| 71 | switch (bagnid) { | ||
| 72 | |||
| 73 | case NID_keyBag: | ||
| 74 | M_ASN1_I2D_len_EXP_opt (a->value.keybag, | ||
| 75 | i2d_PKCS8_PRIV_KEY_INFO, 0, v); | ||
| 76 | break; | ||
| 77 | |||
| 78 | case NID_pkcs8ShroudedKeyBag: | ||
| 79 | M_ASN1_I2D_len_EXP_opt (a->value.shkeybag, | ||
| 80 | i2d_X509_SIG, 0, v); | ||
| 81 | break; | ||
| 82 | |||
| 83 | case NID_safeContentsBag: | ||
| 84 | M_ASN1_I2D_len_EXP_SEQUENCE_opt_type | ||
| 85 | (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, | ||
| 86 | 0, V_ASN1_SEQUENCE, v); | ||
| 87 | break; | ||
| 88 | |||
| 89 | case NID_certBag: | ||
| 90 | case NID_crlBag: | ||
| 91 | case NID_secretBag: | ||
| 92 | M_ASN1_I2D_len_EXP_opt (a->value.bag, | ||
| 93 | i2d_PKCS12_BAGS, 0, v); | ||
| 94 | break; | ||
| 95 | |||
| 96 | default: | ||
| 97 | M_ASN1_I2D_len_EXP_opt (a->value.other, | ||
| 98 | i2d_ASN1_TYPE, 0, v); | ||
| 99 | break; | ||
| 100 | } | ||
| 101 | |||
| 102 | M_ASN1_I2D_len_SET_type (X509_ATTRIBUTE,a->attrib, i2d_X509_ATTRIBUTE); | ||
| 103 | |||
| 104 | M_ASN1_I2D_seq_total (); | ||
| 105 | |||
| 106 | M_ASN1_I2D_put (a->type, i2d_ASN1_OBJECT); | ||
| 107 | |||
| 108 | switch (bagnid) { | ||
| 109 | |||
| 110 | case NID_keyBag: | ||
| 111 | M_ASN1_I2D_put_EXP_opt (a->value.keybag, | ||
| 112 | i2d_PKCS8_PRIV_KEY_INFO, 0, v); | ||
| 113 | break; | ||
| 114 | |||
| 115 | case NID_pkcs8ShroudedKeyBag: | ||
| 116 | M_ASN1_I2D_put_EXP_opt (a->value.shkeybag, | ||
| 117 | i2d_X509_SIG, 0, v); | ||
| 118 | break; | ||
| 119 | |||
| 120 | case NID_safeContentsBag: | ||
| 121 | M_ASN1_I2D_put_EXP_SEQUENCE_opt_type | ||
| 122 | (PKCS12_SAFEBAG, a->value.safes, i2d_PKCS12_SAFEBAG, | ||
| 123 | 0, V_ASN1_SEQUENCE, v); | ||
| 124 | break; | ||
| 125 | |||
| 126 | case NID_certBag: | ||
| 127 | case NID_crlBag: | ||
| 128 | case NID_secretBag: | ||
| 129 | M_ASN1_I2D_put_EXP_opt (a->value.bag, | ||
| 130 | i2d_PKCS12_BAGS, 0, v); | ||
| 131 | break; | ||
| 132 | |||
| 133 | default: | ||
| 134 | M_ASN1_I2D_put_EXP_opt (a->value.other, | ||
| 135 | i2d_ASN1_TYPE, 0, v); | ||
| 136 | break; | ||
| 137 | } | ||
| 138 | |||
| 139 | M_ASN1_I2D_put_SET_type (X509_ATTRIBUTE, a->attrib, i2d_X509_ATTRIBUTE); | ||
| 140 | |||
| 141 | M_ASN1_I2D_finish(); | ||
| 142 | } | ||
| 143 | |||
| 144 | PKCS12_SAFEBAG *PKCS12_SAFEBAG_new(void) | ||
| 145 | { | ||
| 146 | PKCS12_SAFEBAG *ret=NULL; | ||
| 147 | ASN1_CTX c; | ||
| 148 | M_ASN1_New_Malloc(ret, PKCS12_SAFEBAG); | ||
| 149 | ret->type=NULL; | ||
| 150 | ret->value.other=NULL; | ||
| 151 | M_ASN1_New(ret->attrib, sk_X509_ATTRIBUTE_new_null); | ||
| 152 | ret->rest=NULL; | ||
| 153 | return (ret); | ||
| 154 | M_ASN1_New_Error(ASN1_F_PKCS12_SAFEBAG_NEW); | ||
| 155 | } | ||
| 156 | |||
| 157 | PKCS12_SAFEBAG *d2i_PKCS12_SAFEBAG(PKCS12_SAFEBAG **a, unsigned char **pp, | ||
| 158 | long length) | ||
| 159 | { | ||
| 160 | int bagnid; | ||
| 161 | M_ASN1_D2I_vars(a,PKCS12_SAFEBAG *,PKCS12_SAFEBAG_new); | ||
| 162 | M_ASN1_D2I_Init(); | ||
| 163 | M_ASN1_D2I_start_sequence(); | ||
| 164 | M_ASN1_D2I_get (ret->type, d2i_ASN1_OBJECT); | ||
| 165 | bagnid = OBJ_obj2nid (ret->type); | ||
| 166 | |||
| 167 | switch (bagnid) { | ||
| 168 | |||
| 169 | case NID_keyBag: | ||
| 170 | M_ASN1_D2I_get_EXP_opt (ret->value.keybag, | ||
| 171 | d2i_PKCS8_PRIV_KEY_INFO, 0); | ||
| 172 | break; | ||
| 173 | |||
| 174 | case NID_pkcs8ShroudedKeyBag: | ||
| 175 | M_ASN1_D2I_get_EXP_opt (ret->value.shkeybag, | ||
| 176 | d2i_X509_SIG, 0); | ||
| 177 | break; | ||
| 178 | |||
| 179 | case NID_safeContentsBag: | ||
| 180 | M_ASN1_D2I_get_EXP_set_opt_type | ||
| 181 | (PKCS12_SAFEBAG, ret->value.safes, | ||
| 182 | d2i_PKCS12_SAFEBAG, PKCS12_SAFEBAG_free, 0, | ||
| 183 | V_ASN1_SEQUENCE); | ||
| 184 | break; | ||
| 185 | |||
| 186 | case NID_certBag: | ||
| 187 | case NID_crlBag: | ||
| 188 | case NID_secretBag: | ||
| 189 | M_ASN1_D2I_get_EXP_opt (ret->value.bag, | ||
| 190 | d2i_PKCS12_BAGS, 0); | ||
| 191 | break; | ||
| 192 | |||
| 193 | default: | ||
| 194 | M_ASN1_D2I_get_EXP_opt (ret->value.other, | ||
| 195 | d2i_ASN1_TYPE, 0); | ||
| 196 | break; | ||
| 197 | } | ||
| 198 | M_ASN1_D2I_get_set_opt_type(X509_ATTRIBUTE,ret->attrib, | ||
| 199 | d2i_X509_ATTRIBUTE,X509_ATTRIBUTE_free); | ||
| 200 | M_ASN1_D2I_Finish(a, PKCS12_SAFEBAG_free, ASN1_F_D2I_PKCS12_SAFEBAG); | ||
| 201 | } | ||
| 202 | |||
| 203 | void PKCS12_SAFEBAG_free (PKCS12_SAFEBAG *a) | ||
| 204 | { | ||
| 205 | if (a == NULL) return; | ||
| 206 | switch (OBJ_obj2nid(a->type)) { | ||
| 207 | |||
| 208 | case NID_keyBag: | ||
| 209 | PKCS8_PRIV_KEY_INFO_free (a->value.keybag); | ||
| 210 | break; | ||
| 211 | |||
| 212 | case NID_pkcs8ShroudedKeyBag: | ||
| 213 | X509_SIG_free (a->value.shkeybag); | ||
| 214 | break; | ||
| 215 | |||
| 216 | case NID_certBag: | ||
| 217 | case NID_crlBag: | ||
| 218 | case NID_secretBag: | ||
| 219 | PKCS12_BAGS_free (a->value.bag); | ||
| 220 | break; | ||
| 221 | |||
| 222 | default: | ||
| 223 | ASN1_TYPE_free (a->value.other); | ||
| 224 | break; | ||
| 225 | } | ||
| 226 | |||
| 227 | ASN1_OBJECT_free (a->type); | ||
| 228 | sk_X509_ATTRIBUTE_pop_free (a->attrib, X509_ATTRIBUTE_free); | ||
| 229 | OPENSSL_free (a); | ||
| 230 | } | ||
| 231 | |||
| 232 | IMPLEMENT_STACK_OF(PKCS12_SAFEBAG) | ||
| 233 | IMPLEMENT_ASN1_SET_OF(PKCS12_SAFEBAG) | ||
| 234 | IMPLEMENT_PKCS12_STACK_OF(PKCS12_SAFEBAG) | ||
diff --git a/src/lib/libssl/src/crypto/rand/md_rand_munged.c b/src/lib/libssl/src/crypto/rand/md_rand_munged.c deleted file mode 100644 index 1611bf335b..0000000000 --- a/src/lib/libssl/src/crypto/rand/md_rand_munged.c +++ /dev/null | |||
| @@ -1,515 +0,0 @@ | |||
| 1 | /* crypto/rand/md_rand.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include <sys/types.h> | ||
| 61 | #include <fcntl.h> | ||
| 62 | #include <time.h> | ||
| 63 | #include <string.h> | ||
| 64 | |||
| 65 | #include "openssl/e_os.h" | ||
| 66 | |||
| 67 | #include <openssl/crypto.h> | ||
| 68 | |||
| 69 | #if !defined(USE_MD5_RAND) && !defined(USE_SHA1_RAND) && !defined(USE_MDC2_RAND) && !defined(USE_MD2_RAND) | ||
| 70 | #if !defined(NO_SHA) && !defined(NO_SHA1) | ||
| 71 | #define USE_SHA1_RAND | ||
| 72 | #elif !defined(NO_MD5) | ||
| 73 | #define USE_MD5_RAND | ||
| 74 | #elif !defined(NO_MDC2) && !defined(NO_DES) | ||
| 75 | #define USE_MDC2_RAND | ||
| 76 | #elif !defined(NO_MD2) | ||
| 77 | #define USE_MD2_RAND | ||
| 78 | #else | ||
| 79 | #error No message digest algorithm available | ||
| 80 | #endif | ||
| 81 | #endif | ||
| 82 | |||
| 83 | /* Changed how the state buffer used. I now attempt to 'wrap' such | ||
| 84 | * that I don't run over the same locations the next time go through | ||
| 85 | * the 1023 bytes - many thanks to | ||
| 86 | * Robert J. LeBlanc <rjl@renaissoft.com> for his comments | ||
| 87 | */ | ||
| 88 | |||
| 89 | #if defined(USE_MD5_RAND) | ||
| 90 | #include <openssl/md5.h> | ||
| 91 | #define MD_DIGEST_LENGTH MD5_DIGEST_LENGTH | ||
| 92 | #define MD_CTX MD5_CTX | ||
| 93 | #define MD_Init(a) MD5_Init(a) | ||
| 94 | #define MD_Update(a,b,c) MD5_Update(a,b,c) | ||
| 95 | #define MD_Final(a,b) MD5_Final(a,b) | ||
| 96 | #define MD(a,b,c) MD5(a,b,c) | ||
| 97 | #elif defined(USE_SHA1_RAND) | ||
| 98 | #include <openssl/sha.h> | ||
| 99 | #define MD_DIGEST_LENGTH SHA_DIGEST_LENGTH | ||
| 100 | #define MD_CTX SHA_CTX | ||
| 101 | #define MD_Init(a) SHA1_Init(a) | ||
| 102 | #define MD_Update(a,b,c) SHA1_Update(a,b,c) | ||
| 103 | #define MD_Final(a,b) SHA1_Final(a,b) | ||
| 104 | #define MD(a,b,c) SHA1(a,b,c) | ||
| 105 | #elif defined(USE_MDC2_RAND) | ||
| 106 | #include <openssl/mdc2.h> | ||
| 107 | #define MD_DIGEST_LENGTH MDC2_DIGEST_LENGTH | ||
| 108 | #define MD_CTX MDC2_CTX | ||
| 109 | #define MD_Init(a) MDC2_Init(a) | ||
| 110 | #define MD_Update(a,b,c) MDC2_Update(a,b,c) | ||
| 111 | #define MD_Final(a,b) MDC2_Final(a,b) | ||
| 112 | #define MD(a,b,c) MDC2(a,b,c) | ||
| 113 | #elif defined(USE_MD2_RAND) | ||
| 114 | #include <openssl/md2.h> | ||
| 115 | #define MD_DIGEST_LENGTH MD2_DIGEST_LENGTH | ||
| 116 | #define MD_CTX MD2_CTX | ||
| 117 | #define MD_Init(a) MD2_Init(a) | ||
| 118 | #define MD_Update(a,b,c) MD2_Update(a,b,c) | ||
| 119 | #define MD_Final(a,b) MD2_Final(a,b) | ||
| 120 | #define MD(a,b,c) MD2(a,b,c) | ||
| 121 | #endif | ||
| 122 | |||
| 123 | #include <openssl/rand.h> | ||
| 124 | |||
| 125 | /* #define NORAND 1 */ | ||
| 126 | /* #define PREDICT 1 */ | ||
| 127 | |||
| 128 | #define STATE_SIZE 1023 | ||
| 129 | static int state_num=0,state_index=0; | ||
| 130 | static unsigned char state[STATE_SIZE+MD_DIGEST_LENGTH]; | ||
| 131 | static unsigned char md[MD_DIGEST_LENGTH]; | ||
| 132 | static long md_count[2]={0,0}; | ||
| 133 | static double entropy=0; | ||
| 134 | static int initialized=0; | ||
| 135 | |||
| 136 | const char *RAND_version="RAND" OPENSSL_VERSION_PTEXT; | ||
| 137 | |||
| 138 | static void ssleay_rand_cleanup(void); | ||
| 139 | static void ssleay_rand_seed(const void *buf, int num); | ||
| 140 | static void ssleay_rand_add(const void *buf, int num, double add_entropy); | ||
| 141 | static int ssleay_rand_bytes(unsigned char *buf, int num); | ||
| 142 | static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num); | ||
| 143 | |||
| 144 | RAND_METHOD rand_ssleay_meth={ | ||
| 145 | ssleay_rand_seed, | ||
| 146 | ssleay_rand_bytes, | ||
| 147 | ssleay_rand_cleanup, | ||
| 148 | ssleay_rand_add, | ||
| 149 | ssleay_rand_pseudo_bytes, | ||
| 150 | }; | ||
| 151 | |||
| 152 | RAND_METHOD *RAND_SSLeay(void) | ||
| 153 | { | ||
| 154 | return(&rand_ssleay_meth); | ||
| 155 | } | ||
| 156 | |||
| 157 | static void ssleay_rand_cleanup(void) | ||
| 158 | { | ||
| 159 | memset(state,0,sizeof(state)); | ||
| 160 | state_num=0; | ||
| 161 | state_index=0; | ||
| 162 | memset(md,0,MD_DIGEST_LENGTH); | ||
| 163 | md_count[0]=0; | ||
| 164 | md_count[1]=0; | ||
| 165 | entropy=0; | ||
| 166 | } | ||
| 167 | |||
| 168 | static void ssleay_rand_add(const void *buf, int num, double add) | ||
| 169 | { | ||
| 170 | int i,j,k,st_idx; | ||
| 171 | long md_c[2]; | ||
| 172 | unsigned char local_md[MD_DIGEST_LENGTH]; | ||
| 173 | MD_CTX m; | ||
| 174 | |||
| 175 | #ifdef NORAND | ||
| 176 | return; | ||
| 177 | #endif | ||
| 178 | |||
| 179 | /* | ||
| 180 | * (Based on the rand(3) manpage) | ||
| 181 | * | ||
| 182 | * The input is chopped up into units of 20 bytes (or less for | ||
| 183 | * the last block). Each of these blocks is run through the hash | ||
| 184 | * function as follows: The data passed to the hash function | ||
| 185 | * is the current 'md', the same number of bytes from the 'state' | ||
| 186 | * (the location determined by in incremented looping index) as | ||
| 187 | * the current 'block', the new key data 'block', and 'count' | ||
| 188 | * (which is incremented after each use). | ||
| 189 | * The result of this is kept in 'md' and also xored into the | ||
| 190 | * 'state' at the same locations that were used as input into the | ||
| 191 | * hash function. | ||
| 192 | */ | ||
| 193 | |||
| 194 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 195 | st_idx=state_index; | ||
| 196 | |||
| 197 | /* use our own copies of the counters so that even | ||
| 198 | * if a concurrent thread seeds with exactly the | ||
| 199 | * same data and uses the same subarray there's _some_ | ||
| 200 | * difference */ | ||
| 201 | md_c[0] = md_count[0]; | ||
| 202 | md_c[1] = md_count[1]; | ||
| 203 | |||
| 204 | memcpy(local_md, md, sizeof md); | ||
| 205 | |||
| 206 | /* state_index <= state_num <= STATE_SIZE */ | ||
| 207 | state_index += num; | ||
| 208 | if (state_index >= STATE_SIZE) | ||
| 209 | { | ||
| 210 | state_index%=STATE_SIZE; | ||
| 211 | state_num=STATE_SIZE; | ||
| 212 | } | ||
| 213 | else if (state_num < STATE_SIZE) | ||
| 214 | { | ||
| 215 | if (state_index > state_num) | ||
| 216 | state_num=state_index; | ||
| 217 | } | ||
| 218 | /* state_index <= state_num <= STATE_SIZE */ | ||
| 219 | |||
| 220 | /* state[st_idx], ..., state[(st_idx + num - 1) % STATE_SIZE] | ||
| 221 | * are what we will use now, but other threads may use them | ||
| 222 | * as well */ | ||
| 223 | |||
| 224 | md_count[1] += (num / MD_DIGEST_LENGTH) + (num % MD_DIGEST_LENGTH > 0); | ||
| 225 | |||
| 226 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 227 | |||
| 228 | for (i=0; i<num; i+=MD_DIGEST_LENGTH) | ||
| 229 | { | ||
| 230 | j=(num-i); | ||
| 231 | j=(j > MD_DIGEST_LENGTH)?MD_DIGEST_LENGTH:j; | ||
| 232 | |||
| 233 | MD_Init(&m); | ||
| 234 | MD_Update(&m,local_md,MD_DIGEST_LENGTH); | ||
| 235 | k=(st_idx+j)-STATE_SIZE; | ||
| 236 | if (k > 0) | ||
| 237 | { | ||
| 238 | MD_Update(&m,&(state[st_idx]),j-k); | ||
| 239 | MD_Update(&m,&(state[0]),k); | ||
| 240 | } | ||
| 241 | else | ||
| 242 | MD_Update(&m,&(state[st_idx]),j); | ||
| 243 | |||
| 244 | MD_Update(&m,buf,j); | ||
| 245 | MD_Update(&m,(unsigned char *)&(md_count[0]),sizeof(md_count)); | ||
| 246 | MD_Final(md,&m); | ||
| 247 | md_count[1]++; | ||
| 248 | |||
| 249 | buf=(const char *)buf + j; | ||
| 250 | |||
| 251 | for (k=0; k<j; k++) | ||
| 252 | { | ||
| 253 | state[st_idx++]^=md[k]; | ||
| 254 | if (st_idx >= STATE_SIZE) | ||
| 255 | { | ||
| 256 | st_idx=0; | ||
| 257 | st_num=STATE_SIZE; | ||
| 258 | } | ||
| 259 | } | ||
| 260 | } | ||
| 261 | memset((char *)&m,0,sizeof(m)); | ||
| 262 | } | ||
| 263 | |||
| 264 | static void ssleay_rand_bytes(unsigned char *buf, int num) | ||
| 265 | { | ||
| 266 | int i,j,k,st_num,st_idx; | ||
| 267 | MD_CTX m; | ||
| 268 | static int init=1; | ||
| 269 | unsigned long l; | ||
| 270 | #ifdef DEVRANDOM | ||
| 271 | int fd; | ||
| 272 | #endif | ||
| 273 | |||
| 274 | #ifdef PREDICT | ||
| 275 | { | ||
| 276 | static unsigned char val=0; | ||
| 277 | |||
| 278 | for (i=0; i<num; i++) | ||
| 279 | buf[i]=val++; | ||
| 280 | return; | ||
| 281 | } | ||
| 282 | #endif | ||
| 283 | |||
| 284 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 285 | |||
| 286 | if (init) | ||
| 287 | { | ||
| 288 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 289 | /* put in some default random data, we need more than | ||
| 290 | * just this */ | ||
| 291 | RAND_seed(&m,sizeof(m)); | ||
| 292 | #ifndef MSDOS | ||
| 293 | l=getpid(); | ||
| 294 | RAND_seed(&l,sizeof(l)); | ||
| 295 | l=getuid(); | ||
| 296 | RAND_seed(&l,sizeof(l)); | ||
| 297 | #endif | ||
| 298 | l=time(NULL); | ||
| 299 | RAND_seed(&l,sizeof(l)); | ||
| 300 | |||
| 301 | /* #ifdef DEVRANDOM */ | ||
| 302 | /* | ||
| 303 | * Use a random entropy pool device. | ||
| 304 | * Linux 1.3.x, OpenBSD, and FreeBSD have | ||
| 305 | * this. Use /dev/urandom if you can | ||
| 306 | * as /dev/random will block if it runs out | ||
| 307 | * of random entries. | ||
| 308 | */ | ||
| 309 | if ((fd = open(DEVRANDOM, O_RDONLY)) != NULL) | ||
| 310 | { | ||
| 311 | unsigned char tmpbuf[32]; | ||
| 312 | |||
| 313 | read(fd, tmpbuf, sizeof(tmpbuf)); | ||
| 314 | /* we don't care how many bytes we read, | ||
| 315 | * we will just copy the 'stack' if there is | ||
| 316 | * nothing else :-) */ | ||
| 317 | /* the above comment is EVIL. Security software | ||
| 318 | * RELIES ON THESE PRIMITIVES HAVING MORE SECURE | ||
| 319 | * BEHAVIOUR! Secure entropy is required in | ||
| 320 | * many cases! */ | ||
| 321 | RAND_seed(tmpbuf,32); | ||
| 322 | memset(tmpbuf,0,32); | ||
| 323 | } | ||
| 324 | /* #endif */ | ||
| 325 | #ifdef PURIFY | ||
| 326 | memset(state,0,STATE_SIZE); | ||
| 327 | memset(md,0,MD_DIGEST_LENGTH); | ||
| 328 | #endif | ||
| 329 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 330 | init=0; | ||
| 331 | } | ||
| 332 | |||
| 333 | st_idx=state_index; | ||
| 334 | st_num=state_num; | ||
| 335 | state_index+=num; | ||
| 336 | if (state_index > state_num) | ||
| 337 | state_index=(state_index%state_num); | ||
| 338 | |||
| 339 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 340 | |||
| 341 | while (num > 0) | ||
| 342 | { | ||
| 343 | j=(num >= MD_DIGEST_LENGTH/2)?MD_DIGEST_LENGTH/2:num; | ||
| 344 | num-=j; | ||
| 345 | MD_Init(&m); | ||
| 346 | #ifndef GETPID_IS_MEANINGLESS | ||
| 347 | if (curr_pid) /* just in the first iteration to save time */ | ||
| 348 | { | ||
| 349 | MD_Update(&m,(unsigned char*)&curr_pid,sizeof curr_pid); | ||
| 350 | curr_pid = 0; | ||
| 351 | } | ||
| 352 | #endif | ||
| 353 | MD_Update(&m,&(local_md[MD_DIGEST_LENGTH/2]),MD_DIGEST_LENGTH/2); | ||
| 354 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); | ||
| 355 | #ifndef PURIFY | ||
| 356 | MD_Update(&m,buf,j); /* purify complains */ | ||
| 357 | #endif | ||
| 358 | k=(st_idx+j)-st_num; | ||
| 359 | if (k > 0) | ||
| 360 | { | ||
| 361 | MD_Update(&m,&(state[st_idx]),j-k); | ||
| 362 | MD_Update(&m,&(state[0]),k); | ||
| 363 | } | ||
| 364 | else | ||
| 365 | MD_Update(&m,&(state[st_idx]),j); | ||
| 366 | MD_Final(local_md,&m); | ||
| 367 | |||
| 368 | for (i=0; i<j; i++) | ||
| 369 | { | ||
| 370 | state[st_idx++]^=local_md[i]; /* may compete with other threads */ | ||
| 371 | *(buf++)=local_md[i+MD_DIGEST_LENGTH/2]; | ||
| 372 | if (st_idx >= st_num) | ||
| 373 | st_idx=0; | ||
| 374 | } | ||
| 375 | } | ||
| 376 | |||
| 377 | MD_Init(&m); | ||
| 378 | MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)); | ||
| 379 | MD_Update(&m,local_md,MD_DIGEST_LENGTH); | ||
| 380 | CRYPTO_w_lock(CRYPTO_LOCK_RAND); | ||
| 381 | MD_Update(&m,md,MD_DIGEST_LENGTH); | ||
| 382 | MD_Final(md,&m); | ||
| 383 | CRYPTO_w_unlock(CRYPTO_LOCK_RAND); | ||
| 384 | |||
| 385 | memset(&m,0,sizeof(m)); | ||
| 386 | if (ok) | ||
| 387 | return(1); | ||
| 388 | else | ||
| 389 | { | ||
| 390 | RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED); | ||
| 391 | return(0); | ||
| 392 | } | ||
| 393 | } | ||
| 394 | |||
| 395 | /* pseudo-random bytes that are guaranteed to be unique but not | ||
| 396 | unpredictable */ | ||
| 397 | static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) | ||
| 398 | { | ||
| 399 | int ret, err; | ||
| 400 | |||
| 401 | ret = RAND_bytes(buf, num); | ||
| 402 | if (ret == 0) | ||
| 403 | { | ||
| 404 | err = ERR_peek_error(); | ||
| 405 | if (ERR_GET_LIB(err) == ERR_LIB_RAND && | ||
| 406 | ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED) | ||
| 407 | (void)ERR_get_error(); | ||
| 408 | } | ||
| 409 | return (ret); | ||
| 410 | } | ||
| 411 | |||
| 412 | int RAND_status(void) | ||
| 413 | { | ||
| 414 | if (!initialized) | ||
| 415 | ssleay_rand_initialize(); | ||
| 416 | return (entropy >= ENTROPY_NEEDED); | ||
| 417 | } | ||
| 418 | |||
| 419 | #ifdef WINDOWS | ||
| 420 | #include <windows.h> | ||
| 421 | #include <openssl/rand.h> | ||
| 422 | |||
| 423 | /***************************************************************************** | ||
| 424 | * Initialisation function for the SSL random generator. Takes the contents | ||
| 425 | * of the screen as random seed. | ||
| 426 | * | ||
| 427 | * Created 960901 by Gertjan van Oosten, gertjan@West.NL, West Consulting B.V. | ||
| 428 | * | ||
| 429 | * Code adapted from | ||
| 430 | * <URL:http://www.microsoft.com/kb/developr/win_dk/q97193.htm>; | ||
| 431 | * the original copyright message is: | ||
| 432 | * | ||
| 433 | * (C) Copyright Microsoft Corp. 1993. All rights reserved. | ||
| 434 | * | ||
| 435 | * You have a royalty-free right to use, modify, reproduce and | ||
| 436 | * distribute the Sample Files (and/or any modified version) in | ||
| 437 | * any way you find useful, provided that you agree that | ||
| 438 | * Microsoft has no warranty obligations or liability for any | ||
| 439 | * Sample Application Files which are modified. | ||
| 440 | */ | ||
| 441 | /* | ||
| 442 | * I have modified the loading of bytes via RAND_seed() mechanism since | ||
| 443 | * the original would have been very very CPU intensive since RAND_seed() | ||
| 444 | * does an MD5 per 16 bytes of input. The cost to digest 16 bytes is the same | ||
| 445 | * as that to digest 56 bytes. So under the old system, a screen of | ||
| 446 | * 1024*768*256 would have been CPU cost of approximately 49,000 56 byte MD5 | ||
| 447 | * digests or digesting 2.7 mbytes. What I have put in place would | ||
| 448 | * be 48 16k MD5 digests, or effectively 48*16+48 MD5 bytes or 816 kbytes | ||
| 449 | * or about 3.5 times as much. | ||
| 450 | * - eric | ||
| 451 | */ | ||
| 452 | void RAND_screen(void) | ||
| 453 | { | ||
| 454 | HDC hScrDC; /* screen DC */ | ||
| 455 | HDC hMemDC; /* memory DC */ | ||
| 456 | HBITMAP hBitmap; /* handle for our bitmap */ | ||
| 457 | HBITMAP hOldBitmap; /* handle for previous bitmap */ | ||
| 458 | BITMAP bm; /* bitmap properties */ | ||
| 459 | unsigned int size; /* size of bitmap */ | ||
| 460 | char *bmbits; /* contents of bitmap */ | ||
| 461 | int w; /* screen width */ | ||
| 462 | int h; /* screen height */ | ||
| 463 | int y; /* y-coordinate of screen lines to grab */ | ||
| 464 | int n = 16; /* number of screen lines to grab at a time */ | ||
| 465 | |||
| 466 | /* Create a screen DC and a memory DC compatible to screen DC */ | ||
| 467 | hScrDC = CreateDC("DISPLAY", NULL, NULL, NULL); | ||
| 468 | hMemDC = CreateCompatibleDC(hScrDC); | ||
| 469 | |||
| 470 | /* Get screen resolution */ | ||
| 471 | w = GetDeviceCaps(hScrDC, HORZRES); | ||
| 472 | h = GetDeviceCaps(hScrDC, VERTRES); | ||
| 473 | |||
| 474 | /* Create a bitmap compatible with the screen DC */ | ||
| 475 | hBitmap = CreateCompatibleBitmap(hScrDC, w, n); | ||
| 476 | |||
| 477 | /* Select new bitmap into memory DC */ | ||
| 478 | hOldBitmap = SelectObject(hMemDC, hBitmap); | ||
| 479 | |||
| 480 | /* Get bitmap properties */ | ||
| 481 | GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm); | ||
| 482 | size = (unsigned int)bm.bmWidthBytes * bm.bmHeight * bm.bmPlanes; | ||
| 483 | |||
| 484 | bmbits = Malloc(size); | ||
| 485 | if (bmbits) { | ||
| 486 | /* Now go through the whole screen, repeatedly grabbing n lines */ | ||
| 487 | for (y = 0; y < h-n; y += n) | ||
| 488 | { | ||
| 489 | unsigned char md[MD_DIGEST_LENGTH]; | ||
| 490 | |||
| 491 | /* Bitblt screen DC to memory DC */ | ||
| 492 | BitBlt(hMemDC, 0, 0, w, n, hScrDC, 0, y, SRCCOPY); | ||
| 493 | |||
| 494 | /* Copy bitmap bits from memory DC to bmbits */ | ||
| 495 | GetBitmapBits(hBitmap, size, bmbits); | ||
| 496 | |||
| 497 | /* Get the MD5 of the bitmap */ | ||
| 498 | MD(bmbits,size,md); | ||
| 499 | |||
| 500 | /* Seed the random generator with the MD5 digest */ | ||
| 501 | RAND_seed(md, MD_DIGEST_LENGTH); | ||
| 502 | } | ||
| 503 | |||
| 504 | Free(bmbits); | ||
| 505 | } | ||
| 506 | |||
| 507 | /* Select old bitmap back into memory DC */ | ||
| 508 | hBitmap = SelectObject(hMemDC, hOldBitmap); | ||
| 509 | |||
| 510 | /* Clean up */ | ||
| 511 | DeleteObject(hBitmap); | ||
| 512 | DeleteDC(hMemDC); | ||
| 513 | DeleteDC(hScrDC); | ||
| 514 | } | ||
| 515 | #endif | ||
