OLD | NEW |
1 /* crypto/asn1/x_req.c */ | 1 /* crypto/asn1/x_req.c */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 * we NULL out the field. | 72 * we NULL out the field. |
73 * | 73 * |
74 * As a result we no longer need the req_kludge field because | 74 * As a result we no longer need the req_kludge field because |
75 * the information is now contained in the attributes field: | 75 * the information is now contained in the attributes field: |
76 * 1. If it is NULL then it's the invalid omission. | 76 * 1. If it is NULL then it's the invalid omission. |
77 * 2. If it is empty it is the correct encoding. | 77 * 2. If it is empty it is the correct encoding. |
78 * 3. If it is not empty then some attributes are present. | 78 * 3. If it is not empty then some attributes are present. |
79 * | 79 * |
80 */ | 80 */ |
81 | 81 |
82 static int rinf_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it) | 82 static int rinf_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, |
| 83 » » » » » » » void *exarg) |
83 { | 84 { |
84 X509_REQ_INFO *rinf = (X509_REQ_INFO *)*pval; | 85 X509_REQ_INFO *rinf = (X509_REQ_INFO *)*pval; |
85 | 86 |
86 if(operation == ASN1_OP_NEW_POST) { | 87 if(operation == ASN1_OP_NEW_POST) { |
87 rinf->attributes = sk_X509_ATTRIBUTE_new_null(); | 88 rinf->attributes = sk_X509_ATTRIBUTE_new_null(); |
88 if(!rinf->attributes) return 0; | 89 if(!rinf->attributes) return 0; |
89 } | 90 } |
90 return 1; | 91 return 1; |
91 } | 92 } |
92 | 93 |
(...skipping 10 matching lines...) Expand all Loading... |
103 IMPLEMENT_ASN1_FUNCTIONS(X509_REQ_INFO) | 104 IMPLEMENT_ASN1_FUNCTIONS(X509_REQ_INFO) |
104 | 105 |
105 ASN1_SEQUENCE_ref(X509_REQ, 0, CRYPTO_LOCK_X509_REQ) = { | 106 ASN1_SEQUENCE_ref(X509_REQ, 0, CRYPTO_LOCK_X509_REQ) = { |
106 ASN1_SIMPLE(X509_REQ, req_info, X509_REQ_INFO), | 107 ASN1_SIMPLE(X509_REQ, req_info, X509_REQ_INFO), |
107 ASN1_SIMPLE(X509_REQ, sig_alg, X509_ALGOR), | 108 ASN1_SIMPLE(X509_REQ, sig_alg, X509_ALGOR), |
108 ASN1_SIMPLE(X509_REQ, signature, ASN1_BIT_STRING) | 109 ASN1_SIMPLE(X509_REQ, signature, ASN1_BIT_STRING) |
109 } ASN1_SEQUENCE_END_ref(X509_REQ, X509_REQ) | 110 } ASN1_SEQUENCE_END_ref(X509_REQ, X509_REQ) |
110 | 111 |
111 IMPLEMENT_ASN1_FUNCTIONS(X509_REQ) | 112 IMPLEMENT_ASN1_FUNCTIONS(X509_REQ) |
112 IMPLEMENT_ASN1_DUP_FUNCTION(X509_REQ) | 113 IMPLEMENT_ASN1_DUP_FUNCTION(X509_REQ) |
OLD | NEW |