01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /**
19: * @author Boris Kuznetsov
20: * @version $Revision$
21: */package org.apache.harmony.xnet.provider.jsse;
22:
23: /**
24: *
25: * Contains SSL 3.0 constants
26: * @see SSL 3.0 Spec.
27: * http://wp.netscape.com/eng/ssl3
28: */
29: public class SSLv3Constants {
30:
31: /**
32: * Client is a sender. Used in hash calculating for finished message.
33: * @see SSL 3.0 Spec., 5.6.9 Finished
34: */
35: static final byte[] client = new byte[] { 0x43, 0x4C, 0x4E, 0x54 };
36:
37: /**
38: * Server is a sender. Used in hash calculating for finished message.
39: * @see SSL 3.0 Spec., 5.6.9 Finished
40: */
41: static final byte[] server = new byte[] { 0x53, 0x52, 0x56, 0x52 };
42:
43: /**
44: * pad_1 for MD5
45: * @see SSL 3.0 Spec., 5.2.3.1 Null or standard stream cipher
46: */
47: static final byte[] MD5pad1 = new byte[] { 0x36, 0x36, 0x36, 0x36,
48: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
49: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
50: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
51: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
52: 0x36, 0x36, 0x36, 0x36 };
53:
54: /**
55: * pad_1 for SHA
56: * @see SSL 3.0 Spec., 5.2.3.1 Null or standard stream cipher
57: */
58: static final byte[] SHApad1 = new byte[] { 0x36, 0x36, 0x36, 0x36,
59: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
60: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
61: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
62: 0x36, 0x36, 0x36, 0x36, 0x36, 0x36 };
63:
64: /**
65: * pad_2 for MD5
66: * @see SSL 3.0 Spec., 5.2.3.1 Null or standard stream cipher
67: */
68: static final byte[] MD5pad2 = new byte[] { 0x5C, 0x5C, 0x5C, 0x5C,
69: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
70: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
71: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
72: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
73: 0x5C, 0x5C, 0x5C, 0x5C };
74:
75: /**
76: * pad_2 for SHA
77: * @see SSL 3.0 Spec., 5.2.3.1 Null or standard stream cipher
78: */
79: static final byte[] SHApad2 = new byte[] { 0x5C, 0x5C, 0x5C, 0x5C,
80: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
81: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
82: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C,
83: 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C };
84: }
|