OLD | NEW |
1 /* crypto/x509/x509cset.c */ | 1 /* crypto/x509/x509cset.c */ |
2 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 * project 2001. | 3 * project 2001. |
4 */ | 4 */ |
5 /* ==================================================================== | 5 /* ==================================================================== |
6 * Copyright (c) 2001 The OpenSSL Project. All rights reserved. | 6 * Copyright (c) 2001 The OpenSSL Project. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 return(ASN1_INTEGER_set(x->crl->version,version)); | 74 return(ASN1_INTEGER_set(x->crl->version,version)); |
75 } | 75 } |
76 | 76 |
77 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name) | 77 int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name) |
78 { | 78 { |
79 if ((x == NULL) || (x->crl == NULL)) return(0); | 79 if ((x == NULL) || (x->crl == NULL)) return(0); |
80 return(X509_NAME_set(&x->crl->issuer,name)); | 80 return(X509_NAME_set(&x->crl->issuer,name)); |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 int X509_CRL_set_lastUpdate(X509_CRL *x, ASN1_TIME *tm) | 84 int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) |
85 { | 85 { |
86 ASN1_TIME *in; | 86 ASN1_TIME *in; |
87 | 87 |
88 if (x == NULL) return(0); | 88 if (x == NULL) return(0); |
89 in=x->crl->lastUpdate; | 89 in=x->crl->lastUpdate; |
90 if (in != tm) | 90 if (in != tm) |
91 { | 91 { |
92 in=M_ASN1_TIME_dup(tm); | 92 in=M_ASN1_TIME_dup(tm); |
93 if (in != NULL) | 93 if (in != NULL) |
94 { | 94 { |
95 M_ASN1_TIME_free(x->crl->lastUpdate); | 95 M_ASN1_TIME_free(x->crl->lastUpdate); |
96 x->crl->lastUpdate=in; | 96 x->crl->lastUpdate=in; |
97 } | 97 } |
98 } | 98 } |
99 return(in != NULL); | 99 return(in != NULL); |
100 } | 100 } |
101 | 101 |
102 int X509_CRL_set_nextUpdate(X509_CRL *x, ASN1_TIME *tm) | 102 int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) |
103 { | 103 { |
104 ASN1_TIME *in; | 104 ASN1_TIME *in; |
105 | 105 |
106 if (x == NULL) return(0); | 106 if (x == NULL) return(0); |
107 in=x->crl->nextUpdate; | 107 in=x->crl->nextUpdate; |
108 if (in != tm) | 108 if (in != tm) |
109 { | 109 { |
110 in=M_ASN1_TIME_dup(tm); | 110 in=M_ASN1_TIME_dup(tm); |
111 if (in != NULL) | 111 if (in != NULL) |
112 { | 112 { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 { | 161 { |
162 in=M_ASN1_INTEGER_dup(serial); | 162 in=M_ASN1_INTEGER_dup(serial); |
163 if (in != NULL) | 163 if (in != NULL) |
164 { | 164 { |
165 M_ASN1_INTEGER_free(x->serialNumber); | 165 M_ASN1_INTEGER_free(x->serialNumber); |
166 x->serialNumber=in; | 166 x->serialNumber=in; |
167 } | 167 } |
168 } | 168 } |
169 return(in != NULL); | 169 return(in != NULL); |
170 } | 170 } |
OLD | NEW |