1295009Sjkim/* crypto/rc4/rc4_utl.c */
2238384Sjkim/* ====================================================================
3238384Sjkim * Copyright (c) 2011 The OpenSSL Project.  All rights reserved.
4238384Sjkim *
5238384Sjkim * Redistribution and use in source and binary forms, with or without
6238384Sjkim * modification, are permitted provided that the following conditions
7238384Sjkim * are met:
8238384Sjkim *
9238384Sjkim * 1. Redistributions of source code must retain the above copyright
10280297Sjkim *    notice, this list of conditions and the following disclaimer.
11238384Sjkim *
12238384Sjkim * 2. Redistributions in binary form must reproduce the above copyright
13238384Sjkim *    notice, this list of conditions and the following disclaimer in
14238384Sjkim *    the documentation and/or other materials provided with the
15238384Sjkim *    distribution.
16238384Sjkim *
17238384Sjkim * 3. All advertising materials mentioning features or use of this
18238384Sjkim *    software must display the following acknowledgment:
19238384Sjkim *    "This product includes software developed by the OpenSSL Project
20238384Sjkim *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21238384Sjkim *
22238384Sjkim * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23238384Sjkim *    endorse or promote products derived from this software without
24238384Sjkim *    prior written permission. For written permission, please contact
25238384Sjkim *    openssl-core@openssl.org.
26238384Sjkim *
27238384Sjkim * 5. Products derived from this software may not be called "OpenSSL"
28238384Sjkim *    nor may "OpenSSL" appear in their names without prior written
29238384Sjkim *    permission of the OpenSSL Project.
30238384Sjkim *
31238384Sjkim * 6. Redistributions of any form whatsoever must retain the following
32238384Sjkim *    acknowledgment:
33238384Sjkim *    "This product includes software developed by the OpenSSL Project
34238384Sjkim *    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35238384Sjkim *
36238384Sjkim * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37238384Sjkim * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38238384Sjkim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39238384Sjkim * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
40238384Sjkim * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41238384Sjkim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42238384Sjkim * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43238384Sjkim * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44238384Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45238384Sjkim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46238384Sjkim * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47238384Sjkim * OF THE POSSIBILITY OF SUCH DAMAGE.
48238384Sjkim * ====================================================================
49238384Sjkim *
50238384Sjkim */
51238384Sjkim
52238384Sjkim#include <openssl/opensslv.h>
53238384Sjkim#include <openssl/crypto.h>
54238384Sjkim#include <openssl/rc4.h>
55238384Sjkim
56238384Sjkimvoid RC4_set_key(RC4_KEY *key, int len, const unsigned char *data)
57280297Sjkim{
58238384Sjkim#ifdef OPENSSL_FIPS
59280297Sjkim    fips_cipher_abort(RC4);
60238384Sjkim#endif
61280297Sjkim    private_RC4_set_key(key, len, data);
62280297Sjkim}
63